-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(circuits): remove circomlib fork in favour of latest and zk-kit
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
Showing
87 changed files
with
1,051 additions
and
739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pragma circom 2.0.0; | ||
|
||
// local imports | ||
include "./verifySignature.circom"; | ||
include "./utils.circom"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...s/circom/test/processMessages_test.circom → ...test/ProcessMessages_10-2-1-2_test.circom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
pragma circom 2.0.0; | ||
|
||
include "../processMessages.circom"; | ||
|
||
/* | ||
stateTreeDepth, | ||
msgTreeDepth, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
4 changes: 1 addition & 3 deletions
4
circuits/circom/test/tallyVotes_test.circom → ...circom/test/TallyVotes_10-1-2_test.circom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
circuits/circom/test/ceremonyParams/processMessages_test.circom
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.