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

fix: use original value in prestate tracer #15

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

mattsse
Copy link
Contributor

@mattsse mattsse commented Jan 28, 2024

Closes #13

This could potentially be simplified if we can simply use the result's statediff if this has the initial value for modified slots and not just the previous

because the prestate tracer should only include changed slots:

https://github.com/ethereum/go-ethereum/blob/bc0b87ca196f92e5af49bd33cc190ef0ec32b197/eth/tracers/native/prestate.go#L216-L224

simplifies prestate result by only checking changed accounts and using the original value

cc @rakita

@mattsse mattsse requested a review from rkrasiuk January 28, 2024 20:50
@mattsse mattsse marked this pull request as ready for review January 28, 2024 20:50
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice cleanup

@mattsse mattsse merged commit 2cc9b32 into main Jan 29, 2024
11 checks passed
@DaniPopes DaniPopes deleted the matt/fix-prestate-slot-recording branch January 29, 2024 09:32
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.

Geth PreState tracer has problems
2 participants