scroll-tech / ceno

Accelerate Zero-knowledge Virtual Machine by Non-uniform Prover Based on GKR Protocol
Apache License 2.0
57 stars 7 forks source link

Bug: instruction encoding of imm in `ANDI` #528

Closed kunxian-xia closed 3 weeks ago

kunxian-xia commented 3 weeks ago

You can reproduce it by running the following cmd inside feat/guest-example-mock-prover

RAYON_NUM_THREADS=16 RUST_LOG=debug cargo run --release --example fibonacci_elf 

You will see lookup errors emited by mock prover like

2024-11-01T14:32:04.445118Z ERROR ceno_zkvm::scheme::mock_prover: riscv_opcode/ANDI/fetch: value [Goldilocks(200d50), Goldilocks(13), Goldilocks(c), Goldilocks(7), Goldilocks(c), Goldilocks(0), Goldilocks(fffffffc)] does not occur in Instruction table at row 1
2024-11-01T14:32:04.445153Z ERROR ceno_zkvm::scheme::mock_prover: riscv_opcode/ANDI/fetch: value [Goldilocks(200d50), Goldilocks(13), Goldilocks(c), Goldilocks(7), Goldilocks(c), Goldilocks(0), Goldilocks(fffffffc)] does not occur in Instruction table at row 11
2024-11-01T14:32:04.480866Z ERROR ceno_zkvm::scheme::mock_prover: riscv_opcode/LW/fetch: value [Goldilocks(2026e0), Goldilocks(3), Goldilocks(e), Goldilocks(2), Goldilocks(2), Goldilocks(0), Goldilocks(1a4)] does not occur in Instruction table at row 137