correct commiter to committer

This commit is contained in:
thomaslavaur 2024-07-24 08:10:38 +02:00
parent 4907a2c702
commit ca2ff45255
5 changed files with 56 additions and 56 deletions

View File

@ -259,14 +259,14 @@ template anemoi_proof_of_leadership(){
// Compute the note commitment
component note_commiter = commitment_computer();
note_commiter.note_nonce <== note_nonce;
note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_commiter.value <== value;
component note_committer = commitment_computer();
note_committer.note_nonce <== note_nonce;
note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_committer.value <== value;
// Check the commitment membership
component membership_checker = membership_checker();
membership_checker.leaf <== note_commiter.commitment;
membership_checker.leaf <== note_committer.commitment;
membership_checker.root <== commitments_root;
for(var i =0; i<32; i++){
membership_checker.index[i] <== index[i];
@ -289,11 +289,11 @@ template anemoi_proof_of_leadership(){
// Compute the new note commitment
component updated_note_commiter = commitment_computer();
updated_note_commiter.note_nonce <== nonce_updater.updated_nonce;
updated_note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_commiter.value <== value;
updated_commiment <== updated_note_commiter.commitment;
component updated_note_committer = commitment_computer();
updated_note_committer.note_nonce <== nonce_updater.updated_nonce;
updated_note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_committer.value <== value;
updated_commiment <== updated_note_committer.commitment;
}

View File

@ -275,14 +275,14 @@ template anemoi_sha_proof_of_leadership(){
// Compute the note commitment
component note_commiter = commitment_computer();
note_commiter.note_nonce <== note_nonce;
note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_commiter.value <== value;
component note_committer = commitment_computer();
note_committer.note_nonce <== note_nonce;
note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_committer.value <== value;
// Check the commitment membership
component membership_checker = membership_checker();
membership_checker.leaf <== note_commiter.commitment;
membership_checker.leaf <== note_committer.commitment;
membership_checker.root <== commitments_root;
for(var i =0; i<32; i++){
membership_checker.index[i] <== index[i];
@ -305,11 +305,11 @@ template anemoi_sha_proof_of_leadership(){
// Compute the new note commitment
component updated_note_commiter = commitment_computer();
updated_note_commiter.note_nonce <== nonce_updater.updated_nonce;
updated_note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_commiter.value <== value;
updated_commiment <== updated_note_commiter.commitment;
component updated_note_committer = commitment_computer();
updated_note_committer.note_nonce <== nonce_updater.updated_nonce;
updated_note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_committer.value <== value;
updated_commiment <== updated_note_committer.commitment;
}

View File

@ -259,14 +259,14 @@ template poseidon_proof_of_leadership(){
// Compute the note commitment
component note_commiter = commitment_computer();
note_commiter.note_nonce <== note_nonce;
note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_commiter.value <== value;
component note_committer = commitment_computer();
note_committer.note_nonce <== note_nonce;
note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_committer.value <== value;
// Check the commitment membership
component membership_checker = membership_checker();
membership_checker.leaf <== note_commiter.commitment;
membership_checker.leaf <== note_committer.commitment;
membership_checker.root <== commitments_root;
for(var i =0; i<32; i++){
membership_checker.index[i] <== index[i];
@ -289,11 +289,11 @@ template poseidon_proof_of_leadership(){
// Compute the new note commitment
component updated_note_commiter = commitment_computer();
updated_note_commiter.note_nonce <== nonce_updater.updated_nonce;
updated_note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_commiter.value <== value;
updated_commiment <== updated_note_commiter.commitment;
component updated_note_committer = commitment_computer();
updated_note_committer.note_nonce <== nonce_updater.updated_nonce;
updated_note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_committer.value <== value;
updated_commiment <== updated_note_committer.commitment;
}

View File

@ -276,14 +276,14 @@ template poseidon_sha_proof_of_leadership(){
// Compute the note commitment
component note_commiter = commitment_computer();
note_commiter.note_nonce <== note_nonce;
note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_commiter.value <== value;
component note_committer = commitment_computer();
note_committer.note_nonce <== note_nonce;
note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
note_committer.value <== value;
// Check the commitment membership
component membership_checker = membership_checker();
membership_checker.leaf <== note_commiter.commitment;
membership_checker.leaf <== note_committer.commitment;
membership_checker.root <== commitments_root;
for(var i =0; i<32; i++){
membership_checker.index[i] <== index[i];
@ -306,11 +306,11 @@ template poseidon_sha_proof_of_leadership(){
// Compute the new note commitment
component updated_note_commiter = commitment_computer();
updated_note_commiter.note_nonce <== nonce_updater.updated_nonce;
updated_note_commiter.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_commiter.value <== value;
updated_commiment <== updated_note_commiter.commitment;
component updated_note_committer = commitment_computer();
updated_note_committer.note_nonce <== nonce_updater.updated_nonce;
updated_note_committer.nullifier_public_key <== nullifier_secret_key; // TODO: reflect the nullifier public key computation later when defined
updated_note_committer.value <== value;
updated_commiment <== updated_note_committer.commitment;
}

View File

@ -611,22 +611,22 @@ template sha_proof_of_leadership(){
// Compute the note commitment
component note_commiter = commitment_computer();
component note_committer = commitment_computer();
for(var i=0; i<256; i++){
note_commiter.note_nonce[i] <== note_nonce[i];
note_commiter.nullifier_public_key[i] <== nullifier_secret_key[i]; // TODO: reflect the nullifier public key computation later when defined
note_committer.note_nonce[i] <== note_nonce[i];
note_committer.nullifier_public_key[i] <== nullifier_secret_key[i]; // TODO: reflect the nullifier public key computation later when defined
}
note_commiter.v[0] <== 0;
note_commiter.v[1] <== 0;
note_commiter.v[2] <== 0;
note_committer.v[0] <== 0;
note_committer.v[1] <== 0;
note_committer.v[2] <== 0;
for(var i=0; i<253; i++){
note_commiter.v[i+3] <== v[i];
note_committer.v[i+3] <== v[i];
}
// Check the commitment membership
component membership_checker = membership_checker();
for(var i=0; i<256; i++){
membership_checker.commitment[i] <== note_commiter.commitment[i];
membership_checker.commitment[i] <== note_committer.commitment[i];
membership_checker.commitments_root[i] <== commitments_root[i];
for(var j=0; j<32; j++){
if(i==0){
@ -661,19 +661,19 @@ template sha_proof_of_leadership(){
}
// Compute the new note commitment
component updated_note_commiter = commitment_computer();
component updated_note_committer = commitment_computer();
for(var i=0; i<256; i++){
updated_note_commiter.note_nonce[i] <== nonce_updater.updated_nonce[i];
updated_note_commiter.nullifier_public_key[i] <== nullifier_secret_key[i]; // TODO: reflect the nullifier public key computation later when defined
updated_note_committer.note_nonce[i] <== nonce_updater.updated_nonce[i];
updated_note_committer.nullifier_public_key[i] <== nullifier_secret_key[i]; // TODO: reflect the nullifier public key computation later when defined
}
updated_note_commiter.v[0] <== 0;
updated_note_commiter.v[1] <== 0;
updated_note_commiter.v[2] <== 0;
updated_note_committer.v[0] <== 0;
updated_note_committer.v[1] <== 0;
updated_note_committer.v[2] <== 0;
for(var i=0; i<253; i++){
updated_note_commiter.v[i+3] <== v[i];
updated_note_committer.v[i+3] <== v[i];
}
for(var i =0; i<256; i++){
updated_commiment[i] <== updated_note_commiter.commitment[i];
updated_commiment[i] <== updated_note_committer.commitment[i];
}