Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Sep 22, 2023
1 parent 0766efd commit 9b55872
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Binary file modified rln/resources/tree_height_20/rln_final.zkey
Binary file not shown.
8 changes: 4 additions & 4 deletions rln/resources/tree_height_20/verification_key.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
],
"vk_delta_2": [
[
"19381091659114342708346442379630615922843118562844893610615650294875683946211",
"15552996376058085216886912770055643184213525326040483512352171392245952819143"
"2523581523345602438870592273365560551114006786853353630648371815743722144008",
"18201825774727718770391031007318017629555656373887006469663259302300143440513"
],
[
"12588624700930877548123639492983751769950518160033583190559237442988989476511",
"21566485901320212986683930067069402517509385157875328621749793094655522223502"
"5555492782190641081486842663439173269556909097391063082057561395406903046573",
"6213830102935228858407835261748786097510923072127639422826994862320478810789"
],
[
"1",
Expand Down
8 changes: 4 additions & 4 deletions rln/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ pub fn inputs_for_witness_calculation(
) -> Result<[(&str, Vec<BigInt>); 7]> {
message_id_range_check(&rln_witness.message_id, &rln_witness.user_message_limit)?;

// We confert the path indexes to field elements
// We convert the path indexes to field elements
// TODO: check if necessary
let mut path_elements = Vec::new();

Expand Down Expand Up @@ -750,11 +750,11 @@ pub fn verify_proof(
) -> Result<bool, ProofError> {
// We re-arrange proof-values according to the circuit specification
let inputs = vec![
proof_values.x,
proof_values.external_nullifier,
proof_values.y,
proof_values.root,
proof_values.nullifier,
proof_values.x,
proof_values.external_nullifier,
];

// Check that the proof is valid
Expand Down Expand Up @@ -801,7 +801,7 @@ pub fn get_json_inputs(rln_witness: &RLNWitnessInput) -> Result<serde_json::Valu
"path_elements": path_elements,
"identity_path_index": identity_path_index,
"x": to_bigint(&rln_witness.x)?.to_str_radix(10),
"external_nullifier": format!("0x{:064x}", to_bigint(&rln_witness.external_nullifier)?),
"external_nullifier": to_bigint(&rln_witness.external_nullifier)?.to_str_radix(10),
"user_message_limit": to_bigint(&rln_witness.user_message_limit)?.to_str_radix(10),
"message_id": to_bigint(&rln_witness.message_id)?.to_str_radix(10),
});
Expand Down

0 comments on commit 9b55872

Please sign in to comment.