Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

test: add more traces & bump zkevm-circuits version #15

Merged
merged 17 commits into from
Jun 28, 2022
Merged

Conversation

0xmountaintop
Copy link
Contributor

@0xmountaintop 0xmountaintop commented Jun 20, 2022

MasterChef

  • opcode 0xfe not defined
  • error should be string instead of map?

DAO

STATICCALL codeList encoding error

NFT

evm_circuit fails

[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-21T05:30:10Z INFO  zkevm::prover] Create evm proof of block 0xd3a3…1463
test test_evm_prove_verify ... FAILED

failures:

---- test_evm_prove_verify stdout ----
thread 'test_evm_prove_verify' panicked at 'Execution state unknown: DUMMY', /home/haoyu/.cargo/git/checkouts/zkevm-circuits-462c2cba34f9b301/16f6951/zkevm-circuits/src/evm_circuit/execution.rs:891:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panicking.rs:106:14
   2: zkevm_circuits::evm_circuit::execution::ExecutionConfig<F>::assign_exec_step_int
   3: zkevm_circuits::evm_circuit::execution::ExecutionConfig<F>::assign_exec_step
   4: zkevm_circuits::evm_circuit::execution::ExecutionConfig<F>::assign_block::{{closure}}
   5: <halo2_proofs::circuit::floor_planner::single_pass::SingleChipLayouter<F,CS> as halo2_proofs::circuit::Layouter<F>>::assign_region
   6: zkevm_circuits::evm_circuit::execution::ExecutionConfig<F>::assign_block
   7: <zkevm_circuits::evm_circuit::test::TestCircuit<F> as halo2_proofs::plonk::circuit::Circuit<F>>::synthesize
   8: <halo2_proofs::circuit::floor_planner::single_pass::SimpleFloorPlanner as halo2_proofs::plonk::circuit::FloorPlanner>::synthesize
   9: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  11: core::iter::adapters::process_results
  12: zkevm::prover::Prover::create_evm_proof
  13: core::ops::function::FnOnce::call_once
  14: core::ops::function::FnOnce::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

state_circuit passes

@lispc
Copy link
Collaborator

lispc commented Jun 21, 2022

  1. MasterChef has many method. Which method called here?
  2. i suggest merge some code improvements:  #14 first. The new test can be ignored or deleted. This PR bring more some benefit like strict checking of params file.

@lispc
Copy link
Collaborator

lispc commented Jun 21, 2022

how to upgrade zkevm to fix nft evm circuit:

sed -i 's#rev = "16f6951c"#rev = "4797a964"#' setup/Cargo.toml types/Cargo.toml zkevm/Cargo.toml

@HAOYUatHZ

@0xmountaintop
Copy link
Contributor Author

how to upgrade zkevm to fix nft evm circuit:

sed -i 's#rev = "16f6951c"#rev = "4797a964"#' setup/Cargo.toml types/Cargo.toml zkevm/Cargo.toml

@HAOYUatHZ

OK

@lispc
Copy link
Collaborator

lispc commented Jun 24, 2022

zzhang will have a look at why MasterChef failed

Even if we fixed masterchef later we can still keep the 0xfe failure case here. It is a great example for testing 0xfe opcode

@0xmountaintop
Copy link
Contributor Author

0xmountaintop commented Jun 24, 2022

make again
  • cat 0624.dao.evm.txt
  • cat 0624.dao.state.txt
  • cat 0624.nft.evm.txt
  • cat 0624.nft.state.txt
  • cat 0624.sushi.evm.txt
  • cat 0624.sushi.state.txt

cat 0624.dao.evm.txt

running 1 test
[2022-06-24T03:33:33Z INFO  integration] using mode "dao", testing with "./tests/dao.json"
[2022-06-24T03:33:33Z INFO  zkevm::utils] start loading params with degree 18
[2022-06-24T03:33:33Z INFO  zkevm::utils] load params successfully!
[2022-06-24T03:33:33Z INFO  integration] start generating evm_circuit proof
[2022-06-24T03:33:33Z INFO  zkevm::utils] start loading params with degree 18
[2022-06-24T03:33:33Z INFO  zkevm::utils] load params successfully!
[2022-06-24T03:33:54Z WARN  bus_mapping::evm::opcodes] Using dummy gen_call_ops for opcode STATICCALL
[2022-06-24T03:33:54Z WARN  bus_mapping::evm::opcodes] Using dummy gen_associated_ops for opcode RETURNDATASIZE
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode STATICCALL
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode RETURNDATASIZE
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode NOT
[2022-06-24T03:33:54Z INFO  zkevm::prover] Create evm proof of block 0x6f1e…c01d
test test_evm_prove_verify has been running for over 60 seconds
test test_evm_prove_verify ... FAILED

failures:

