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

Add trie diff tool for evm_arithmetization's CPU #415

Closed
Nashtare opened this issue Jul 20, 2024 · 3 comments · Fixed by #630
Closed

Add trie diff tool for evm_arithmetization's CPU #415

Nashtare opened this issue Jul 20, 2024 · 3 comments · Fixed by #630
Assignees
Labels
enhancement New feature or request

Comments

@Nashtare
Copy link
Collaborator

Nashtare commented Jul 20, 2024

Many of the errors we encountered on the CPU side where invalid final tries (usually the state trie). We currently print to the logs the tries computed by the CPU upon kernel failure, though this isn't really helpful on its own.

We already have a tool (eth-trie-tools) to highlight trie discrepancies between two (expected) identical tries which happened to have at least one diff point, but the process is slow and tedious. Ideally, we would like to have an automated tool that:

  • keeps the initial / final tries generated by the decoder for a given payload (we normally hash the final tries)
  • replay the failing payload on the evm_arithmetization side, and extract the resulting tries (see output_debug_tries() on how they are retrieved)
  • look for a diff between expected final tries of trace_decoder and obtained tries of evm_arithmetization
    • for discrepancies in txn or receipt tries, display the distinct, decoded payloads
    • for discrepancies in the state trie:
      • highlight the account that's different
      • look for the associated address
      • if the issue lies in the storage root, find the discrepancy in the account's storage trie

This will be particularly helpful when we start working on actual blocks with SMT.

@Nashtare Nashtare added the enhancement New feature or request label Jul 20, 2024
@Nashtare Nashtare added this to the Testing and Validation milestone Jul 20, 2024
@Nashtare Nashtare pinned this issue Jul 20, 2024
@BGluth
Copy link
Contributor

BGluth commented Jul 22, 2024

Awesome idea! I don't know why I didn't think about calling the diff logic directly on failure.

@BGluth BGluth self-assigned this Jul 22, 2024
@BGluth BGluth removed their assignment Aug 9, 2024
@atanmarko atanmarko self-assigned this Aug 20, 2024
@Nashtare
Copy link
Collaborator Author

Nashtare commented Sep 6, 2024

Hey @atanmarko, just bumping this to know the status, if this is in your plans soon or not.

@atanmarko
Copy link
Contributor

@Nashtare Plan to work on it during next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants