-
Notifications
You must be signed in to change notification settings - Fork 163
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
Implement stateDiff tracer, compatible with OpenEthereum #345
Conversation
eth: add test for stateDiff tracer
eth, eth/tracers: resolve state_diff misconsistencies eth: pass extra context to call JS tracers hasFromSufficientBalance*
eth: traceCall to use original TransferFunc instead of copy the logic and take care of mutating the value
…CapturePreEVM Till this point, state_diff was manually calculating balance/nonce changes that have been executed pre/post EVM execution. This was error prone, as any change in consensus within go, will have to be transfered to JS logic as well. This commit tackles this issue, by adding an init() method call, before anything is be run for a transaction. eth: clean up vmctx.Tracer (pointer, refs, oh my) Date: 2021-03-12 15:09:48-06:00 Signed-off-by: meows <b5c6@protonmail.com>
… code after the upstream merge
@meowsbits where's the best place to add the Differences with OpenEthereum section from the above notes in our docs? Do you remember if we have a way to add them within the generated docs? |
Rel #345 (comment) @ziogaschr, revert this if you hate it ;) Date: 2021-03-30 16:55:21-05:00 Signed-off-by: meows <b5c6@protonmail.com>
It reassigns the `err` var in the if context instead of changing the outer context for the function return
I removed by mistake the stateDiff parts on previous commit, as I thought I was working on the PR #348.
@meowsbits I handled all your comments. Please have a look at them and re-review. Let me know if you find anything else as based on your comments we did some good hardening. |
Co-authored-by: meowsbits <b5c6@protonmail.com>
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.
Awesome work.
This PR adds stateDiff tracer that is compatible with OpenEthereum.
The stateDiff tracer can be used in the following Ad-hoc Tracing methods:
p.s.: The remaining unchecked Ad-hoc Tracing methods will be added in a new PR, and will have stateDiff tracer support out of the box.
Differences with OpenEthereum
U256::max()
, which leads into problems on contracts using it for pseudo-randomness. On core-geth, we believe that the user utilising thetrace_*
wants to see what will happen in reality, though we leave the block untouched to its true values.