Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread "test_agg_prove_verify" panicked at "called Option::unwrap()" on a "None" value #243

Open
nvilli opened this issue Aug 24, 2023 · 1 comment

Comments

@nvilli
Copy link

nvilli commented Aug 24, 2023

when I run "make test-agg-prove", I get this error so the test failed. What should I do to solve this problem?

test test_agg_prove_verify ... FAILED

failures:

---- test_agg_prove_verify stdout ----
thread 'test_agg_prove_verify' panicked at 'called `Option::unwrap()` on a `None` value', /root/.cargo/git/checkouts/snark-verifier-cd02c9c9f799657f/514f457/snark-verifier-sdk/src/evm_api.rs:198:20
stack backtrace:
   0: rust_begin_unwind
             at /rustc/dfe3fe710181738a2cb3060c23ec5efb3c68ca09/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/dfe3fe710181738a2cb3060c23ec5efb3c68ca09/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/dfe3fe710181738a2cb3060c23ec5efb3c68ca09/library/core/src/panicking.rs:111:5
   3: snark_verifier_sdk::evm_api::verify_evm_proof
   4: core::ops::function::FnOnce::call_once
   5: core::ops::function::FnOnce::call_once
             at /rustc/dfe3fe710181738a2cb3060c23ec5efb3c68ca09/library/core/src/ops/function.rs:507:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    test_agg_prove_verify

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

error: test failed, to rerun pass `-p prover --test aggregation_tests`
Makefile:45: recipe for target 'test-agg-prove' failed
make: *** [test-agg-prove] Error 101
@nvilli
Copy link
Author

nvilli commented Aug 24, 2023

I try to debug, and it seems that the address variable is None so make the thread panicked.
The code is in snark-verifier lib, evm_api.rs.

pub fn verify_evm_proof(deployment_code: Vec<u8>, instances: Vec<Vec<Fr>>, proof: Vec<u8>) -> bool {
    let calldata = encode_calldata(&instances, &proof);
    let mut evm = ExecutorBuilder::default().with_gas_limit(u64::MAX.into()).build();

    let caller = Address::from_low_u64_be(0xfe);

    let verifier = evm.deploy(caller, deployment_code.into(), 0.into()).address.unwrap();
    let result = evm.call_raw(caller, verifier, calldata.into(), 0.into());

    !result.reverted
}

Is scroll-prover provide correct info to snark-verifier so that verifying layer-4 proof correctly?
@lispc could u help me for this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant