@maci-protocol/coordinator 0.0.0-ci.4a1da43 → 0.0.0-ci.4b8eeec
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/LICENSE +1 -2
- package/README.md +13 -6
- package/build/hardhat.config.cjs +3 -0
- package/build/hardhat.config.cjs.map +1 -1
- package/build/hardhat.config.d.cts +3 -0
- package/build/tests/constants.d.ts +0 -1
- package/build/tests/constants.d.ts.map +1 -1
- package/build/tests/constants.js +0 -1
- package/build/tests/constants.js.map +1 -1
- package/build/tests/e2e.aa.test.js +17 -14
- package/build/tests/e2e.aa.test.js.map +1 -1
- package/build/tests/e2e.deploy.test.js +112 -66
- package/build/tests/e2e.deploy.test.js.map +1 -1
- package/build/tests/utils.d.ts +6 -0
- package/build/tests/utils.d.ts.map +1 -1
- package/build/tests/utils.js +12 -3
- package/build/tests/utils.js.map +1 -1
- package/build/ts/common/__tests__/common.test.js +2 -6
- package/build/ts/common/__tests__/common.test.js.map +1 -1
- package/build/ts/common/accountAbstraction.d.ts +2 -19
- package/build/ts/common/accountAbstraction.d.ts.map +1 -1
- package/build/ts/common/accountAbstraction.js +14 -43
- package/build/ts/common/accountAbstraction.js.map +1 -1
- package/build/ts/common/chain.d.ts +16 -0
- package/build/ts/common/chain.d.ts.map +1 -0
- package/build/ts/common/chain.js +35 -0
- package/build/ts/common/chain.js.map +1 -0
- package/build/ts/common/errors.d.ts +17 -18
- package/build/ts/common/errors.d.ts.map +1 -1
- package/build/ts/common/errors.js +17 -18
- package/build/ts/common/errors.js.map +1 -1
- package/build/ts/common/index.d.ts +2 -0
- package/build/ts/common/index.d.ts.map +1 -1
- package/build/ts/common/index.js +2 -0
- package/build/ts/common/index.js.map +1 -1
- package/build/ts/common/types.d.ts +2 -3
- package/build/ts/common/types.d.ts.map +1 -1
- package/build/ts/deployer/__tests__/deployer.service.test.js +28 -287
- package/build/ts/deployer/__tests__/deployer.service.test.js.map +1 -1
- package/build/ts/deployer/__tests__/utils.d.ts +30 -1
- package/build/ts/deployer/__tests__/utils.d.ts.map +1 -1
- package/build/ts/deployer/__tests__/utils.js +41 -8
- package/build/ts/deployer/__tests__/utils.js.map +1 -1
- package/build/ts/deployer/deployer.service.d.ts +15 -51
- package/build/ts/deployer/deployer.service.d.ts.map +1 -1
- package/build/ts/deployer/deployer.service.js +154 -454
- package/build/ts/deployer/deployer.service.js.map +1 -1
- package/build/ts/deployer/dto.d.ts +4 -4
- package/build/ts/deployer/dto.d.ts.map +1 -1
- package/build/ts/deployer/dto.js +9 -1
- package/build/ts/deployer/dto.js.map +1 -1
- package/build/ts/deployer/types.d.ts +45 -15
- package/build/ts/deployer/types.d.ts.map +1 -1
- package/build/ts/file/__tests__/file.service.test.js +7 -6
- package/build/ts/file/__tests__/file.service.test.js.map +1 -1
- package/build/ts/file/file.service.d.ts +3 -2
- package/build/ts/file/file.service.d.ts.map +1 -1
- package/build/ts/file/file.service.js +9 -4
- package/build/ts/file/file.service.js.map +1 -1
- package/build/ts/proof/__tests__/proof.controller.test.js +5 -2
- package/build/ts/proof/__tests__/proof.controller.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.gateway.test.js +6 -2
- package/build/ts/proof/__tests__/proof.gateway.test.js.map +1 -1
- package/build/ts/proof/__tests__/proof.service.test.js +7 -5
- package/build/ts/proof/__tests__/proof.service.test.js.map +1 -1
- package/build/ts/proof/dto.d.ts +13 -11
- package/build/ts/proof/dto.d.ts.map +1 -1
- package/build/ts/proof/dto.js +51 -29
- package/build/ts/proof/dto.js.map +1 -1
- package/build/ts/proof/proof.controller.d.ts +3 -2
- package/build/ts/proof/proof.controller.d.ts.map +1 -1
- package/build/ts/proof/proof.controller.js.map +1 -1
- package/build/ts/proof/proof.service.d.ts +3 -3
- package/build/ts/proof/proof.service.d.ts.map +1 -1
- package/build/ts/proof/proof.service.js +35 -116
- package/build/ts/proof/proof.service.js.map +1 -1
- package/build/ts/proof/types.d.ts +18 -10
- package/build/ts/proof/types.d.ts.map +1 -1
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.d.ts +53 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.d.ts.map +1 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.js +105 -0
- package/build/ts/sessionKeys/provider/KernelEIP1193Provider.js.map +1 -0
- package/build/ts/sessionKeys/sessionKeys.service.d.ts +13 -2
- package/build/ts/sessionKeys/sessionKeys.service.d.ts.map +1 -1
- package/build/ts/sessionKeys/sessionKeys.service.js +22 -4
- package/build/ts/sessionKeys/sessionKeys.service.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +15 -14
- package/build/ts/deployer/utils.d.ts +0 -8
- package/build/ts/deployer/utils.d.ts.map +0 -1
- package/build/ts/deployer/utils.js +0 -9
- package/build/ts/deployer/utils.js.map +0 -1
package/build/ts/proof/dto.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EMode } from "@maci-protocol/sdk";
|
|
1
2
|
import type { Hex } from "viem";
|
|
2
3
|
import { ESupportedNetworks } from "../common";
|
|
3
4
|
/**
|
|
@@ -13,13 +14,9 @@ export declare class GenerateProofDto {
|
|
|
13
14
|
*/
|
|
14
15
|
maciContractAddress: string;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Voting mode
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Whether to use Qv or NonQv
|
|
21
|
-
*/
|
|
22
|
-
useQuadraticVoting: boolean;
|
|
19
|
+
mode: EMode;
|
|
23
20
|
/**
|
|
24
21
|
* Encrypted coordinator private key with RSA public key (see .env.example)
|
|
25
22
|
*/
|
|
@@ -36,6 +33,12 @@ export declare class GenerateProofDto {
|
|
|
36
33
|
* Blocks per batch for event processing
|
|
37
34
|
*/
|
|
38
35
|
blocksPerBatch?: number;
|
|
36
|
+
sessionKeyAddress?: Hex;
|
|
37
|
+
approval?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Chain Name
|
|
40
|
+
*/
|
|
41
|
+
chain: ESupportedNetworks;
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Data transfer object for merge trees
|
|
@@ -46,8 +49,8 @@ export declare class MergeTreesDto {
|
|
|
46
49
|
*/
|
|
47
50
|
poll: number;
|
|
48
51
|
maciContractAddress: string;
|
|
49
|
-
sessionKeyAddress
|
|
50
|
-
approval
|
|
52
|
+
sessionKeyAddress?: string;
|
|
53
|
+
approval?: string;
|
|
51
54
|
/**
|
|
52
55
|
* Chain Name
|
|
53
56
|
*/
|
|
@@ -62,9 +65,8 @@ export declare class SubmitProofsDto {
|
|
|
62
65
|
*/
|
|
63
66
|
pollId: number;
|
|
64
67
|
maciContractAddress: Hex;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
approval: string;
|
|
68
|
+
sessionKeyAddress?: Hex;
|
|
69
|
+
approval?: string;
|
|
68
70
|
/**
|
|
69
71
|
* Chain Name
|
|
70
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../ts/proof/dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../ts/proof/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IAQH,IAAI,EAAG,MAAM,CAAC;IAEd;;OAEG;IAMH,mBAAmB,EAAG,MAAM,CAAC;IAE7B;;OAEG;IAMH,IAAI,EAAG,KAAK,CAAC;IAEb;;OAEG;IASH,8BAA8B,EAAG,MAAM,CAAC;IAExC;;OAEG;IASH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IASH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAWH,cAAc,CAAC,EAAE,MAAM,CAAC;IASxB,iBAAiB,CAAC,EAAE,GAAG,CAAC;IASxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAMH,KAAK,EAAG,kBAAkB,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB;;OAEG;IAQH,IAAI,EAAG,MAAM,CAAC;IAOd,mBAAmB,EAAG,MAAM,CAAC;IAS7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAS3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAMH,KAAK,EAAG,kBAAkB,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IAQH,MAAM,EAAG,MAAM,CAAC;IAOhB,mBAAmB,EAAG,GAAG,CAAC;IAS1B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IASxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAMH,KAAK,EAAG,kBAAkB,CAAC;CAC5B"}
|
package/build/ts/proof/dto.js
CHANGED
|
@@ -7,8 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { EMode } from "@maci-protocol/sdk";
|
|
10
11
|
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
-
import {
|
|
12
|
+
import { IsEnum, IsEthereumAddress, IsInt, IsOptional, IsString, Length, Max, Min } from "class-validator";
|
|
12
13
|
import { ESupportedNetworks } from "../common";
|
|
13
14
|
/**
|
|
14
15
|
* Data transfer object for generate proof
|
|
@@ -23,13 +24,9 @@ export class GenerateProofDto {
|
|
|
23
24
|
*/
|
|
24
25
|
maciContractAddress;
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Voting mode
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Whether to use Qv or NonQv
|
|
31
|
-
*/
|
|
32
|
-
useQuadraticVoting;
|
|
29
|
+
mode;
|
|
33
30
|
/**
|
|
34
31
|
* Encrypted coordinator private key with RSA public key (see .env.example)
|
|
35
32
|
*/
|
|
@@ -46,6 +43,12 @@ export class GenerateProofDto {
|
|
|
46
43
|
* Blocks per batch for event processing
|
|
47
44
|
*/
|
|
48
45
|
blocksPerBatch;
|
|
46
|
+
sessionKeyAddress;
|
|
47
|
+
approval;
|
|
48
|
+
/**
|
|
49
|
+
* Chain Name
|
|
50
|
+
*/
|
|
51
|
+
chain;
|
|
49
52
|
}
|
|
50
53
|
__decorate([
|
|
51
54
|
ApiProperty({
|
|
@@ -67,20 +70,12 @@ __decorate([
|
|
|
67
70
|
], GenerateProofDto.prototype, "maciContractAddress", void 0);
|
|
68
71
|
__decorate([
|
|
69
72
|
ApiProperty({
|
|
70
|
-
description: "
|
|
71
|
-
type:
|
|
72
|
-
}),
|
|
73
|
-
IsEthereumAddress(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], GenerateProofDto.prototype, "tallyContractAddress", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
ApiProperty({
|
|
78
|
-
description: "Whether to use quadratic voting or not",
|
|
79
|
-
type: Boolean,
|
|
73
|
+
description: "Voting mode (qv: 0, non-qv: 1, full: 2)",
|
|
74
|
+
type: Number,
|
|
80
75
|
}),
|
|
81
|
-
|
|
82
|
-
__metadata("design:type",
|
|
83
|
-
], GenerateProofDto.prototype, "
|
|
76
|
+
IsEnum(EMode),
|
|
77
|
+
__metadata("design:type", Number)
|
|
78
|
+
], GenerateProofDto.prototype, "mode", void 0);
|
|
84
79
|
__decorate([
|
|
85
80
|
ApiProperty({
|
|
86
81
|
description: "Encrypted coordinator private key with RSA public key (see README.md)",
|
|
@@ -127,6 +122,34 @@ __decorate([
|
|
|
127
122
|
IsOptional(),
|
|
128
123
|
__metadata("design:type", Number)
|
|
129
124
|
], GenerateProofDto.prototype, "blocksPerBatch", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
ApiProperty({
|
|
127
|
+
description: "Session key address",
|
|
128
|
+
type: String,
|
|
129
|
+
required: false,
|
|
130
|
+
}),
|
|
131
|
+
IsOptional(),
|
|
132
|
+
IsEthereumAddress(),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], GenerateProofDto.prototype, "sessionKeyAddress", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
ApiProperty({
|
|
137
|
+
description: "Approval",
|
|
138
|
+
type: String,
|
|
139
|
+
required: false,
|
|
140
|
+
}),
|
|
141
|
+
IsOptional(),
|
|
142
|
+
IsString(),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], GenerateProofDto.prototype, "approval", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
ApiProperty({
|
|
147
|
+
description: "Chain to which to deploy the contract(s)",
|
|
148
|
+
enum: ESupportedNetworks,
|
|
149
|
+
}),
|
|
150
|
+
IsEnum(ESupportedNetworks),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], GenerateProofDto.prototype, "chain", void 0);
|
|
130
153
|
/**
|
|
131
154
|
* Data transfer object for merge trees
|
|
132
155
|
*/
|
|
@@ -165,7 +188,9 @@ __decorate([
|
|
|
165
188
|
ApiProperty({
|
|
166
189
|
description: "Session key address",
|
|
167
190
|
type: String,
|
|
191
|
+
required: false,
|
|
168
192
|
}),
|
|
193
|
+
IsOptional(),
|
|
169
194
|
IsEthereumAddress(),
|
|
170
195
|
__metadata("design:type", String)
|
|
171
196
|
], MergeTreesDto.prototype, "sessionKeyAddress", void 0);
|
|
@@ -173,7 +198,9 @@ __decorate([
|
|
|
173
198
|
ApiProperty({
|
|
174
199
|
description: "Approval",
|
|
175
200
|
type: String,
|
|
201
|
+
required: false,
|
|
176
202
|
}),
|
|
203
|
+
IsOptional(),
|
|
177
204
|
IsString(),
|
|
178
205
|
__metadata("design:type", String)
|
|
179
206
|
], MergeTreesDto.prototype, "approval", void 0);
|
|
@@ -194,7 +221,6 @@ export class SubmitProofsDto {
|
|
|
194
221
|
*/
|
|
195
222
|
pollId;
|
|
196
223
|
maciContractAddress;
|
|
197
|
-
tallyContractAddress;
|
|
198
224
|
sessionKeyAddress;
|
|
199
225
|
approval;
|
|
200
226
|
/**
|
|
@@ -220,19 +246,13 @@ __decorate([
|
|
|
220
246
|
IsEthereumAddress(),
|
|
221
247
|
__metadata("design:type", String)
|
|
222
248
|
], SubmitProofsDto.prototype, "maciContractAddress", void 0);
|
|
223
|
-
__decorate([
|
|
224
|
-
ApiProperty({
|
|
225
|
-
description: "Tally contract address",
|
|
226
|
-
type: String,
|
|
227
|
-
}),
|
|
228
|
-
IsEthereumAddress(),
|
|
229
|
-
__metadata("design:type", String)
|
|
230
|
-
], SubmitProofsDto.prototype, "tallyContractAddress", void 0);
|
|
231
249
|
__decorate([
|
|
232
250
|
ApiProperty({
|
|
233
251
|
description: "Session key address",
|
|
234
252
|
type: String,
|
|
253
|
+
required: false,
|
|
235
254
|
}),
|
|
255
|
+
IsOptional(),
|
|
236
256
|
IsEthereumAddress(),
|
|
237
257
|
__metadata("design:type", String)
|
|
238
258
|
], SubmitProofsDto.prototype, "sessionKeyAddress", void 0);
|
|
@@ -240,7 +260,9 @@ __decorate([
|
|
|
240
260
|
ApiProperty({
|
|
241
261
|
description: "Approval",
|
|
242
262
|
type: String,
|
|
263
|
+
required: false,
|
|
243
264
|
}),
|
|
265
|
+
IsOptional(),
|
|
244
266
|
IsString(),
|
|
245
267
|
__metadata("design:type", String)
|
|
246
268
|
], SubmitProofsDto.prototype, "approval", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dto.js","sourceRoot":"","sources":["../../../ts/proof/dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE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C,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,iBAAiB,EAAE;;0DACI;AASxB;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,QAAQ,EAAE;;iDACO;AAUlB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,kBAAkB;KACzB,CAAC;IACD,MAAM,CAAC,kBAAkB,CAAC;;8CACA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IGenerateData, IMergeArgs } from "./types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ITallyData } from "@maci-protocol/sdk";
|
|
3
3
|
import { FileService } from "../file/file.service";
|
|
4
|
+
import { IGetPublicKeyData } from "../file/types";
|
|
4
5
|
import { GenerateProofDto, SubmitProofsDto } from "./dto";
|
|
5
6
|
import { ProofGeneratorService } from "./proof.service";
|
|
6
7
|
export declare class ProofController {
|
|
@@ -35,7 +36,7 @@ export declare class ProofController {
|
|
|
35
36
|
* Submit proofs on-chain api method
|
|
36
37
|
* @param args - submit proofs on-chain args
|
|
37
38
|
*/
|
|
38
|
-
submit(args: SubmitProofsDto): Promise<
|
|
39
|
+
submit(args: SubmitProofsDto): Promise<ITallyData>;
|
|
39
40
|
/**
|
|
40
41
|
* Get RSA public key for authorization setup
|
|
41
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.controller.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"proof.controller.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.controller.ts"],"names":[],"mappings":"AA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E,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;IAC3F,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;IAC1E,MAAM,EAAE;IACR,GAAG,CAAC,WAAW,CAAC;;;;mDAMhB;AAnFU,eAAe;IAJ3B,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,EAAE;IACf,UAAU,CAAC,UAAU,CAAC;IACtB,SAAS,CAAC,qBAAqB,CAAC;qCAcW,qBAAqB;QAC/B,WAAW;GAdhC,eAAe,CAoF3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IGenerateProofsOptions } from "@maci-protocol/sdk";
|
|
2
|
-
import { IProof } from "@maci-protocol/sdk";
|
|
2
|
+
import { IProof, ITallyData } from "@maci-protocol/sdk";
|
|
3
3
|
import type { IGenerateArgs, IGenerateData, IMergeArgs, ISubmitProofsArgs } from "./types";
|
|
4
4
|
import { CryptoService } from "../crypto/crypto.service";
|
|
5
5
|
import { FileService } from "../file/file.service";
|
|
@@ -36,7 +36,7 @@ export declare class ProofGeneratorService {
|
|
|
36
36
|
* @param args - generate proofs arguments
|
|
37
37
|
* @returns - generated proofs for message processing and tally
|
|
38
38
|
*/
|
|
39
|
-
generate({ poll, maciContractAddress,
|
|
39
|
+
generate({ approval, sessionKeyAddress, chain, poll, maciContractAddress, mode, encryptedCoordinatorPrivateKey, startBlock, endBlock, blocksPerBatch, }: IGenerateArgs, options?: IGenerateProofsOptions): Promise<IGenerateData>;
|
|
40
40
|
/**
|
|
41
41
|
* Merge state and message trees
|
|
42
42
|
*
|
|
@@ -49,6 +49,6 @@ export declare class ProofGeneratorService {
|
|
|
49
49
|
*
|
|
50
50
|
* @param args - submit proofs on-chain arguments
|
|
51
51
|
*/
|
|
52
|
-
submit({ maciContractAddress, pollId, chain }: ISubmitProofsArgs): Promise<
|
|
52
|
+
submit({ maciContractAddress, pollId, sessionKeyAddress, approval, chain, }: ISubmitProofsArgs): Promise<ITallyData>;
|
|
53
53
|
}
|
|
54
54
|
//# sourceMappingURL=proof.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.service.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"proof.service.d.ts","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,sBAAsB,EAG5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAgC,MAAM,oBAAoB,CAAC;AAOtF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE;;GAEG;AACH,qBACa,qBAAqB;IAe9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAhBrC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;gBAEgB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB;IAOzD;;;;;OAKG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAY9E;;;;;OAKG;IACG,QAAQ,CACZ,EACE,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,IAAI,EACJ,mBAAmB,EACnB,IAAI,EACJ,8BAA8B,EAC9B,UAAU,EACV,QAAQ,EACR,cAAc,GACf,EAAE,aAAa,EAChB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,aAAa,CAAC;IAmEzB;;;;;OAKG;IACG,KAAK,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9G;;;;OAIG;IACG,MAAM,CAAC,EACX,mBAAmB,EACnB,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;CAiB3C"}
|
|
@@ -9,14 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
var ProofGeneratorService_1;
|
|
11
11
|
import { Keypair, PrivateKey, PublicKey } from "@maci-protocol/domainobjs";
|
|
12
|
-
import { Deployment, EContracts,
|
|
12
|
+
import { Deployment, EContracts, getPoll, mergeSignups, } from "@maci-protocol/sdk";
|
|
13
|
+
import { generateProofs, proveOnChain } from "@maci-protocol/sdk";
|
|
13
14
|
import { Logger, Injectable } from "@nestjs/common";
|
|
14
|
-
import { ZeroAddress } from "ethers";
|
|
15
15
|
import hre from "hardhat";
|
|
16
16
|
import fs from "fs";
|
|
17
17
|
import path from "path";
|
|
18
18
|
import { ErrorCodes } from "../common";
|
|
19
|
-
import { getPublicClient } from "../common/accountAbstraction";
|
|
20
19
|
import { CryptoService } from "../crypto/crypto.service";
|
|
21
20
|
import { FileService } from "../file/file.service";
|
|
22
21
|
import { SessionKeysService } from "../sessionKeys/sessionKeys.service";
|
|
@@ -65,13 +64,9 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
65
64
|
* @param args - generate proofs arguments
|
|
66
65
|
* @returns - generated proofs for message processing and tally
|
|
67
66
|
*/
|
|
68
|
-
async generate({ poll, maciContractAddress,
|
|
67
|
+
async generate({ approval, sessionKeyAddress, chain, poll, maciContractAddress, mode, encryptedCoordinatorPrivateKey, startBlock, endBlock, blocksPerBatch, }, options) {
|
|
69
68
|
try {
|
|
70
|
-
const
|
|
71
|
-
name: EContracts.MACI,
|
|
72
|
-
address: maciContractAddress,
|
|
73
|
-
});
|
|
74
|
-
const signer = await this.deployment.getDeployer();
|
|
69
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
75
70
|
const pollData = await getPoll({
|
|
76
71
|
maciAddress: maciContractAddress,
|
|
77
72
|
pollId: poll,
|
|
@@ -81,14 +76,7 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
81
76
|
name: EContracts.Poll,
|
|
82
77
|
address: pollData.address,
|
|
83
78
|
});
|
|
84
|
-
const
|
|
85
|
-
pollContract.coordinatorPublicKey(),
|
|
86
|
-
pollContract.stateMerged(),
|
|
87
|
-
]);
|
|
88
|
-
if (!isStateAqMerged) {
|
|
89
|
-
this.logger.error(`Error: ${ErrorCodes.NOT_MERGED_STATE_TREE}, state tree is not merged`);
|
|
90
|
-
throw new Error(ErrorCodes.NOT_MERGED_STATE_TREE.toString());
|
|
91
|
-
}
|
|
79
|
+
const coordinatorPublicKey = await pollContract.coordinatorPublicKey();
|
|
92
80
|
const { privateKey } = await this.fileService.getPrivateKey();
|
|
93
81
|
const maciPrivateKey = PrivateKey.deserialize(this.cryptoService.decrypt(privateKey, encryptedCoordinatorPrivateKey));
|
|
94
82
|
const coordinatorKeypair = new Keypair(maciPrivateKey);
|
|
@@ -100,39 +88,27 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
100
88
|
this.logger.error(`Error: ${ErrorCodes.PRIVATE_KEY_MISMATCH}, wrong private key`);
|
|
101
89
|
throw new Error(ErrorCodes.PRIVATE_KEY_MISMATCH.toString());
|
|
102
90
|
}
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
maciPrivateKey,
|
|
108
|
-
coordinatorKeypair,
|
|
109
|
-
pollId: poll,
|
|
91
|
+
const tally = this.fileService.getZkeyFilePaths(process.env.COORDINATOR_TALLY_ZKEY_NAME, mode);
|
|
92
|
+
const messageProcessor = this.fileService.getZkeyFilePaths(process.env.COORDINATOR_MESSAGE_PROCESS_ZKEY_NAME, mode);
|
|
93
|
+
const { processProofs, tallyProofs, tallyData } = await generateProofs({
|
|
94
|
+
outputDir: path.resolve("./proofs"),
|
|
95
|
+
coordinatorPrivateKey: maciPrivateKey.serialize(),
|
|
110
96
|
signer,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
const foundPoll = maciState.polls.get(BigInt(poll));
|
|
119
|
-
if (!foundPoll) {
|
|
120
|
-
this.logger.error(`Error: ${ErrorCodes.POLL_NOT_FOUND}, Poll ${poll} not found in maci state`);
|
|
121
|
-
throw new Error(ErrorCodes.POLL_NOT_FOUND.toString());
|
|
122
|
-
}
|
|
123
|
-
const proofGenerator = new ProofGenerator({
|
|
124
|
-
poll: foundPoll,
|
|
125
|
-
maciContractAddress,
|
|
126
|
-
tallyContractAddress,
|
|
127
|
-
tally: this.fileService.getZkeyFilePaths(process.env.COORDINATOR_TALLY_ZKEY_NAME, useQuadraticVoting),
|
|
128
|
-
messageProcessor: this.fileService.getZkeyFilePaths(process.env.COORDINATOR_MESSAGE_PROCESS_ZKEY_NAME, useQuadraticVoting),
|
|
97
|
+
maciAddress: maciContractAddress,
|
|
98
|
+
pollId: BigInt(poll),
|
|
99
|
+
startBlock,
|
|
100
|
+
endBlock,
|
|
101
|
+
blocksPerBatch,
|
|
129
102
|
rapidsnark: process.env.COORDINATOR_RAPIDSNARK_EXE,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
103
|
+
mode,
|
|
104
|
+
tallyZkey: tally.zkey,
|
|
105
|
+
tallyWitgen: tally.witgen,
|
|
106
|
+
tallyWasm: tally.wasm,
|
|
107
|
+
processZkey: messageProcessor.zkey,
|
|
108
|
+
processWitgen: messageProcessor.witgen,
|
|
109
|
+
processWasm: messageProcessor.wasm,
|
|
110
|
+
tallyFile: path.resolve("./tally.json"),
|
|
133
111
|
});
|
|
134
|
-
const processProofs = await proofGenerator.generateMpProofs(options);
|
|
135
|
-
const { proofs: tallyProofs, tallyData } = await proofGenerator.generateTallyProofs(hre.network.name, String(hre.network.config.chainId || 1), options);
|
|
136
112
|
return {
|
|
137
113
|
processProofs,
|
|
138
114
|
tallyProofs,
|
|
@@ -151,9 +127,7 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
151
127
|
* @returns whether the proofs were successfully merged
|
|
152
128
|
*/
|
|
153
129
|
async merge({ maciContractAddress, pollId, approval, sessionKeyAddress, chain }) {
|
|
154
|
-
|
|
155
|
-
const kernelClient = await this.sessionKeysService.generateClientFromSessionKey(sessionKeyAddress, approval, chain);
|
|
156
|
-
const signer = await this.sessionKeysService.getKernelClientSigner(kernelClient);
|
|
130
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
157
131
|
await mergeSignups({
|
|
158
132
|
maciAddress: maciContractAddress,
|
|
159
133
|
pollId: BigInt(pollId),
|
|
@@ -166,74 +140,19 @@ let ProofGeneratorService = ProofGeneratorService_1 = class ProofGeneratorServic
|
|
|
166
140
|
*
|
|
167
141
|
* @param args - submit proofs on-chain arguments
|
|
168
142
|
*/
|
|
169
|
-
async submit({ maciContractAddress, pollId, chain }) {
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
const pollAddress = pollContracts.poll;
|
|
179
|
-
if (pollAddress.toLowerCase() === ZeroAddress.toLowerCase()) {
|
|
180
|
-
this.logger.error(`Error: ${ErrorCodes.POLL_NOT_FOUND}, Poll ${pollId} not found`);
|
|
181
|
-
throw new Error(ErrorCodes.POLL_NOT_FOUND.toString());
|
|
182
|
-
}
|
|
183
|
-
// check if state tree has been merged
|
|
184
|
-
const isStateMerged = await publicClient.readContract({
|
|
185
|
-
address: pollAddress,
|
|
186
|
-
abi: PollFactory.abi,
|
|
187
|
-
functionName: "stateMerged",
|
|
143
|
+
async submit({ maciContractAddress, pollId, sessionKeyAddress, approval, chain, }) {
|
|
144
|
+
const signer = await this.sessionKeysService.getCoordinatorSigner(chain, sessionKeyAddress, approval);
|
|
145
|
+
const tallyData = await proveOnChain({
|
|
146
|
+
pollId: BigInt(pollId),
|
|
147
|
+
maciAddress: maciContractAddress,
|
|
148
|
+
proofDir: "./proofs",
|
|
149
|
+
tallyFile: "./tally.json",
|
|
150
|
+
signer,
|
|
188
151
|
});
|
|
189
|
-
if (!
|
|
190
|
-
|
|
191
|
-
throw new Error(ErrorCodes.NOT_MERGED_STATE_TREE.toString());
|
|
152
|
+
if (!tallyData) {
|
|
153
|
+
throw new Error("Tally data is undefined");
|
|
192
154
|
}
|
|
193
|
-
|
|
194
|
-
this.deployment.getContract({
|
|
195
|
-
name: EContracts.MACI,
|
|
196
|
-
address: maciContractAddress,
|
|
197
|
-
}),
|
|
198
|
-
this.deployment.getContract({
|
|
199
|
-
name: EContracts.MessageProcessor,
|
|
200
|
-
address: pollContracts.messageProcessor,
|
|
201
|
-
}),
|
|
202
|
-
this.deployment.getContract({
|
|
203
|
-
name: EContracts.Poll,
|
|
204
|
-
address: pollContracts.poll,
|
|
205
|
-
}),
|
|
206
|
-
this.deployment.getContract({
|
|
207
|
-
name: EContracts.Tally,
|
|
208
|
-
address: pollContracts.tally,
|
|
209
|
-
}),
|
|
210
|
-
this.deployment.getContract({ name: EContracts.VerifyingKeysRegistry }),
|
|
211
|
-
this.deployment.getContract({ name: EContracts.Verifier }),
|
|
212
|
-
]);
|
|
213
|
-
const prover = new Prover({
|
|
214
|
-
maciContract,
|
|
215
|
-
mpContract,
|
|
216
|
-
pollContract,
|
|
217
|
-
tallyContract,
|
|
218
|
-
verifyingKeysRegistryContract,
|
|
219
|
-
verifierContract,
|
|
220
|
-
});
|
|
221
|
-
const data = {
|
|
222
|
-
processProofs: await this.readProofs(path.resolve("./proofs"), "process"),
|
|
223
|
-
tallyProofs: await this.readProofs(path.resolve("./proofs"), "tally"),
|
|
224
|
-
};
|
|
225
|
-
// prove message processing
|
|
226
|
-
await prover.proveMessageProcessing(data.processProofs);
|
|
227
|
-
// read tally data
|
|
228
|
-
const tallyData = await fs.promises
|
|
229
|
-
.readFile("./tally.json", "utf8")
|
|
230
|
-
.then((result) => JSON.parse(result));
|
|
231
|
-
// prove tally
|
|
232
|
-
await prover.proveTally(data.tallyProofs);
|
|
233
|
-
// submit results
|
|
234
|
-
const voteOptions = Number(await pollContract.voteOptions());
|
|
235
|
-
await prover.submitResults(tallyData, voteOptions);
|
|
236
|
-
return true;
|
|
155
|
+
return tallyData;
|
|
237
156
|
}
|
|
238
157
|
};
|
|
239
158
|
ProofGeneratorService = ProofGeneratorService_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof.service.js","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,UAAU,
|
|
1
|
+
{"version":3,"file":"proof.service.js","sourceRoot":"","sources":["../../../ts/proof/proof.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,UAAU,EAGV,OAAO,EACP,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAsB,cAAc,EAA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MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAA;AA/KY,qBAAqB;IADjC,UAAU,EAAE;qCAgBuB,aAAa;QACf,WAAW;QACJ,kBAAkB;GAjB9C,qBAAqB,CA+KjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ITallyData, IProof } from "@maci-protocol/sdk";
|
|
1
|
+
import type { ITallyData, IProof, EMode } from "@maci-protocol/sdk";
|
|
2
2
|
import type { Hex } from "viem";
|
|
3
3
|
import { ESupportedNetworks } from "../common";
|
|
4
4
|
/**
|
|
@@ -24,6 +24,18 @@ export interface IReadProofsResults {
|
|
|
24
24
|
* Interface that represents generate proofs arguments
|
|
25
25
|
*/
|
|
26
26
|
export interface IGenerateArgs {
|
|
27
|
+
/**
|
|
28
|
+
* Approval for the session key
|
|
29
|
+
*/
|
|
30
|
+
approval?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Session key address
|
|
33
|
+
*/
|
|
34
|
+
sessionKeyAddress?: Hex;
|
|
35
|
+
/**
|
|
36
|
+
* Chain
|
|
37
|
+
*/
|
|
38
|
+
chain: ESupportedNetworks;
|
|
27
39
|
/**
|
|
28
40
|
* Poll id
|
|
29
41
|
*/
|
|
@@ -32,14 +44,10 @@ export interface IGenerateArgs {
|
|
|
32
44
|
* Maci contract address
|
|
33
45
|
*/
|
|
34
46
|
maciContractAddress: string;
|
|
35
|
-
/**
|
|
36
|
-
* Tally contract address
|
|
37
|
-
*/
|
|
38
|
-
tallyContractAddress: string;
|
|
39
47
|
/**
|
|
40
48
|
* Whether to use Qv or NonQv
|
|
41
49
|
*/
|
|
42
|
-
|
|
50
|
+
mode: EMode;
|
|
43
51
|
/**
|
|
44
52
|
* Encrypted coordinator private key with RSA public key (see .env.example)
|
|
45
53
|
*/
|
|
@@ -102,11 +110,11 @@ export interface IMergeArgs {
|
|
|
102
110
|
/**
|
|
103
111
|
* Approval for the session key
|
|
104
112
|
*/
|
|
105
|
-
approval
|
|
113
|
+
approval?: string;
|
|
106
114
|
/**
|
|
107
115
|
* Session key address
|
|
108
116
|
*/
|
|
109
|
-
sessionKeyAddress
|
|
117
|
+
sessionKeyAddress?: Hex;
|
|
110
118
|
/**
|
|
111
119
|
* Chain
|
|
112
120
|
*/
|
|
@@ -127,11 +135,11 @@ export interface ISubmitProofsArgs {
|
|
|
127
135
|
/**
|
|
128
136
|
* Approval for the session key
|
|
129
137
|
*/
|
|
130
|
-
approval
|
|
138
|
+
approval?: string;
|
|
131
139
|
/**
|
|
132
140
|
* Session key address
|
|
133
141
|
*/
|
|
134
|
-
sessionKeyAddress
|
|
142
|
+
sessionKeyAddress?: Hex;
|
|
135
143
|
/**
|
|
136
144
|
* Chain
|
|
137
145
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../ts/proof/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../ts/proof/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,oBAAY,sBAAsB;IAChC,KAAK,qBAAqB;IAC1B,QAAQ,wBAAwB;IAChC,MAAM,sBAAsB;IAC5B,KAAK,cAAc;CACpB;AAKD,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;I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