@@ -70,7 +70,8 @@ fn create_coins_sks(len : usize) ->
//let (leaf_pos, path) = tree.authentication_path(leaf_position.unwrap()).unwrap();
let path = tree.authentication_path(leaf_position.unwrap()).unwrap();
//note root sk is at tree.root()
- root_sks.push(node);
+ //root_sks.push(node);
+ root_sks.push(tree.root());
path_sks.push(path.as_slice().try_into().unwrap());
}
(root_sks, path_sks)
@@ -59,7 +59,7 @@ pub fn create_lead_proof(
let public_inputs = coin.public_inputs();
let proof = Proof::create(&pk, &[contract], &public_inputs, &mut OsRng)?;
debug!("Prove lead: [{:?}]", start.elapsed());
- Ok((proof))
+ Ok(proof)
pub fn verify_lead_proof(
@@ -599,8 +599,8 @@ impl Circuit<pallas::Base> for LeadContract {
)?;
let node = MerkleNode::from_bytes(&self.root_sk.unwrap().to_repr()).unwrap();
- let serialized = serde_json::to_string(&node).unwrap();
- println!("serialized: {}", serialized);
+ //let serialized = serde_json::to_string(&node).unwrap();
+ //println!("root_sk: {}", serialized);
//TODO (research) this multiplication panics!
let y_commit_exp = ar_chip.mul(