diff --git a/proof_of_validator/circom/generate_inputs.py b/proof_of_validator/circom/generate_inputs.py index 2a5ac62..77fd8ef 100755 --- a/proof_of_validator/circom/generate_inputs.py +++ b/proof_of_validator/circom/generate_inputs.py @@ -1243,6 +1243,7 @@ if merkle_hash == "Poseidon2": with open("input.json", "w") as file: file.write('{\n\t"commitments_root" :\t\t"'+str(commitment_root)+'",') + file.write('{\n\t"minimum_stake" :\t\t"'+str(minimum_stake)+'",') file.write('\n\t"constraints" :\t\t\t\t[') for i in range(maximum_number_of_note): file.write('"') diff --git a/proof_of_validator/circom/validator_anemoi.circom b/proof_of_validator/circom/validator_anemoi.circom index 24dfaa0..8a3bcfb 100644 --- a/proof_of_validator/circom/validator_anemoi.circom +++ b/proof_of_validator/circom/validator_anemoi.circom @@ -110,8 +110,9 @@ template membership_checker(){ } -template anemoi_proof_of_validator(max_notes, minimum_stake){ //TODO: put minimum_stake in the input to change it dynamically +template anemoi_proof_of_validator(max_notes){ signal input commitments_root; + signal input minimum_stake; // Note variables signal input constraints[max_notes]; // Every note field represented as F_p elements for now (constraints are represented by their Merkle root) @@ -222,4 +223,4 @@ template anemoi_proof_of_validator(max_notes, minimum_stake){ //TODO: put mini } -component main {public [commitments_root]} = anemoi_proof_of_validator(50,10000); \ No newline at end of file +component main {public [commitments_root, minimum_stake]} = anemoi_proof_of_validator(50); \ No newline at end of file diff --git a/proof_of_validator/circom/validator_poseidon.circom b/proof_of_validator/circom/validator_poseidon.circom index 45de11a..c6f2d4d 100644 --- a/proof_of_validator/circom/validator_poseidon.circom +++ b/proof_of_validator/circom/validator_poseidon.circom @@ -110,8 +110,9 @@ template membership_checker(){ } -template poseidon_proof_of_validator(max_notes, minimum_stake){ //TODO: put minimum_stake in the input to change it dynamically +template poseidon_proof_of_validator(max_notes){ signal input commitments_root; + signal input minimum_stake; // Note variables signal input constraints[max_notes]; // Every note field represented as F_p elements for now (constraints are represented by their Merkle root) @@ -223,4 +224,4 @@ template poseidon_proof_of_validator(max_notes, minimum_stake){ //TODO: put } -component main {public [commitments_root]} = poseidon_proof_of_validator(50,10000); \ No newline at end of file +component main {public [commitments_root, minimum_stake]} = poseidon_proof_of_validator(50); \ No newline at end of file