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 debugger tool for evm_arithmetization's CPU #221

Open
Nashtare opened this issue May 4, 2024 · 0 comments
Open

Add debugger tool for evm_arithmetization's CPU #221

Nashtare opened this issue May 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Nashtare
Copy link
Collaborator

Nashtare commented May 4, 2024

When debugging a prover failure, we can use eth-trie-tools for tries discrepancies, but we don't have anything to go through the actual EVM execution, and we usually need to rely on manual investigation.

Something that should be relatively simple to implement would be to parse both a zkEVM log file and the related txn execution trace counterpart (obtained via the usual debug_traceTransaction), and compare at least for each zkEVM Syscall the pre and post stack (ignoring on the zkEVM side the top element always being KEXIT_INFO), and outputting the first discrepancy if any.

Parsing the output of debug_traceTransaction JSON file is straightforward. On the zkEVM side, the pre stack of any Syscall is always on a line with pc=sys_xxx, where xxx is the instruction to be matching on the other side. The post stack can be found by looking at the first line below containing below sys_xxx, instruction=ExitKernel. We don't expose the stack for basic operations like POP, PUSH, ... so we would filter these out when going through the actual EVM trace for comparison.

@Nashtare Nashtare added the enhancement New feature or request label May 4, 2024
@Nashtare Nashtare added this to the Cleanups and Misc. milestone May 4, 2024
@Nashtare Nashtare modified the milestones: Misc., System strengthening Jul 12, 2024
@Nashtare Nashtare pinned this issue Jul 20, 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: Todo
Development

No branches or pull requests

1 participant