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 - state persistence for post execution #39

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

debjit-bw
Copy link
Member

Using an evm constructed inside post execution in gnosis.rs was not persisting the changes (for example even when new accounts were forcefully being created). This resulted in mismatched state roots (because the rewards contract call changes the storage roots). Now we are passing the evm mutably from post_execution function instead of constructing inside.

Some traits have been changed, so the evm passed inside post_execution no longer has increment_balances in evm.context.evm.db. Therefore, refactored to bring the balance_increments outside in post_execution function to match with paradigmxyz/reth.

Final Result

✅ Can sync mainnet blocks post-merge. Currently syncing Merge fork (1000 blocks applied). Not reached Shanghai.

@debjit-bw debjit-bw marked this pull request as ready for review December 11, 2024 09:23
@debjit-bw debjit-bw requested a review from dapplion December 11, 2024 09:23
Copy link
Member

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

good find!

@debjit-bw debjit-bw merged commit 0d4ec11 into master Dec 11, 2024
7 checks passed
@debjit-bw debjit-bw deleted the evm-execution branch December 11, 2024 14:01
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.

2 participants