zkevm-circuits
zkevm-circuits copied to clipboard
soundness problem: not all error are "hang"
Some types of error,ErrDepth and ErrInsufficientBalance, will not hang, but do nothing and continue execution.
So transition from these errors to BeginTx is impossible.
https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/c78c86dfb7bc9198c0e7b0fcc5e7ecfd21277893/zkevm-circuits/src/evm_circuit/execution.rs#L672
Thanks for noticing this! Just realized for these exceptions they never happen in root call, so we should not allow the transition from these states to BeginTx (and it’d also remove some constraints).
But I guess in their implementation we’d still constrain that only when is_root they can transition to BeginTx, so naively I think this wouldn’t introduce the soundness issue (but just introduce some branches that never executed).