---- test_evm_prove_verify stdout ----
thread 'test_evm_prove_verify' panicked at 'called `Result::unwrap()` on an `Err` value: The constraint system is not satisfied

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   1: zkevm::prover::Prover::create_evm_proof
   2: core::ops::function::FnOnce::call_once
   3: core::ops::function::FnOnce::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
   4: test::__rust_begin_short_backtrace
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:585:5
   5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
   6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panic/unwind_safe.rs:271:9
   7: std::panicking::try::do_call
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:406:40
   8: std::panicking::try
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:370:19
   9: std::panic::catch_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panic.rs:133:14
  10: test::run_test_in_process
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:608:18
  11: test::run_test::run_test_inner::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:500:39
  12: test::run_test::run_test_inner::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:527:37
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/sys_common/backtrace.rs:123:18
  14: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/thread/mod.rs:484:17
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panic/unwind_safe.rs:271:9
  16: std::panicking::try::do_call
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:406:40
  17: std::panicking::try
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:370:19
  18: std::panic::catch_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panic.rs:133:14
  19: std::thread::Builder::spawn_unchecked::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/thread/mod.rs:483:30
  20: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
  21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
  22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
  23: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/sys/unix/thread.rs:106:17
  24: <unknown>
  25: <unknown>', zkevm/tests/integration.rs:48:56
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panicking.rs:106:14
   2: core::result::unwrap_failed
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/result.rs:1613:5
   3: core::ops::function::FnOnce::call_once
   4: core::ops::function::FnOnce::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    test_evm_prove_verify

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1 filtered out; finished in 103.37s

error: test failed, to rerun pass '-p zkevm --test integration'

cat 0624.sushi.evm.txt

running 1 test
[2022-06-24T03:54:56Z INFO  integration] using mode "sushi", testing with "./tests/sushi.json"
[2022-06-24T03:54:56Z INFO  zkevm::utils] start loading params with degree 18
[2022-06-24T03:54:56Z INFO  zkevm::utils] load params successfully!
[2022-06-24T03:54:56Z INFO  integration] start generating evm_circuit proof
[2022-06-24T03:54:56Z INFO  zkevm::utils] start loading params with degree 18
[2022-06-24T03:54:57Z INFO  zkevm::utils] load params successfully!
[2022-06-24T03:55:17Z WARN  bus_mapping::evm::opcodes] Using dummy gen_associated_ops for opcode INVALID(254)
[2022-06-24T03:55:17Z WARN  bus_mapping::evm::opcodes] Using dummy gen_associated_ops for opcode INVALID(254)
[2022-06-24T03:55:17Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode INVALID(254)
[2022-06-24T03:55:17Z WARN  zkevm_circuits::evm_circuit::witness] unimplemented opcode INVALID(254)
[2022-06-24T03:55:17Z INFO  zkevm::prover] Create evm proof of block 0x2cad…6271
test test_evm_prove_verify has been running for over 60 seconds
test test_evm_prove_verify ... FAILED

failures:

---- test_evm_prove_verify stdout ----
thread 'test_evm_prove_verify' panicked at 'called `Result::unwrap()` on an `Err` value: The constraint system is not satisfied

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   1: zkevm::prover::Prover::create_evm_proof
   2: core::ops::function::FnOnce::call_once
   3: core::ops::function::FnOnce::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
   4: test::__rust_begin_short_backtrace
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:585:5
   5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
   6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panic/unwind_safe.rs:271:9
   7: std::panicking::try::do_call
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:406:40
   8: std::panicking::try
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:370:19
   9: std::panic::catch_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panic.rs:133:14
  10: test::run_test_in_process
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:608:18
  11: test::run_test::run_test_inner::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:500:39
  12: test::run_test::run_test_inner::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/test/src/lib.rs:527:37
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/sys_common/backtrace.rs:123:18
  14: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/thread/mod.rs:484:17
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panic/unwind_safe.rs:271:9
  16: std::panicking::try::do_call
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:406:40
  17: std::panicking::try
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:370:19
  18: std::panic::catch_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panic.rs:133:14
  19: std::thread::Builder::spawn_unchecked::{{closure}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/thread/mod.rs:483:30
  20: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
  21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
  22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/alloc/src/boxed.rs:1694:9
  23: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/sys/unix/thread.rs:106:17
  24: <unknown>
  25: <unknown>', zkevm/tests/integration.rs:48:56
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/panicking.rs:106:14
   2: core::result::unwrap_failed
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/result.rs:1613:5
   3: core::ops::function::FnOnce::call_once
   4: core::ops::function::FnOnce::call_once
             at /rustc/d914f17ca71a33a89b2dc3436fca51b1a091559e/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    test_evm_prove_verify

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1 filtered out; finished in 102.87s

error: test failed, to rerun pass '-p zkevm --test integration'

@lispc
Copy link
Collaborator

lispc commented Jun 27, 2022

fixing this

@lispc
Copy link
Collaborator

lispc commented Jun 28, 2022

uograded. scroll-tech/zkevm-circuits#158

@0xmountaintop 0xmountaintop changed the title add more traces test: add more traces & bump zkevm-circuits version Jun 28, 2022
@0xmountaintop 0xmountaintop marked this pull request as ready for review June 28, 2022 08:09
@scroll-dev scroll-dev merged commit 457af3a into main Jun 28, 2022
@scroll-dev scroll-dev deleted the more_traces branch June 28, 2022 08:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants