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

State diff comparator #51

Open
6 tasks
poplexity opened this issue Sep 20, 2024 · 0 comments
Open
6 tasks

State diff comparator #51

poplexity opened this issue Sep 20, 2024 · 0 comments
Assignees
Labels

Comments

@poplexity
Copy link
Member

poplexity commented Sep 20, 2024

Should compare all aspects of account and account state changes between tevm and revm.

  • Compare bytecode, currently reth seems to store it differently than tevm, possibly we can just use the code hash
  • Ensure rows from tevm have values which match in revm db
  • Ensure rows modified in revm are also reflected in tevm diffs
  • Properly account for removed rows from both sides
  • Ignore no-op changes from revm (code changes from None to Some(ZeroBytecode)
  • Properly account for accounts created in tevm using create and openwallet

Behavior when compare finds a difference should be configurable. One option would be a panic so the node shuts down, the other option would be to log a warning but proceed with sync.

If a difference is found, there should be verbose logging of the difference. This logging should include the block where the difference was found, the values from both tevm and revm side and any other information which would be valuable for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants