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

How to run the examples #383

Closed
mikedoan opened this issue Oct 15, 2019 · 5 comments · Fixed by #384
Closed

How to run the examples #383

mikedoan opened this issue Oct 15, 2019 · 5 comments · Fixed by #384

Comments

@mikedoan
Copy link

Congratulations on this repo!

I'm very excited and try to check out but the followings does not work for me. It does not finish and I have to stop it.

cargo run --example large_fib
@mikedoan
Copy link
Author

Thank you for following up in twitter @recmo - here is what i got.

Minhs-MacBook-Pro:OpenZKP minhdoan$ cargo run --release --example large_fib
    Finished release [optimized] target(s) in 0.05s
     Running `target/release/examples/large_fib`
thread 'main' panicked at 'Proof failed: VerificationFailed(OodsMismatch)', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Minhs-MacBook-Pro:OpenZKP minhdoan$ RUST_BACKTRACE=1 cargo run --release --example large_fib
    Finished release [optimized] target(s) in 0.15s
     Running `target/release/examples/large_fib`
thread 'main' panicked at 'Proof failed: VerificationFailed(OodsMismatch)', src/libcore/result.rs:1084:5
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::continue_panic_fmt
   3: rust_begin_unwind
   4: core::panicking::panic_fmt
   5: core::result::unwrap_failed
   6: large_fib::main
   7: std::rt::lang_start::{{closure}}
   8: main

Screen Shot 2019-10-15 at 4 10 34 PM

@recmo
Copy link
Contributor

recmo commented Oct 16, 2019

Than you for reporting! The large_fib is called 'large' because it computes a proof of substantial size. There is also a small_fib, which should run in about one second. It's insightful to run the examples with more verbosity using the RUST_LOG=info environment variable:

RUST_LOG=info cargo run --release --example small_fib

It looks like large_fib has a bug in it. I will look into it.

This was referenced Oct 16, 2019
@recmo recmo reopened this Oct 16, 2019
@recmo
Copy link
Contributor

recmo commented Oct 16, 2019

Sorry, GitHub autoclosed it because PR #384 references this issue and was merged into master.

large_fib indeed contained a small bug (the millionth Fibonacci number in the claim was not set), which is now fixed in master.

@mikedoan Can you check if it is fixed now in master?

@recmo
Copy link
Contributor

recmo commented Oct 16, 2019

large_fib now works for me, taking ~30 sec on 8 cores and 2GB RAM in release mode.

RUST_LOG=info cargo run --release --example large_fib

Without --release it takes 15 minutes, so about 30x slower. The small_fib example goes from ~1 sec to ~30 sec (most of which is in the proof of work).

@mikedoan
Copy link
Author

It's working now for me. Thanks for fixing this

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

Successfully merging a pull request may close this issue.

2 participants