Skip to content

feat: use RLN with RC instead of Poseidon - #14

Open
rymnc wants to merge 1 commit into
mainfrom
rln-with-rc
Open

feat: use RLN with RC instead of Poseidon#14
rymnc wants to merge 1 commit into
mainfrom
rln-with-rc

Conversation

@rymnc

@rymnc rymnc commented Nov 13, 2023

Copy link
Copy Markdown

With the implementation of the RC hash in circom, we can substitute it instead of Poseidon in the calculation of -
a. identityCommitment
b. rateCommitment
c. a1
d. levelHashes in the MerkleInclusionProof

Here's the diff of constraints for both the RLN and withdraw circuits

  1. RLN Circuit =>
circom compiler 2.1.5
-template instances: 216
+template instances: 48
-non-linear constraints: 5820
+non-linear constraints: 957
linear constraints: 0
public inputs: 2
public outputs: 3
private inputs: 43
private outputs: 0
-wires: 5844
+wires: 1053
-labels: 18553
+labels: 24733
  1. Withdraw Circuit =>
circom compiler 2.1.5
-template instances: 71
+template instances: 42
-non-linear constraints: 214
+non-linear constraints: 37
linear constraints: 0
public inputs: 1
public outputs: 1
private inputs: 1
private outputs: 0
-wires: 217
+wires: 43
-labels: 585
+labels: 1021

@rymnc rymnc self-assigned this Nov 13, 2023
@rymnc

rymnc commented Nov 13, 2023

Copy link
Copy Markdown
Author

Tests fail since there is no RC implementation in js - I can add a known answer test if you'd like :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant