-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: voice credits per poll #1967
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3e2ac79
to
73dcbaa
Compare
73dcbaa
to
f28a05d
Compare
f28a05d
to
a1c9341
Compare
a1c9341
to
d7a2143
Compare
d7a2143
to
81ca56d
Compare
81ca56d
to
8bfcda7
Compare
f1779f5
to
58ac013
Compare
58ac013
to
e0a554f
Compare
e0a554f
to
e74ea08
Compare
e74ea08
to
496a934
Compare
496a934
to
8ed05c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctrlc03 thanks, just some questions and minor suggestions
@@ -10,3 +10,5 @@ export const SNARK_FIELD_SIZE = r; | |||
export const NOTHING_UP_MY_SLEEVE = BigInt(keccak256(toUtf8Bytes("Maci"))) % SNARK_FIELD_SIZE; | |||
|
|||
assert(NOTHING_UP_MY_SLEEVE === BigInt("8370432830353022751713833565135785980866757267633941821328460903436894336785")); | |||
|
|||
export const PAD_KEY_HASH = BigInt("1309255631273308531193241901289907343161346846555918942743921933037802809814"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use exactly this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the poseidon hash of the the PAD_KEY (https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/contracts/contracts/crypto/SnarkConstants.sol#L12) - it's the same key that was part of the blank state leaf, and now because we only need to store the key at the maci state tree, we can directly use this value as init value for the tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed the last two lines of this comment are not accurate (https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/contracts/contracts/crypto/SnarkConstants.sol#L18-L19), that hash starting 67 refers to the hash of the blank state leaf
8ed05c4
to
00e9328
Compare
Description
Add custom credits per each poll
Related issue(s)
fix #1854
Confirmation