Skip to content

Commit

Permalink
Updated artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Sep 18, 2023
1 parent 32f77ab commit 0766efd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
Binary file modified rln/resources/tree_height_20/rln.wasm
Binary file not shown.
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": [
[
"17077735495685170943380938230836408503627170115414840315502244846025577589191",
"14030085636943255545683322474441991939484590437387381169642530788494152024614"
"19381091659114342708346442379630615922843118562844893610615650294875683946211",
"15552996376058085216886912770055643184213525326040483512352171392245952819143"
],
[
"11568745146423307387256571230823432454624378106569286849514884592874522611163",
"1838524899938769516485895655063198583192139511330418290063560641219523306282"
"12588624700930877548123639492983751769950518160033583190559237442988989476511",
"21566485901320212986683930067069402517509385157875328621749793094655522223502"
],
[
"1",
Expand Down
4 changes: 3 additions & 1 deletion rln/src/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ impl RLN<'_> {
let (rln_witness, _) = proof_inputs_to_rln_witness(&mut self.tree, &witness_byte)?;
let proof_values = proof_values_from_witness(&rln_witness)?;

dbg!(&proof_values.root);

let proof = generate_proof(self.witness_calculator, &self.proving_key, &rln_witness)?;

// Note: we export a serialization of ark-groth16::Proof not semaphore::Proof
Expand Down Expand Up @@ -1696,7 +1698,7 @@ mod test {

// We set as leaf rate_commitment after storing its index
let identity_index = rln.tree.leaves_set();
let user_message_limit = Fr::from(100);
let user_message_limit = Fr::from(65535);
let rate_commitment = utils_poseidon_hash(&[id_commitment, user_message_limit]);
let mut buffer = Cursor::new(fr_to_bytes_le(&rate_commitment));
rln.set_next_leaf(&mut buffer).unwrap();
Expand Down
12 changes: 7 additions & 5 deletions rln/tests/public.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#[cfg(test)]
mod test {
use ark_ff::BigInt;
use ark_std::{rand::thread_rng, UniformRand};
use rand::Rng;
use rln::circuit::{Fr, TEST_RESOURCES_FOLDER, TEST_TREE_HEIGHT};
Expand Down Expand Up @@ -38,11 +39,12 @@ mod test {
if TEST_TREE_HEIGHT == 20 {
assert_eq!(
root,
str_to_fr(
"0x21947ffd0bce0c385f876e7c97d6a42eec5b1fe935aab2f01c1f8a8cbcc356d2",
16
)
.unwrap()
Fr::from(BigInt([
17110646155607829651,
5040045984242729823,
6965416728592533086,
2328960363755461975
]))
);
} else if TEST_TREE_HEIGHT == 32 {
assert_eq!(
Expand Down

0 comments on commit 0766efd

Please sign in to comment.