-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix debug_storageRangeAt #3148
fix debug_storageRangeAt #3148
Conversation
5870ccf
to
043f745
Compare
if idx+1 == len(block.Transactions()) { | ||
// Return the state from evaluating all txs in the block, note no msg or TxContext in this case | ||
return nil, BlockContext, vm.TxContext{}, statedb, reader, nil | ||
} |
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.
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.
sorry I did not quite understand this comment.
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.
nevermind
Thank you for this PR! Does it solve your issue? |
Yes. We are using in our application now and seems to do what we need. |
a bit weird that our PlainState class, does remember storage changes, but loosing all other changes... |
The reason is that the storage within PlainState is what is used to generate the result of the storageRangeAt call, see: If that storage is not updated, then it reflects the storage as of the beginning of the block, no matter what transaction index is specified, because the storage updates are never committed into the PlainState object ("stateReader"). |
now I see. then it make more sense. |
add special case to permit getting state for execution of entire block (i.e. after all txs)
67a290b
to
63786c6
Compare
I have merged latest devel. |
It seems that somehow the change to link
It appears that the change from NoopWriter -> PlainState (on line 68) did not get merged properly. This is a critical element of the fix. What is the right way to proceed to fix this issue? |
No description provided.