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

Open
Nashtare opened this issue Jul 20, 2024 · 1 comment
Open

Add trie diff tool for evm_arithmetization's CPU #415

Nashtare opened this issue Jul 20, 2024 · 1 comment
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)
  • look for a diff between tries
  • 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
Member

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
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: Backlog
Development

No branches or pull requests

2 participants