-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate UpdatedAddresses on Lib9c side #1877
Calculate UpdatedAddresses on Lib9c side #1877
Conversation
19eb57e
to
793bbd5
Compare
793bbd5
to
9066f70
Compare
I think it is not an issue related to Now, even the 9c-main-full-state node, they don't store the https://9cscan.com/tx/3b81c8e5af404eb7d4ef5e2e462bc27306440b7c9ae164d8eee1b6193242f286 query {
transaction {
transactionResult(txId: "3b81c8e5af404eb7d4ef5e2e462bc27306440b7c9ae164d8eee1b6193242f286") {
updatedStates {
address
state
}
}
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the code level, I think it can be merged.
It's true. but the point I wanted to mention is, many systems are already using But on the other hand, I believe that we need to introduce a legit way to access "updated addresses", like as you mentioned. 😅 |
9066f70
to
a5bfe1d
Compare
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Just for note) At least in v200010, many of the actions in Lib9c already seem to stop filling |
Summary
This PR adds
.CalculateUpdatedAddresses()
toIEnumerable<PolymorphicAction<ActionBase>>
andIEnumerable<ActionBase>
to get updated addresses handy.Background
Transaction<T>.UpdatedAddresses
is no longer auto-calculated.Transaction<T>.Create()
.Transaction<T>.UpdatedAddresses
and “rehearsal mode”, and more libplanet#368Transaction<T>.UpdatedAddresses
automatically libplanet#3122Then, why do we still need it?
IActionContext.Rehearsal
.lib9c/Lib9c/Action/TransferAsset.cs
Lines 92 to 98 in 6912e58
Transaction<T>.UpdatedAddresses
.UpdatedAddresses
.Plan (9c side only)
.UpdatedAddresses
leveraging existingRehearsal
related codes to Lib9c (this PR)updatedAddresses
argument explicitly forTransaction<T>.Create()
when creating transactions (NineChronicles / NineChronicles.Headless).Transaction<T>.UpdatedAddresses
to usingActionEvaluation.UpdatedAddresses
for systems involving 9c mainnet.