@devtion/actions 0.0.0-c749be4 → 0.0.0-e312890
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +122 -54
- package/dist/index.node.js +123 -53
- package/dist/types/src/helpers/constants.d.ts +5 -2
- package/dist/types/src/helpers/constants.d.ts.map +1 -1
- package/dist/types/src/helpers/contracts.d.ts.map +1 -1
- package/dist/types/src/helpers/crypto.d.ts +1 -0
- package/dist/types/src/helpers/crypto.d.ts.map +1 -1
- package/dist/types/src/helpers/database.d.ts +8 -0
- package/dist/types/src/helpers/database.d.ts.map +1 -1
- package/dist/types/src/helpers/utils.d.ts +15 -1
- package/dist/types/src/helpers/utils.d.ts.map +1 -1
- package/dist/types/src/helpers/verification.d.ts +3 -2
- package/dist/types/src/helpers/verification.d.ts.map +1 -1
- package/dist/types/src/helpers/vm.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +7 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/helpers/constants.ts +40 -32
- package/src/helpers/contracts.ts +3 -3
- package/src/helpers/database.ts +13 -0
- package/src/helpers/utils.ts +58 -13
- package/src/helpers/verification.ts +6 -6
- package/src/helpers/vm.ts +17 -2
- package/src/index.ts +3 -1
- package/src/types/index.ts +21 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EACH,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,wCAAwC,EACxC,aAAa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C9C,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,oBAAoB,EAAE,mBAAmB,CAAA;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,KAAK,CACX,eAAe,GACX,qCAAqC,GACrC,mCAAmC,GACnC,gCAAgC,CACvC,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,kBAAkB,GACxB,kBAAkB,EAAE,GACpB,MAAM,GACN,MAAM,EAAE,GACR,MAAM,EAAE,EAAE,GACV,MAAM,EAAE,EAAE,EAAE,GACZ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,GACrC,IAAI,CAAA;AAEV,MAAM,MAAM,cAAc,GACpB,cAAc,EAAE,GAChB,kBAAkB,GAClB,MAAM,GACN,MAAM,EAAE,GACR,MAAM,EAAE,EAAE,GACV,MAAM,EAAE,EAAE,EAAE,GACZ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAAE,GACjC,UAAU,GACV,IAAI,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtion/actions",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-e312890",
|
|
4
4
|
"description": "A set of actions and helpers for CLI commands",
|
|
5
5
|
"repository": "git@github.com:privacy-scaling-explorations/p0tion.git",
|
|
6
6
|
"homepage": "https://github.com/privacy-scaling-explorations/p0tion",
|
|
@@ -51,13 +51,12 @@
|
|
|
51
51
|
"chai-as-promised": "^7.1.1",
|
|
52
52
|
"dotenv": "^16.0.3",
|
|
53
53
|
"ethers": "^5.7.2",
|
|
54
|
-
"ffjavascript": "^0.2.57",
|
|
55
54
|
"firebase": "^9.21.0",
|
|
56
55
|
"firebase-admin": "^11.8.0",
|
|
57
56
|
"googleapis": "^118.0.0",
|
|
58
57
|
"rimraf": "^5.0.0",
|
|
59
58
|
"rollup": "^3.21.6",
|
|
60
|
-
"snarkjs": "
|
|
59
|
+
"snarkjs": "0.7.3",
|
|
61
60
|
"solc": "^0.8.19"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
"publishConfig": {
|
|
80
79
|
"access": "public"
|
|
81
80
|
},
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "523f29a0c484496e734ccd908c7bcd428ed90618"
|
|
83
82
|
}
|
package/src/helpers/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Main part for the
|
|
2
|
-
export const potFileDownloadMainUrl = `https://
|
|
3
|
-
// Main part for the
|
|
4
|
-
export const potFilenameTemplate = `
|
|
1
|
+
// Main part for the PPoT Phase 1 Trusted Setup URLs to download PoT files.
|
|
2
|
+
export const potFileDownloadMainUrl = `https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/`
|
|
3
|
+
// Main part for the PPoT Phase 1 Trusted Setup PoT files to be downloaded.
|
|
4
|
+
export const potFilenameTemplate = `ppot_0080_`
|
|
5
5
|
// The genesis zKey index.
|
|
6
6
|
export const genesisZkeyIndex = `00000`
|
|
7
7
|
// The number of exponential iterations to be executed by SnarkJS when finalizing the ceremony.
|
|
@@ -18,6 +18,8 @@ export const verifierSmartContractAcronym = "verifier"
|
|
|
18
18
|
export const ec2InstanceTag = "p0tionec2instance"
|
|
19
19
|
// The name of the VM startup script file.
|
|
20
20
|
export const vmBootstrapScriptFilename = "bootstrap.sh"
|
|
21
|
+
// Match hash output by snarkjs in transcript log
|
|
22
|
+
export const contribHashRegex = new RegExp("Contribution.+Hash.+\n\t\t.+\n\t\t.+\n.+\n\t\t.+\r?\n")
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* Define the supported VM configuration types.
|
|
@@ -77,112 +79,116 @@ export const vmConfigurationTypes = {
|
|
|
77
79
|
*/
|
|
78
80
|
export const powersOfTauFiles = [
|
|
79
81
|
{
|
|
80
|
-
ref: "https://
|
|
82
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_01.ptau",
|
|
81
83
|
size: 0.000084
|
|
82
84
|
},
|
|
83
85
|
{
|
|
84
|
-
ref: "https://
|
|
86
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_02.ptau",
|
|
85
87
|
size: 0.000086
|
|
86
88
|
},
|
|
87
89
|
{
|
|
88
|
-
ref: "https://
|
|
90
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_03.ptau",
|
|
89
91
|
size: 0.000091
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
|
-
ref: "https://
|
|
94
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_04.ptau",
|
|
93
95
|
size: 0.0001
|
|
94
96
|
},
|
|
95
97
|
{
|
|
96
|
-
ref: "https://
|
|
98
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_05.ptau",
|
|
97
99
|
size: 0.000117
|
|
98
100
|
},
|
|
99
101
|
{
|
|
100
|
-
ref: "https://
|
|
102
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_06.ptau",
|
|
101
103
|
size: 0.000153
|
|
102
104
|
},
|
|
103
105
|
{
|
|
104
|
-
ref: "https://
|
|
106
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_07.ptau",
|
|
105
107
|
size: 0.000225
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
|
-
ref: "https://
|
|
110
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_08.ptau",
|
|
109
111
|
size: 0.0004
|
|
110
112
|
},
|
|
111
113
|
{
|
|
112
|
-
ref: "https://
|
|
114
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_09.ptau",
|
|
113
115
|
size: 0.000658
|
|
114
116
|
},
|
|
115
117
|
{
|
|
116
|
-
ref: "https://
|
|
118
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_10.ptau",
|
|
117
119
|
size: 0.0013
|
|
118
120
|
},
|
|
119
121
|
{
|
|
120
|
-
ref: "https://
|
|
122
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_11.ptau",
|
|
121
123
|
size: 0.0023
|
|
122
124
|
},
|
|
123
125
|
{
|
|
124
|
-
ref: "https://
|
|
126
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_12.ptau",
|
|
125
127
|
size: 0.0046
|
|
126
128
|
},
|
|
127
129
|
{
|
|
128
|
-
ref: "https://
|
|
130
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_13.ptau",
|
|
129
131
|
size: 0.0091
|
|
130
132
|
},
|
|
131
133
|
{
|
|
132
|
-
ref: "https://
|
|
134
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_14.ptau",
|
|
133
135
|
size: 0.0181
|
|
134
136
|
},
|
|
135
137
|
{
|
|
136
|
-
ref: "https://
|
|
138
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_15.ptau",
|
|
137
139
|
size: 0.0361
|
|
138
140
|
},
|
|
139
141
|
{
|
|
140
|
-
ref: "https://
|
|
142
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_16.ptau",
|
|
141
143
|
size: 0.0721
|
|
142
144
|
},
|
|
143
145
|
{
|
|
144
|
-
ref: "https://
|
|
146
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_17.ptau",
|
|
145
147
|
size: 0.144
|
|
146
148
|
},
|
|
147
149
|
{
|
|
148
|
-
ref: "https://
|
|
150
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_18.ptau",
|
|
149
151
|
size: 0.288
|
|
150
152
|
},
|
|
151
153
|
{
|
|
152
|
-
ref: "https://
|
|
154
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_19.ptau",
|
|
153
155
|
size: 0.576
|
|
154
156
|
},
|
|
155
157
|
{
|
|
156
|
-
ref: "https://
|
|
158
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_20.ptau",
|
|
157
159
|
size: 1.1
|
|
158
160
|
},
|
|
159
161
|
{
|
|
160
|
-
ref: "https://
|
|
162
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_21.ptau",
|
|
161
163
|
size: 2.3
|
|
162
164
|
},
|
|
163
165
|
{
|
|
164
|
-
ref: "https://
|
|
166
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_22.ptau",
|
|
165
167
|
size: 4.5
|
|
166
168
|
},
|
|
167
169
|
{
|
|
168
|
-
ref: "https://
|
|
170
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_23.ptau",
|
|
169
171
|
size: 9.0
|
|
170
172
|
},
|
|
171
173
|
{
|
|
172
|
-
ref: "https://
|
|
174
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_24.ptau",
|
|
173
175
|
size: 18.0
|
|
174
176
|
},
|
|
175
177
|
{
|
|
176
|
-
ref: "https://
|
|
178
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_25.ptau",
|
|
177
179
|
size: 36.0
|
|
178
180
|
},
|
|
179
181
|
{
|
|
180
|
-
ref: "https://
|
|
182
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_26.ptau",
|
|
181
183
|
size: 72.0
|
|
182
184
|
},
|
|
183
185
|
{
|
|
184
|
-
ref: "https://
|
|
186
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_27.ptau",
|
|
185
187
|
size: 144.0
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
ref: "https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_final.ptau",
|
|
191
|
+
size: 288.0
|
|
186
192
|
}
|
|
187
193
|
]
|
|
188
194
|
|
|
@@ -313,6 +319,8 @@ export const commonTerms = {
|
|
|
313
319
|
finalizeCircuit: "finalizeCircuit",
|
|
314
320
|
finalizeCeremony: "finalizeCeremony",
|
|
315
321
|
downloadCircuitArtifacts: "downloadCircuitArtifacts",
|
|
316
|
-
transferObject: "transferObject"
|
|
322
|
+
transferObject: "transferObject",
|
|
323
|
+
bandadaValidateProof: "bandadaValidateProof",
|
|
324
|
+
checkNonceOfSIWEAddress: "checkNonceOfSIWEAddress"
|
|
317
325
|
}
|
|
318
326
|
}
|
package/src/helpers/contracts.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Contract, ContractFactory, Signer } from "ethers"
|
|
2
|
-
import { utils as ffUtils } from "ffjavascript"
|
|
3
2
|
import { Firestore, where } from "firebase/firestore"
|
|
4
3
|
import { Functions } from "firebase/functions"
|
|
5
4
|
import fs from "fs"
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
import { compareHashes } from "./crypto"
|
|
17
16
|
import { commonTerms, finalContributionIndex, verificationKeyAcronym, verifierSmartContractAcronym } from "./constants"
|
|
18
17
|
import { fromQueryToFirebaseDocumentInfo, queryCollection } from "./database"
|
|
18
|
+
import { unstringifyBigInts } from "./utils"
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Formats part of a GROTH16 SNARK proof
|
|
@@ -41,11 +41,11 @@ export const p256 = (proofPart: any) => {
|
|
|
41
41
|
*/
|
|
42
42
|
export const formatSolidityCalldata = (circuitInput: string[], _proof: any): any => {
|
|
43
43
|
try {
|
|
44
|
-
const proof =
|
|
44
|
+
const proof = unstringifyBigInts(_proof) as any
|
|
45
45
|
// format the public inputs to the circuit
|
|
46
46
|
const formattedCircuitInput = []
|
|
47
47
|
for (const cInput of circuitInput) {
|
|
48
|
-
formattedCircuitInput.push(p256(
|
|
48
|
+
formattedCircuitInput.push(p256(unstringifyBigInts(cInput)))
|
|
49
49
|
}
|
|
50
50
|
// construct calldata
|
|
51
51
|
const calldata = {
|
package/src/helpers/database.ts
CHANGED
|
@@ -219,3 +219,16 @@ export const getClosedCeremonies = async (firestoreDatabase: Firestore): Promise
|
|
|
219
219
|
|
|
220
220
|
return fromQueryToFirebaseDocumentInfo(closedCeremoniesQuerySnap.docs)
|
|
221
221
|
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Query all ceremonies
|
|
225
|
+
* @notice get all ceremonies from the database.
|
|
226
|
+
* @dev this is a helper for the CLI ceremony methods.
|
|
227
|
+
* @param firestoreDatabase <Firestore> - the Firestore service instance associated to the current Firebase application.
|
|
228
|
+
* @returns <Promise<Array<FirebaseDocumentInfo>>> - the list of all ceremonies.
|
|
229
|
+
*/
|
|
230
|
+
export const getAllCeremonies = async (firestoreDatabase: Firestore): Promise<Array<FirebaseDocumentInfo>> => {
|
|
231
|
+
const ceremoniesQuerySnap = await queryCollection(firestoreDatabase, commonTerms.collections.ceremonies.name, [])
|
|
232
|
+
|
|
233
|
+
return fromQueryToFirebaseDocumentInfo(ceremoniesQuerySnap.docs)
|
|
234
|
+
}
|
package/src/helpers/utils.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Firestore } from "firebase/firestore"
|
|
2
2
|
import fs, { ReadPosition, createWriteStream } from "fs"
|
|
3
|
-
import { utils as ffUtils } from "ffjavascript"
|
|
4
3
|
import winston, { Logger } from "winston"
|
|
5
4
|
import fetch from "@adobe/node-fetch-retry"
|
|
6
5
|
import { pipeline } from "stream"
|
|
@@ -14,7 +13,9 @@ import {
|
|
|
14
13
|
FirebaseDocumentInfo,
|
|
15
14
|
SetupCeremonyData,
|
|
16
15
|
CeremonySetupTemplate,
|
|
17
|
-
CeremonySetupTemplateCircuitArtifacts
|
|
16
|
+
CeremonySetupTemplateCircuitArtifacts,
|
|
17
|
+
StringifiedBigInts,
|
|
18
|
+
BigIntVariants
|
|
18
19
|
} from "../types/index"
|
|
19
20
|
import { finalContributionIndex, genesisZkeyIndex, potFilenameTemplate } from "./constants"
|
|
20
21
|
import {
|
|
@@ -358,6 +359,48 @@ export const readBytesFromFile = (
|
|
|
358
359
|
return buffer
|
|
359
360
|
}
|
|
360
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Given a buffer in little endian format, convert it to bigint
|
|
364
|
+
* @param buffer
|
|
365
|
+
* @returns
|
|
366
|
+
*/
|
|
367
|
+
export function leBufferToBigint(buffer: Buffer): bigint {
|
|
368
|
+
return BigInt(`0x${buffer.reverse().toString("hex")}`)
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Given an input containing string values, convert them
|
|
373
|
+
* to bigint
|
|
374
|
+
* @param input - The input to convert
|
|
375
|
+
* @returns the input with string values converted to bigint
|
|
376
|
+
*/
|
|
377
|
+
export const unstringifyBigInts = (input: StringifiedBigInts): BigIntVariants => {
|
|
378
|
+
if (typeof input === "string" && /^[0-9]+$/.test(input)) {
|
|
379
|
+
return BigInt(input)
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (typeof input === "string" && /^0x[0-9a-fA-F]+$/.test(input)) {
|
|
383
|
+
return BigInt(input)
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (Array.isArray(input)) {
|
|
387
|
+
return input.map(unstringifyBigInts)
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (input === null) {
|
|
391
|
+
return null
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (typeof input === "object") {
|
|
395
|
+
return Object.entries(input).reduce<Record<string, bigint>>((acc, [key, value]) => {
|
|
396
|
+
acc[key] = unstringifyBigInts(value) as bigint
|
|
397
|
+
return acc
|
|
398
|
+
}, {})
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return input
|
|
402
|
+
}
|
|
403
|
+
|
|
361
404
|
/**
|
|
362
405
|
* Return the info about the R1CS file.ù
|
|
363
406
|
* @dev this method was built taking inspiration from
|
|
@@ -420,7 +463,7 @@ export const getR1CSInfo = (localR1CSFilePath: string): CircuitMetadata => {
|
|
|
420
463
|
|
|
421
464
|
try {
|
|
422
465
|
// Get 'number of section' (jump magic r1cs and version1 data).
|
|
423
|
-
const numberOfSections =
|
|
466
|
+
const numberOfSections = leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, 8))
|
|
424
467
|
|
|
425
468
|
// Jump to first section.
|
|
426
469
|
pointer = 12
|
|
@@ -428,13 +471,13 @@ export const getR1CSInfo = (localR1CSFilePath: string): CircuitMetadata => {
|
|
|
428
471
|
// For each section
|
|
429
472
|
for (let i = 0; i < numberOfSections; i++) {
|
|
430
473
|
// Read section type.
|
|
431
|
-
const sectionType =
|
|
474
|
+
const sectionType = leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer))
|
|
432
475
|
|
|
433
476
|
// Jump to section size.
|
|
434
477
|
pointer += 4
|
|
435
478
|
|
|
436
479
|
// Read section size
|
|
437
|
-
const sectionSize = Number(
|
|
480
|
+
const sectionSize = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 8, pointer)))
|
|
438
481
|
|
|
439
482
|
// If at header section (0x00000001 : Header Section).
|
|
440
483
|
if (sectionType === BigInt(1)) {
|
|
@@ -469,22 +512,22 @@ export const getR1CSInfo = (localR1CSFilePath: string): CircuitMetadata => {
|
|
|
469
512
|
pointer += sectionSize - 20
|
|
470
513
|
|
|
471
514
|
// Read R1CS info.
|
|
472
|
-
wires = Number(
|
|
515
|
+
wires = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer)))
|
|
473
516
|
pointer += 4
|
|
474
517
|
|
|
475
|
-
publicOutputs = Number(
|
|
518
|
+
publicOutputs = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer)))
|
|
476
519
|
pointer += 4
|
|
477
520
|
|
|
478
|
-
publicInputs = Number(
|
|
521
|
+
publicInputs = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer)))
|
|
479
522
|
pointer += 4
|
|
480
523
|
|
|
481
|
-
privateInputs = Number(
|
|
524
|
+
privateInputs = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer)))
|
|
482
525
|
pointer += 4
|
|
483
526
|
|
|
484
|
-
labels = Number(
|
|
527
|
+
labels = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 8, pointer)))
|
|
485
528
|
pointer += 8
|
|
486
529
|
|
|
487
|
-
constraints = Number(
|
|
530
|
+
constraints = Number(leBufferToBigint(readBytesFromFile(localR1CSFilePath, 0, 4, pointer)))
|
|
488
531
|
}
|
|
489
532
|
|
|
490
533
|
pointer += 8 + Number(sectionSize)
|
|
@@ -712,8 +755,10 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false):
|
|
|
712
755
|
circuits.push(circuit)
|
|
713
756
|
|
|
714
757
|
// remove the local r1cs and wasm downloads (if used for verifying the config only vs setup)
|
|
715
|
-
if (cleanup)
|
|
716
|
-
|
|
758
|
+
if (cleanup) {
|
|
759
|
+
fs.unlinkSync(localR1csPath)
|
|
760
|
+
fs.unlinkSync(localWasmPath)
|
|
761
|
+
}
|
|
717
762
|
}
|
|
718
763
|
|
|
719
764
|
const setupData: SetupCeremonyData = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { groth16, zKey } from "snarkjs"
|
|
1
|
+
import { CircuitSignals, Groth16Proof, PublicSignals, groth16, zKey } from "snarkjs"
|
|
2
2
|
import fs from "fs"
|
|
3
3
|
import { Firestore, where } from "firebase/firestore"
|
|
4
4
|
import { Functions } from "firebase/functions"
|
|
@@ -61,7 +61,7 @@ export const verifyZKey = async (
|
|
|
61
61
|
* @returns <Promise<object>> The proof
|
|
62
62
|
*/
|
|
63
63
|
export const generateGROTH16Proof = async (
|
|
64
|
-
circuitInput:
|
|
64
|
+
circuitInput: CircuitSignals,
|
|
65
65
|
zkeyFilePath: string,
|
|
66
66
|
wasmFilePath: string,
|
|
67
67
|
logger?: any
|
|
@@ -88,8 +88,8 @@ export const generateGROTH16Proof = async (
|
|
|
88
88
|
*/
|
|
89
89
|
export const verifyGROTH16Proof = async (
|
|
90
90
|
verificationKeyPath: string,
|
|
91
|
-
publicSignals:
|
|
92
|
-
proof:
|
|
91
|
+
publicSignals: PublicSignals,
|
|
92
|
+
proof: Groth16Proof
|
|
93
93
|
): Promise<boolean> => {
|
|
94
94
|
const verificationKey = JSON.parse(fs.readFileSync(verificationKeyPath).toString())
|
|
95
95
|
const success = await groth16.verify(verificationKey, publicSignals, proof)
|
|
@@ -182,8 +182,8 @@ export const generateZkeyFromScratch = async (
|
|
|
182
182
|
await zKey.beacon(
|
|
183
183
|
finalContributionZKeyLocalPath,
|
|
184
184
|
zkeyLocalPath,
|
|
185
|
-
coordinatorIdentifier
|
|
186
|
-
beacon
|
|
185
|
+
coordinatorIdentifier!,
|
|
186
|
+
beacon!,
|
|
187
187
|
numExpIterations,
|
|
188
188
|
logger
|
|
189
189
|
)
|
package/src/helpers/vm.ts
CHANGED
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
StopInstancesCommand,
|
|
6
6
|
TerminateInstancesCommand,
|
|
7
7
|
EC2Client,
|
|
8
|
-
RunInstancesCommandInput
|
|
8
|
+
RunInstancesCommandInput,
|
|
9
|
+
_InstanceType
|
|
9
10
|
} from "@aws-sdk/client-ec2"
|
|
10
11
|
import {
|
|
11
12
|
GetCommandInvocationCommand,
|
|
@@ -162,9 +163,10 @@ export const createEC2Instance = async (
|
|
|
162
163
|
const { amiId, instanceProfileArn } = getAWSVariables()
|
|
163
164
|
|
|
164
165
|
// Parametrize the VM EC2 instance.
|
|
166
|
+
console.log("\nLAUNCHING AWS EC2 INSTANCE\n")
|
|
165
167
|
const params: RunInstancesCommandInput = {
|
|
166
168
|
ImageId: amiId,
|
|
167
|
-
InstanceType: instanceType,
|
|
169
|
+
InstanceType: instanceType as _InstanceType,
|
|
168
170
|
MaxCount: 1,
|
|
169
171
|
MinCount: 1,
|
|
170
172
|
// nb. to find this: iam -> roles -> role_name.
|
|
@@ -195,6 +197,19 @@ export const createEC2Instance = async (
|
|
|
195
197
|
{
|
|
196
198
|
Key: "Initialized",
|
|
197
199
|
Value: "false"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
Key: "ProjectName",
|
|
203
|
+
Value: "trusted-setup"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
ResourceType: "volume",
|
|
209
|
+
Tags: [
|
|
210
|
+
{
|
|
211
|
+
Key: "ProjectName",
|
|
212
|
+
Value: "trusted-setup"
|
|
198
213
|
}
|
|
199
214
|
]
|
|
200
215
|
}
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,7 @@ export {
|
|
|
23
23
|
getContributionsCollectionPath,
|
|
24
24
|
getTimeoutsCollectionPath,
|
|
25
25
|
getOpenedCeremonies,
|
|
26
|
+
getAllCeremonies,
|
|
26
27
|
getCeremonyCircuits
|
|
27
28
|
} from "./helpers/database"
|
|
28
29
|
export {
|
|
@@ -51,7 +52,8 @@ export {
|
|
|
51
52
|
ec2InstanceTag,
|
|
52
53
|
vmConfigurationTypes,
|
|
53
54
|
vmBootstrapScriptFilename,
|
|
54
|
-
powersOfTauFiles
|
|
55
|
+
powersOfTauFiles,
|
|
56
|
+
contribHashRegex
|
|
55
57
|
} from "./helpers/constants"
|
|
56
58
|
export {
|
|
57
59
|
extractPrefix,
|
package/src/types/index.ts
CHANGED
|
@@ -190,7 +190,7 @@ export type VMConfiguration = {
|
|
|
190
190
|
/**
|
|
191
191
|
* Group information about the circuit contribution verification mechanism.
|
|
192
192
|
* @typedef {Object} CircuitContributionVerification
|
|
193
|
-
* @property {CircuitContributionVerificationMechanism} cfOrVm - the mechanism
|
|
193
|
+
* @property {CircuitContributionVerificationMechanism} cfOrVm - the mechanism chosen by the coordinator.
|
|
194
194
|
* @property {VMConfiguration} [vm] - the VM configuration specs.
|
|
195
195
|
*/
|
|
196
196
|
export type CircuitContributionVerification = {
|
|
@@ -652,3 +652,23 @@ export type CeremonySetupTemplate = {
|
|
|
652
652
|
CeremonySetupTemplateCircuitName
|
|
653
653
|
>
|
|
654
654
|
}
|
|
655
|
+
|
|
656
|
+
export type StringifiedBigInts =
|
|
657
|
+
| StringifiedBigInts[]
|
|
658
|
+
| string
|
|
659
|
+
| string[]
|
|
660
|
+
| string[][]
|
|
661
|
+
| string[][][]
|
|
662
|
+
| { [key: string]: StringifiedBigInts }
|
|
663
|
+
| null
|
|
664
|
+
|
|
665
|
+
export type BigIntVariants =
|
|
666
|
+
| BigIntVariants[]
|
|
667
|
+
| StringifiedBigInts
|
|
668
|
+
| bigint
|
|
669
|
+
| bigint[]
|
|
670
|
+
| bigint[][]
|
|
671
|
+
| bigint[][][]
|
|
672
|
+
| { [key: string]: BigIntVariants }
|
|
673
|
+
| Uint8Array
|
|
674
|
+
| null
|