Skip to content

Commit

Permalink
chore (merge) - promote staging to prod (#182)
Browse files Browse the repository at this point in the history
* chore (merge) - merge dev into staging (#163)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

---------

Co-authored-by: Daehyun Paik <[email protected]>

* Promote to staging from dev (#166)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

* fix(ci): missing environment specifier in cli publish workflow

---------

Co-authored-by: ctrlc03 <[email protected]>

* chore(merge) - merge dev into staging (#170)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

* fix(ci): missing environment specifier in cli publish workflow

* fix(timeout): fix issue with timing out while in upload phase

---------

Co-authored-by: Daehyun Paik <[email protected]>

* chore (merge) - dev to staging (#174)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

* fix(ci): missing environment specifier in cli publish workflow

* fix(timeout): fix issue with timing out while in upload phase

* fix(finalization): fix various bugs and add non interactive auth

* build(cleanup): removed puppeteer and related tests

---------

Co-authored-by: Daehyun Paik <[email protected]>

* [release/v1.0.7] Promote dev to staging (#176)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

* fix(ci): missing environment specifier in cli publish workflow

* fix(timeout): fix issue with timing out while in upload phase

* fix(finalization): fix various bugs and add non interactive auth

* build(cleanup): removed puppeteer and related tests

* chore(release): publish 1.0.7

---------

Co-authored-by: ctrlc03 <[email protected]>
Co-authored-by: daodesigner <[email protected]>

* chore (merge) - dev to staging (#181)

* fix(setup): remove S3 usage and download from URL

* fix(imports): use adoby-node-fetch

* fix(vm): stop vm even on verification failing

* feat(contribute): cli flag for auth token (run on VM)

* fix(vm): fix VM setup

* ci: update string literals in ts files for staging/dev environment

* fix(ci): missing environment specifier in cli publish workflow

* fix(timeout): fix issue with timing out while in upload phase

* fix(finalization): fix various bugs and add non interactive auth

* build(cleanup): removed puppeteer and related tests

* chore(release): publish 1.0.7

* refactor(ui/ux): small changes for a better ui/ux

* refactor(ui/ux): add information about private profiles failing sybil checks

* fix(ui): fix wording

* chore(release): publish 1.0.8

---------

Co-authored-by: Daehyun Paik <[email protected]>
Co-authored-by: daodesigner <[email protected]>

---------

Co-authored-by: Daehyun Paik <[email protected]>
Co-authored-by: daodesigner <[email protected]>
  • Loading branch information
3 people authored Aug 25, 2023
1 parent 0cc9afa commit a50a645
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages/*"
],
"npmClient": "yarn",
"version": "1.0.7",
"version": "1.0.8",
"changelogPreset": {
"name": "conventionalcommits",
"issuePrefixes": [
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@p0tion/actions",
"version": "1.0.7",
"version": "1.0.8",
"description": "A set of actions and helpers for CLI commands",
"repository": "[email protected]:privacy-scaling-explorations/p0tion.git",
"homepage": "https://github.com/privacy-scaling-explorations/p0tion",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export const getPublicAttestationPreambleForContributor = (
) =>
`Hey, I'm ${contributorIdentifier} and I have ${
isFinalizing ? "finalized" : "contributed to"
} the ${ceremonyName} MPC Phase2 Trusted Setup ceremony.\nThe following are my contribution signatures:`
} the ${ceremonyName}${ceremonyName.toLowerCase().includes('trusted setup') || ceremonyName.toLowerCase().includes("ceremony") ? "." : " MPC Phase2 Trusted Setup ceremony."}\nThe following are my contribution signatures:`

/**
* Check and prepare public attestation for the contributor made only of its valid contributions.
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@p0tion/backend",
"version": "1.0.7",
"version": "1.0.8",
"description": "MPC Phase 2 backend for Firebase services management",
"repository": "[email protected]:privacy-scaling-explorations/p0tion.git",
"homepage": "https://github.com/privacy-scaling-explorations/p0tion",
Expand Down Expand Up @@ -67,7 +67,7 @@
"@aws-sdk/client-ssm": "^3.357.0",
"@aws-sdk/middleware-endpoint": "^3.329.0",
"@aws-sdk/s3-request-presigner": "^3.329.0",
"@p0tion/actions": "^1.0.7",
"@p0tion/actions": "^1.0.8",
"blakejs": "^1.2.1",
"dotenv": "^16.0.3",
"ethers": "5.7.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/phase2cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@p0tion/phase2cli",
"type": "module",
"version": "1.0.7",
"version": "1.0.8",
"description": "All-in-one interactive command-line for interfacing with zkSNARK Phase 2 Trusted Setup ceremonies",
"repository": "[email protected]:privacy-scaling-explorations/p0tion.git",
"homepage": "https://github.com/privacy-scaling-explorations/p0tion",
Expand Down Expand Up @@ -68,7 +68,7 @@
"@octokit/auth-oauth-app": "^5.0.5",
"@octokit/auth-oauth-device": "^4.0.4",
"@octokit/request": "^6.2.3",
"@p0tion/actions": "^1.0.7",
"@p0tion/actions": "^1.0.8",
"blakejs": "^1.2.1",
"boxen": "^7.1.0",
"chalk": "^5.2.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/phase2cli/src/commands/contribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,8 @@ export const listenToParticipantDocumentChanges = async (
participant,
entropy,
providerUserId,
false // not finalizing.
false, // not finalizing.
circuits.length
)
}
// Scenario (3.A).
Expand Down Expand Up @@ -949,7 +950,7 @@ const contribute = async (opt: any) => {
const userData = userDoc.data()
if (!userData) {
spinner.fail(
`Unfortunately we could not find a user document with your information. This likely means that you did not pass the GitHub reputation checks and therefore are not elegible to contribute to any ceremony. Please contact the coordinator if you believe this to be an error.`
`Unfortunately we could not find a user document with your information. This likely means that you did not pass the GitHub reputation checks and therefore are not elegible to contribute to any ceremony. If you believe you pass the requirements, it might be possible that your profile is private and we were not able to fetch your real statistics, in this case please consider making your profile public for the duration of the contribution. Please contact the coordinator if you believe this to be an error.`
)
process.exit(0)
}
Expand Down
10 changes: 7 additions & 3 deletions packages/phase2cli/src/commands/finalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const handleVerifierSmartContract = async (
* @param participant <FirebaseDocumentInfo> - the Firestore document of the participant (coordinator).
* @param beacon <string> - the value used to compute the final contribution while finalizing the ceremony.
* @param coordinatorIdentifier <string> - the identifier of the coordinator.
* @param circuitsLength <number> - the number of circuits in the ceremony.
*/
export const handleCircuitFinalization = async (
cloudFunctions: Functions,
Expand All @@ -160,7 +161,8 @@ export const handleCircuitFinalization = async (
circuit: FirebaseDocumentInfo,
participant: FirebaseDocumentInfo,
beacon: string,
coordinatorIdentifier: string
coordinatorIdentifier: string,
circuitsLength: number
) => {
// Step (1).
await handleStartOrResumeContribution(
Expand All @@ -171,7 +173,8 @@ export const handleCircuitFinalization = async (
participant,
computeSHA256ToHex(beacon),
coordinatorIdentifier,
true
true,
circuitsLength
)

await sleep(2000) // workaound for descriptors.
Expand Down Expand Up @@ -307,7 +310,8 @@ const finalize = async (opt: any) => {
circuit,
participant,
beacon,
providerUserId
providerUserId,
circuits.length
)

process.stdout.write(`\n`)
Expand Down
10 changes: 6 additions & 4 deletions packages/phase2cli/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ export const generateCustomUrlToTweetAboutParticipation = (
isFinalizing: boolean
) =>
isFinalizing
? `https://twitter.com/intent/tweet?text=I%20have%20finalized%20the%20${ceremonyName}%20Phase%202%20Trusted%20Setup%20ceremony!%20You%20can%20view%20my%20final%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP%20#PSE`
: `https://twitter.com/intent/tweet?text=I%20contributed%20to%20the%20${ceremonyName}%20Phase%202%20Trusted%20Setup%20ceremony!%20You%20can%20contribute%20here:%20https://github.com/privacy-scaling-explorations/p0tion%20You%20can%20view%20my%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP`
? `https://twitter.com/intent/tweet?text=I%20have%20finalized%20the%20${ceremonyName}${ceremonyName.toLowerCase().includes("trusted") || ceremonyName.toLowerCase().includes("setup") || ceremonyName.toLowerCase().includes("phase2") || ceremonyName.toLowerCase().includes("ceremony") ? "!" : "%20Phase%202%20Trusted%20Setup%20ceremony!"}%20You%20can%20view%20my%20final%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP%20#PSE`
: `https://twitter.com/intent/tweet?text=I%20contributed%20to%20the%20${ceremonyName}${ceremonyName.toLowerCase().includes("trusted") || ceremonyName.toLowerCase().includes("setup") || ceremonyName.toLowerCase().includes("phase2") || ceremonyName.toLowerCase().includes("ceremony") ? "!" : "%20Phase%202%20Trusted%20Setup%20ceremony!"}%20You%20can%20view%20the%20steps%20to%20contribute%20here:%20https://ceremony.pse.dev%20You%20can%20view%20my%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP`

/**
* Return a custom progress bar.
Expand Down Expand Up @@ -521,6 +521,7 @@ export const getLatestUpdatesFromParticipant = async (
* @param entropyOrBeaconHash <string> - the entropy or beacon hash (only when finalizing) for the contribution.
* @param contributorOrCoordinatorIdentifier <string> - the identifier of the contributor or coordinator (only when finalizing).
* @param isFinalizing <boolean> - flag to discriminate between ceremony finalization (true) and contribution (false).
* @param circuitsLength <number> - the total number of circuits in the ceremony.
*/
export const handleStartOrResumeContribution = async (
cloudFunctions: Functions,
Expand All @@ -530,15 +531,16 @@ export const handleStartOrResumeContribution = async (
participant: FirebaseDocumentInfo,
entropyOrBeaconHash: any,
contributorOrCoordinatorIdentifier: string,
isFinalizing: boolean
isFinalizing: boolean,
circuitsLength: number
): Promise<void> => {
// Extract data.
const { prefix: ceremonyPrefix } = ceremony.data
const { waitingQueue, avgTimings, prefix: circuitPrefix, sequencePosition } = circuit.data
const { completedContributions } = waitingQueue // = current progress.

console.log(
`${theme.text.bold(`\n- Circuit # ${theme.colors.magenta(`${sequencePosition}`)}`)} (Contribution Steps)`
`${theme.text.bold(`\n- Circuit # ${theme.colors.magenta(`${sequencePosition}/${circuitsLength}`)}`)} (Contribution Steps)`
)

// Get most up-to-date data from the participant document.
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6140,7 +6140,7 @@ __metadata:
languageName: node
linkType: hard

"@p0tion/actions@^1.0.7, @p0tion/actions@workspace:packages/actions":
"@p0tion/actions@^1.0.8, @p0tion/actions@workspace:packages/actions":
version: 0.0.0-use.local
resolution: "@p0tion/actions@workspace:packages/actions"
dependencies:
Expand Down Expand Up @@ -6191,7 +6191,7 @@ __metadata:
"@aws-sdk/middleware-endpoint": ^3.329.0
"@aws-sdk/s3-request-presigner": ^3.329.0
"@firebase/rules-unit-testing": ^2.0.7
"@p0tion/actions": ^1.0.7
"@p0tion/actions": ^1.0.8
"@types/rollup-plugin-auto-external": ^2.0.2
"@types/uuid": ^9.0.1
blakejs: ^1.2.1
Expand Down Expand Up @@ -6225,7 +6225,7 @@ __metadata:
"@octokit/auth-oauth-app": ^5.0.5
"@octokit/auth-oauth-device": ^4.0.4
"@octokit/request": ^6.2.3
"@p0tion/actions": ^1.0.7
"@p0tion/actions": ^1.0.8
"@types/clear": ^0.1.2
"@types/cli-progress": ^3.11.0
"@types/figlet": ^1.5.6
Expand Down

0 comments on commit a50a645

Please sign in to comment.