Add debugger tool for evm_arithmetization
's CPU
#221
Labels
enhancement
New feature or request
Milestone
evm_arithmetization
's CPU
#221
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 zkEVMSyscall
the pre and post stack (ignoring on the zkEVM side the top element always beingKEXIT_INFO
), and outputting the first discrepancy if any.Parsing the output of
debug_traceTransaction
JSON
file is straightforward. On the zkEVM side, thepre
stack of any Syscall is always on a line withpc=sys_xxx
, wherexxx
is the instruction to be matching on the other side. Thepost
stack can be found by looking at the first line below containingbelow sys_xxx, instruction=ExitKernel
. We don't expose the stack for basic operations likePOP
,PUSH
, ... so we would filter these out when going through the actual EVM trace for comparison.The text was updated successfully, but these errors were encountered: