zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

soundness problem: not all error are "hang"

Open lispc opened this issue 2 years ago • 1 comments

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

lispc avatar Dec 14 '22 01:12 lispc

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).

han0110 avatar Dec 14 '22 02:12 han0110