privacy-scaling-explorations / zkevm-circuits

https://privacy-scaling-explorations.github.io/zkevm-circuits/
Other
821 stars 841 forks source link

EVM Circuit: block.table_assignment introduces non fixed entries in fixed columns #1787

Open AronisAt79 opened 4 months ago

AronisAt79 commented 4 months ago

What command(s) is the bug in?

No response

Describe the bug

Some fixed columns within the evm circuit are not actually fixed. It has been identified that when function https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/3151efd65744eea26bac12f8f0c1d009fc45ff1c/zkevm-circuits/src/witness/block.rs#L184 iterates over the history_hashes vector https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/3151efd65744eea26bac12f8f0c1d009fc45ff1c/zkevm-circuits/src/witness/block.rs#L237-L249 it results in non fixed pointer sequences.

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

  1. Reproduce and display the mismatched columns with history < 256: Checkout this branch and execute: ./run.sh --sudo --steps "setup gendata"; cargo test --profile release --test circuits sub_mock_prover --all-features -- --nocapture
  2. Reproduce and display the mismatched columns with len_history = 256: Checkout this branch and execute: ./run.sh --sudo --steps "cleanup"; sudo docker system prune -af --volumes; ./run.sh --sudo --steps "setup gendata"; cargo test --profile release --test circuits sub_mock_prover --all-features -- --nocapture

Sample outputs for both tests in attached zip file test_outputs.zip