-
Notifications
You must be signed in to change notification settings - Fork 154
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
test(benchmarks): add benchmarks for proof generation #1082
Conversation
✅ Deploy Preview for maci-typedoc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
256fe63
to
e5acdc8
Compare
e5acdc8
to
ca102f5
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 few comments.
|
||
const NAME = "proof generation"; | ||
|
||
// eslint-disable-next-line @typescript-eslint/require-await |
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 you need to return promise if there is no await?
for (let i = 0; i < users.length; i += 1) { | ||
const keypair = users[i]; | ||
maciState.signUp(keypair.pubKey, voiceCreditBalance, BigInt(Date.now())); | ||
|
||
// First command (valid) | ||
const command = new PCommand( | ||
BigInt(i) + 1n, | ||
keypair.pubKey, | ||
5n, // voteOptionIndex, | ||
7n, // vote weight | ||
2n, // nonce | ||
pollId, | ||
); | ||
|
||
const signature = command.sign(keypair.privKey); | ||
|
||
const ecdhKeypair = new Keypair(); | ||
const sharedKey = Keypair.genEcdhSharedKey(ecdhKeypair.privKey, coordinatorKeypair.pubKey); | ||
const message = command.encrypt(signature, sharedKey); | ||
poll?.publishMessage(message, ecdhKeypair.pubKey); | ||
} |
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.
Seems this one is duplicated too.
c3b1e4b
to
80e9f6f
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.
thanks!
wanna ask if we wanna gitignore the benchmark output?
08a9886
to
fed3612
Compare
fed3612
to
6a5b353
Compare
Closing for now as most of the code is outdated |
Description
Add benchmarks that compare how much time it takes to generate proofs for different number of signups and messages. Both using WASM and Rapidsnark with c witness gen.
Related issue(s)
Re: #1081
Confirmation