From 7de867d23e59f2adf463dc826ad968b898759631 Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Fri, 11 Mar 2022 14:19:12 +0800 Subject: [PATCH] nullifier 0 for consistency --- poseidon-tornado/src/main.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/poseidon-tornado/src/main.rs b/poseidon-tornado/src/main.rs index f430004..eeea3a0 100644 --- a/poseidon-tornado/src/main.rs +++ b/poseidon-tornado/src/main.rs @@ -57,12 +57,12 @@ fn groth16_proof_example() -> Result<()> { // From poseidon-tornado JSON witness let input_json_str = r#" { - "root": "997081082615117049959303490727516834793837256674870965970007115055033892616", - "nullifierHash": "13905360060976153554846115832161423551611834206350930827157109583498962839437", + "root": "17777834528943231885798890273562835075271930126129561600279382876922601684948", + "nullifierHash": "8506691148847834795277894036216352001616813487121834991716343668271924769133", "recipient": "344073830386746567427978432078835137280280269756", "relayer": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "fee": 0, - "nullifier": "1249796195936770466725690800614346988", + "nullifier": "0", "pathElements": [ "21663839004416932945382355908790599225266501822907911457504978515578255421292", "8995896153219992062710898675021891003404871425075198597897889079729967997688", @@ -85,8 +85,7 @@ fn groth16_proof_example() -> Result<()> { "4236715569920417171293504597566056255435509785944924295068274306682611080863", "8055374341341620501424923482910636721817757020788836089492629714380498049891" ], - "pathIndices": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] -} + "pathIndices": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]} "#; let witness_input : WitnessInput = serde_json::from_str(input_json_str).expect("JSON was not well-formatted"); @@ -185,6 +184,8 @@ fn groth16_proof_example() -> Result<()> { let inputs = circom.get_public_inputs().unwrap(); + println!("Inputs {:#?} ", inputs); + let proof = prove(circom, ¶ms, &mut rng)?; let pvk = prepare_verifying_key(¶ms.vk);