mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-01-08 08:03:06 +00:00
set the minimum stake amount as an input to enable dynamicity
This commit is contained in:
parent
7f4ccde70f
commit
6c53186245
@ -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('"')
|
||||
|
||||
@ -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);
|
||||
component main {public [commitments_root, minimum_stake]} = anemoi_proof_of_validator(50);
|
||||
@ -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);
|
||||
component main {public [commitments_root, minimum_stake]} = poseidon_proof_of_validator(50);
|
||||
Loading…
x
Reference in New Issue
Block a user