microsoft / Spartan

Spartan: High-speed zkSNARKs without trusted setup
MIT License
689 stars 119 forks source link

[E0061] in readme.md Examples produce a proof of satisfiability #52

Closed HLRJ closed 1 year ago

HLRJ commented 2 years ago
// produce a proof of satisfiability
let proof = SNARK::prove(&inst, &comm, &decomm, vars, &inputs, &gens, &mut prover_transcript);

This function takes 6 parameters but 7 parameters were supplied [E0061]

===>

let proof = SNARK::prove(&inst, &decomm, vars, &inputs, &gens, &mut prover_transcript);
  /// A method to produce a SNARK proof of the satisfiability of an R1CS instance
  pub fn prove(
    inst: &Instance,
    decomm: &ComputationDecommitment,
    vars: VarsAssignment,
    inputs: &InputsAssignment,
    gens: &SNARKGens,
    transcript: &mut Transcript,
  ) -> Self {}
srinathsetty commented 2 years ago

@HLRJ thanks for the report!

With nightly Rust, when you run cargo test, it runs code in README.md and I get the following successful output: Doc-tests libspartan running 3 tests test src/lib.rs - (line 105) ... ok test src/lib.rs - (line 74) ... ok test src/lib.rs - (line 39) ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 13.81s

Can you please tell me how to reproduce the error?

(Note that I also just published a new version on crates.io (version 0.7.0), with the latest code.)

srinathsetty commented 1 year ago

Closing this for lack of activity. Please reopen this if you find any new issues.