-
Notifications
You must be signed in to change notification settings - Fork 159
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(deployer): add service in maci repo #2138
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/coordinator/ts/auth/__tests__/AccountSignatureGuard.test.ts
Dismissed
Show dismissed
Hide dismissed
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, I left some comments to address
"download-zkeys:latest": "pnpm run run:node ./scripts/downloadZKeys.ts latest ./zkeys", | ||
"download-zkeys:test": "pnpm run run:node ./scripts/downloadZKeys.ts test ./zkeys", | ||
"download-zkeys:prod": "pnpm run run:node ./scripts/downloadZKeys.ts prod ./zkeys", | ||
"upload-round-metadata": "pnpm run run:node ./scripts/uploadRoundMetadata.ts", |
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.
let's remove upload-round-metadata (was for maci platform only)
@@ -0,0 +1,9 @@ | |||
{ |
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.
remove
@@ -0,0 +1,166 @@ | |||
import { put } from "@vercel/blob"; |
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.
remove
|
||
expect(response.status).toBe(201); | ||
// TODO: check MACI address is valid | ||
// TODO: should we check that subgraph is working? |
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.
subgraph is optional, let's focus deploy tests on contract deployment only
gatekeeper: { | ||
type: EGatekeepers.FreeForAll, | ||
}, | ||
initialVoiceCreditsProxy: { |
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.
voice credit proxy not needed at the maci level but poll level only
config.pollDuration, | ||
{ | ||
intStateTreeDepth: config.intStateTreeDepth, | ||
messageTreeSubDepth: config.messageTreeSubDepth, |
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.
in maci v3 there is no messageTreeSubDepth nor messageTreeDepth - it's messageBatchSize only
/** | ||
* Determines the message batch size | ||
*/ | ||
messageTreeSubDepth: number; |
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.
remove messageTreeSubDepth and messageTreeDepth - it's only messageBatchSize
await prover.submitResults(tallyData, Number.parseInt(recipientCount.toString(), 10)); | ||
*/ | ||
// submit results | ||
await prover.submitResults(tallyData, Number.parseInt(numSignUps.toString(), 10)); |
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 would not work cause num signups can be way more than vote options. use this variable https://github.com/privacy-scaling-explorations/maci/blob/dev/packages/contracts/contracts/Poll.sol#L179
@@ -0,0 +1,9 @@ | |||
# Session Keys module | |||
|
|||
This module is responsible for session keys management. These keys (private are stored in the service, public are sent to the client) are used to generate the ZeroDev KernelClient. This way we are not storing any master keypair in the server that could be stolen. The point of these sessions keys were that they would be short-lived (~2min). All its endpoints are protected by the `AccountSignatureGuard` middleware, which checks the signature of the request against the `COORDINATOR_ADDRESSES` environment variable. |
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.
I'm thinking that eventually we could even remove the account signature guard from certain endpoints like deployment as with the session key flow we use the initiator account not the coordinator one (we'd need to properly manage local storage of deployed addresses though as calls by others could cause deletion of the json file) but for now this works
* Chain Name | ||
*/ | ||
@ApiProperty({ | ||
description: "Chain to which to deploy the contract(s)", |
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.
guess this comment is not accurate? it's DeactivateSessionKeyDto so maybe should be related to deactivation?
@@ -0,0 +1,73 @@ | |||
# Rate limit configuation |
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.
let's put coordinator in apps/ not packages/
# RPC API KEY for Alchemy | ||
RPC_API_KEY="" | ||
|
||
# A private key for e2e tests (in formate 0x${private_key}) |
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.
typo: format
Description
We are moving the coordinator service (built in NestJS) to the MACI protocol repository. This service allows users to deploy MACI and polls using a easy-to-use REST API service.
Pending
Related issue(s)
Confirmation
Important
We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team.