Skip to content
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

core/vm: fix EIP-2929 call gas tracing (ref #22649) #22680

Closed
wants to merge 1 commit into from

Conversation

adietrichs
Copy link
Member

Possible way to close #22649.
Previously, the makeCallVariantGasCallEIP2929 charged the cold account access cost directly, leading to an incorrect gas cost passed to the tracer from the main execution loop.
This change still temporarily charges the cost (to allow for an accurate calculation of the available gas for the call), but then afterwards refunds it and instead returns the correct total gas cost to be then properly charged in the main loop.

This is the best fix I could come up with that keeps the general wrapper structure intact. Alternatives would be deeper changes to the way EIP-2929 gas cost calculation is conducted.

@ziogaschr
Copy link
Contributor

ziogaschr commented Apr 19, 2021

I wonder if you have a test to reproduce this one? Probably evm.CallGasTemp can be used for handling the tracer part.

p.s.: just seen that @holiman assigned himself on this one, so he knows far better than me what to do. :)

@adietrichs
Copy link
Member Author

Superseded by #22702, so I am closing this one.

@adietrichs adietrichs closed this Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect gas cost passed to tracer for EIP-2929 calls with cold account accesses
3 participants