MCPcopy Create free account
hub / github.com/BitVM/BitVM / get_proof

Function get_proof

bridge/src/proof.rs:14–35  ·  view source on GitHub ↗

TODO: replace with actual implementation

()

Source from the content-addressed store, hash-verified

12
13// TODO: replace with actual implementation
14pub fn get_proof() -> RawProof {
15 type E = Bn254;
16 let k = 6;
17 let mut rng = ark_std::rand::rngs::StdRng::seed_from_u64(test_rng().next_u64());
18 let circuit = DummyCircuit::<<E as Pairing>::ScalarField> {
19 a: Some(<E as Pairing>::ScalarField::rand(&mut rng)),
20 b: Some(<E as Pairing>::ScalarField::rand(&mut rng)),
21 num_variables: 10,
22 num_constraints: 1 << k,
23 };
24 let (pk, vk) = Groth16::<E>::setup(circuit, &mut rng).unwrap();
25
26 let c = circuit.a.unwrap() * circuit.b.unwrap();
27
28 let proof = Groth16::<E>::prove(&pk, circuit, &mut rng).unwrap();
29
30 RawProof {
31 proof,
32 public: vec![c],
33 vk,
34 }
35}
36
37// DO NOT USE IN PRODUCTION! This is a test function.
38pub fn invalidate_proof(valid_proof: &RawProof) -> RawProof {

Callers 3

process_peg_outsMethod · 0.85
get_valid_proofFunction · 0.85

Calls 1

proveFunction · 0.85

Tested by 1

get_valid_proofFunction · 0.68