0xPolygonZero / zk_evm

Apache License 2.0
85 stars 37 forks source link

trace_decoder tests fail #784

Closed sergerad closed 1 week ago

sergerad commented 1 week ago

Trace decoder crate tests fail on my Macbook.

zkevm version:

╰─➤  git log --pretty=oneline  | HEAD                                                                                                                                          
4a747b2e3dc1107d00591409f7d0d8cfcc9e1206 Add test config in zero bin (#742)

Rust version:

╰─➤  rustc --version                                                                                                   
rustc 1.83.0-nightly (7042c269c 2024-09-23)

Command I ran:

╰─➤  cargo test -p trace_decoder

Output includes:

failures:

---- b20472570_main@1/71 ----
test panicked: assertion `left == right` failed
  left: 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6
 right: 0x00000000000000000000000000000000000000000000210ddf87300c58580cea

---- b20472570_main@3/23 ----
test panicked: assertion `left == right` failed
  left: 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6
 right: 0x00000000000000000000000000000000000000000000210ddf87300c58580cea

failures:
    b20472570_main@1/71
    b20472570_main@3/23

test result: FAILED. 1192 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 645.22

Output earlier on points to source lines:

thread '<unnamed>' panicked at evm_arithmetization/src/generation/state.rs:537:9:
assertion `left == right` failed
  left: 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6
 right: 0x00000000000000000000000000000000000000000000210ddf87300c58580cea
test b20472570_main@3/23  ... FAILED
thread '<unnamed>' panicked at evm_arithmetization/src/generation/state.rs:537:9:
assertion `left == right` failed
  left: 0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6
 right: 0x00000000000000000000000000000000000000000000210ddf87300c58580cea
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test b20472570_main@1/71  ... FAILED
0xaatif commented 1 week ago

I've reproed this :D

Nashtare commented 1 week ago

Ah, this is a know issue affecting only debug builds (debug_assert failing between known codehash and computed one). I think someone (Maybe @einar-polygon?) hit it a while back, not sure if there was a tangible solution to this.

Note that this is an old leftover for debugging purposes, we could remove this contract observation logic altogether.

Nashtare commented 1 week ago

Actually forgot there was an open issue for this. Closing as duplicate of https://github.com/0xPolygonZero/zk_evm/issues/725