refactored the names, added the one-time-key for signing, and added the public inputs

This commit is contained in:
thomaslavaur 2025-03-26 13:07:37 +01:00
parent 6f94e8da43
commit 7e78eb812d
2 changed files with 8 additions and 1 deletions

View File

@ -82,6 +82,12 @@ template payment_proof_of_leadership(){
signal input value;
signal input nonce;
signal input one_time_key;
//Avoid the circom optimisation that removes unused public input
signal dummy;
dummy <== one_time_key * one_time_key;
signal output entropy_contrib;
@ -194,4 +200,4 @@ template payment_proof_of_leadership(){
entropy_contrib <== entropy.out;
}
component main = payment_proof_of_leadership();
component main {public [slot,epoch_nonce,t0,t1,commitments_root,nullifiers_root,one_time_key]}= payment_proof_of_leadership();

View File

@ -280,6 +280,7 @@ with open("input.json", "w") as file:
file.write('\n\t"t0" :\t\t\t\t\t\t"'+str(t0)+'",')
file.write('\n\t"t1" :\t\t\t\t\t\t"'+str(t1)+'",')
file.write('\n\t"slot_secret" :\t\t\t\t\t\t"'+str(slot_secret)+'",')
file.write('\n\t"one_time_key" :\t\t\t\t\t\t"'+str(F(516548))+'",')
file.write('\n\t"slot_secret_path" :\t\t\t\t\t[')
for i in range(25):
file.write('"')