-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
Remove circomlib fork for poseidon decryption circuit, and use zk-kit instead. Also update circomlib to the latest version and use circomkit for circuits management and testing fix #772
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"processMessages": { | ||
"file": "processMessages", | ||
"template": "ProcessMessages", | ||
"params": [6, 8, 2, 3], | ||
"pubs": ["inputHash"] | ||
}, | ||
"ProcessMessages_10-2-1-2_test": { | ||
"file": "processMessages", | ||
"template": "ProcessMessages", | ||
"params": [10, 2, 1, 2], | ||
"pubs": ["inputHash"] | ||
}, | ||
"tallyVotes": { | ||
"file": "tallyVotes", | ||
"template": "TallyVotes", | ||
"params": [6, 2, 3], | ||
"pubs": ["inputHash"] | ||
}, | ||
"TallyVotes_10-1-2_test": { | ||
"file": "tallyVotes", | ||
"template": "TallyVotes", | ||
"params": [10, 1, 2], | ||
"pubs": ["inputHash"] | ||
}, | ||
"SubsidyPerBatch_10-1-2_test": { | ||
"file": "subsidy", | ||
"template": "SubsidyPerBatch", | ||
"params": [10, 1, 2], | ||
"pubs": ["inputHash"] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "./hasherPoseidon.circom"; | ||
|
||
// hash a MACI message together with the public key | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "./verifySignature.circom"; | ||
include "./utils.circom"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pragma circom 2.0.0; | ||
|
||
// https://github.com/weijiekoh/circomlib/blob/feat/poseidon-encryption/circuits/poseidon.circom | ||
include "./poseidon-cipher.circom"; | ||
|
||
template Poseidon_OLD(nInputs) { | ||
signal input inputs[nInputs]; | ||
signal output out; | ||
|
||
component strategy = PoseidonPerm(nInputs + 1); | ||
strategy.inputs[0] <== 0; | ||
for (var i = 0; i < nInputs; i++) { | ||
strategy.inputs[i + 1] <== inputs[i]; | ||
} | ||
out <== strategy.out[0]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "../processMessages.circom"; | ||
|
||
/* | ||
stateTreeDepth, | ||
msgTreeDepth, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "../subsidy.circom"; | ||
|
||
component main {public [inputHash]} = SubsidyPerBatch(10, 1, 2); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "../tallyVotes.circom"; | ||
|
||
component main {public [inputHash]} = TallyVotes(10, 1, 2); | ||
/*stateTreeDepth,*/ | ||
/*intStateTreeDepth,*/ | ||
/*voteOptionTreeDepth*/ |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.