privacy-scaling-explorations / zkevm-circuits

Home Page:https://privacy-scaling-explorations.github.io/zkevm-circuits/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Testool] Panic_attempt to subtract with overflow

ChihChengLiang opened this issue · comments

What command(s) is the bug in?

cd testool; cargo run -r -- --suite nightly --inspect stackOverflowM1PUSH_d10_g0_v0

Describe the bug

thread 'main' panicked at 'attempt to subtract with overflow', zkevm-circuits/src/instance.rs:266:24

The root cause is the circuit takes a transition whose calldata exceeds the max calldata size.

let calldata_count = all_calldata.len();
// concat call data with call data padding
let calldata_chain = iter::empty()
.chain(all_calldata)
.chain((0..max_calldata - calldata_count).map(|_| 0u8));

We should raise errors and capture them properly, so that the report shows it as "Fail" instead of "Panic".

get_pi_bytes

Concrete steps to reproduce the bug. If it's able reproduce via testool, please share test_id from jenkins report

No response