-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(relayer): add auth guard for message publishing
- [x] Add authorization guard - [x] Add more e2e tests with real scenarios - [x] Update cli join poll - [x] Update public circuit inputs for poll contract - [x] Update poll joined offchain circuit inputs - [x] Use actual state tree depth for poll joined circuit - [x] Save poll state tree roots for public inputs onchain
- Loading branch information
Showing
31 changed files
with
607 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ PORT= | |
|
||
# Mnemonic phrase | ||
MNEMONIC="" | ||
|
||
MAX_MESSAGES=20 |
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,3 +1,6 @@ | ||
build/ | ||
coverage/ | ||
.env | ||
zkeys | ||
deploy-config.json | ||
deployed-contracts.json |
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,38 @@ | ||
import { homedir } from "os"; | ||
import path from "path"; | ||
import url from "url"; | ||
|
||
export const STATE_TREE_DEPTH = 10; | ||
export const INT_STATE_TREE_DEPTH = 1; | ||
export const VOTE_OPTION_TREE_DEPTH = 2; | ||
export const MESSAGE_BATCH_SIZE = 20; | ||
|
||
export const dirname = url.fileURLToPath(new URL(".", import.meta.url)); | ||
|
||
export const pollJoiningZkey = path.resolve(dirname, "../zkeys/PollJoining_10_test/PollJoining_10_test.0.zkey"); | ||
export const pollJoinedZkey = path.resolve(dirname, "../zkeys/PollJoined_10_test/PollJoined_10_test.0.zkey"); | ||
export const pollWasm = path.resolve( | ||
dirname, | ||
"../zkeys/PollJoining_10_test/PollJoining_10_test_js/PollJoining_10_test.wasm", | ||
); | ||
export const pollWitgen = path.resolve( | ||
dirname, | ||
"../zkeys/PollJoining_10_test/PollJoining_10_test_cpp/PollJoining_10_test", | ||
); | ||
export const pollJoinedWasm = path.resolve( | ||
dirname, | ||
"../zkeys/PollJoined_10_test/PollJoined_10_test_js/PollJoined_10_test.wasm", | ||
); | ||
export const pollJoinedWitgen = path.resolve( | ||
dirname, | ||
"../zkeys/PollJoined_10_test/PollJoined_10_test_cpp/PollJoined_10_test", | ||
); | ||
export const rapidsnark = `${homedir()}/rapidsnark/build/prover`; | ||
export const processMessagesZkeyPathNonQv = path.resolve( | ||
dirname, | ||
"../zkeys/ProcessMessagesNonQv_10-20-2_test/ProcessMessagesNonQv_10-20-2_test.0.zkey", | ||
); | ||
export const tallyVotesZkeyPathNonQv = path.resolve( | ||
dirname, | ||
"../zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test.0.zkey", | ||
); |
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
Oops, something went wrong.