@maci-protocol/testing 0.0.0-ci.f433bba → 0.0.0-ci.f4e2c46

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.
Files changed (51) hide show
  1. package/LICENSE +1 -2
  2. package/build/ts/__tests__/e2e.full.test.d.ts +2 -0
  3. package/build/ts/__tests__/e2e.full.test.d.ts.map +1 -0
  4. package/build/ts/__tests__/e2e.full.test.js +844 -0
  5. package/build/ts/__tests__/e2e.full.test.js.map +1 -0
  6. package/build/ts/__tests__/e2e.nonQv.test.js +420 -34
  7. package/build/ts/__tests__/e2e.nonQv.test.js.map +1 -1
  8. package/build/ts/__tests__/e2e.test.js +250 -261
  9. package/build/ts/__tests__/e2e.test.js.map +1 -1
  10. package/build/ts/__tests__/integration.test.js +53 -52
  11. package/build/ts/__tests__/integration.test.js.map +1 -1
  12. package/build/ts/__tests__/keyChange.test.js +69 -72
  13. package/build/ts/__tests__/keyChange.test.js.map +1 -1
  14. package/build/ts/__tests__/maciKeys.test.d.ts +2 -0
  15. package/build/ts/__tests__/maciKeys.test.d.ts.map +1 -0
  16. package/build/ts/__tests__/maciKeys.test.js +78 -0
  17. package/build/ts/__tests__/maciKeys.test.js.map +1 -0
  18. package/build/ts/__tests__/unit/joinPoll.test.js +92 -25
  19. package/build/ts/__tests__/unit/joinPoll.test.js.map +1 -1
  20. package/build/ts/__tests__/unit/poll.test.js +5 -5
  21. package/build/ts/__tests__/unit/poll.test.js.map +1 -1
  22. package/build/ts/__tests__/unit/publish.test.js +8 -8
  23. package/build/ts/__tests__/unit/publish.test.js.map +1 -1
  24. package/build/ts/__tests__/unit/signup.test.js +8 -8
  25. package/build/ts/__tests__/unit/signup.test.js.map +1 -1
  26. package/build/ts/__tests__/unit/utils.test.js +12 -12
  27. package/build/ts/__tests__/unit/utils.test.js.map +1 -1
  28. package/build/ts/constants.d.ts +52 -53
  29. package/build/ts/constants.d.ts.map +1 -1
  30. package/build/ts/constants.js +98 -74
  31. package/build/ts/constants.js.map +1 -1
  32. package/build/ts/testingClass.d.ts +7 -7
  33. package/build/ts/testingClass.d.ts.map +1 -1
  34. package/build/ts/testingClass.js +26 -25
  35. package/build/ts/testingClass.js.map +1 -1
  36. package/build/ts/types.d.ts +11 -11
  37. package/build/ts/types.d.ts.map +1 -1
  38. package/build/ts/user.d.ts +5 -9
  39. package/build/ts/user.d.ts.map +1 -1
  40. package/build/ts/user.js +5 -6
  41. package/build/ts/user.js.map +1 -1
  42. package/build/ts/utils.d.ts +3 -3
  43. package/build/ts/utils.d.ts.map +1 -1
  44. package/build/ts/utils.js +12 -12
  45. package/build/ts/utils.js.map +1 -1
  46. package/build/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +13 -12
  48. package/build/ts/__tests__/maci-keys.test.d.ts +0 -2
  49. package/build/ts/__tests__/maci-keys.test.d.ts.map +0 -1
  50. package/build/ts/__tests__/maci-keys.test.js +0 -78
  51. package/build/ts/__tests__/maci-keys.test.js.map +0 -1
@@ -0,0 +1,844 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@maci-protocol/core");
4
+ const crypto_1 = require("@maci-protocol/crypto");
5
+ const domainobjs_1 = require("@maci-protocol/domainobjs");
6
+ const sdk_1 = require("@maci-protocol/sdk");
7
+ const chai_1 = require("chai");
8
+ const constants_1 = require("../constants");
9
+ const utils_1 = require("../utils");
10
+ /**
11
+ Test scenarios:
12
+ 1 signup, 1 message
13
+ 1 signup, 1 relayed message
14
+ 1 signup, 2 valid messages
15
+ 1 signup, 2 valid and 2 invalid messages
16
+ 4 signups, 8 messages, 16 relayed messages
17
+ 30 signups (31 ballots), 21 messages
18
+ 30 signups, 30 invalid and 1 valid messages
19
+ */
20
+ describe("e2e tests with full credits voting", function test() {
21
+ const useWasm = (0, sdk_1.isArm)();
22
+ this.timeout(900000);
23
+ let maciAddresses;
24
+ let initialVoiceCreditProxyContractAddress;
25
+ let verifierContractAddress;
26
+ let signer;
27
+ let verifyingKeysRegistryAddress;
28
+ const generateProofsArgs = {
29
+ outputDir: constants_1.testProofsDirPath,
30
+ tallyFile: constants_1.testTallyFilePath,
31
+ voteTallyZkey: constants_1.testTallyVotesFullZkeyPath,
32
+ messageProcessorZkey: constants_1.testProcessMessageFullZkeyPath,
33
+ pollId: 0n,
34
+ rapidsnark: constants_1.testRapidsnarkPath,
35
+ messageProcessorWitnessGenerator: constants_1.testProcessMessagesFullWitnessPath,
36
+ messageProcessorWitnessDatFile: constants_1.testProcessMessagesFullWitnessDatPath,
37
+ voteTallyWitnessGenerator: constants_1.testTallyVotesFullWitnessPath,
38
+ voteTallyWitnessDatFile: constants_1.testTallyVotesFullWitnessDatPath,
39
+ coordinatorPrivateKey: constants_1.coordinatorPrivateKey,
40
+ messageProcessorWasm: constants_1.testProcessMessagesFullWasmPath,
41
+ voteTallyWasm: constants_1.testTallyVotesFullWasmPath,
42
+ useWasm,
43
+ mode: sdk_1.EMode.FULL,
44
+ };
45
+ const prepareTest = async () => {
46
+ const [signupPolicy, , signupPolicyFactory, signupCheckerFactory] = await (0, sdk_1.deployFreeForAllSignUpPolicy)({}, signer, true);
47
+ const signupPolicyContractAddress = await signupPolicy.getAddress();
48
+ const [pollPolicy] = await (0, sdk_1.deployFreeForAllSignUpPolicy)({ policy: signupPolicyFactory, checker: signupCheckerFactory }, signer, true);
49
+ const pollPolicyContractAddress = await pollPolicy.getAddress();
50
+ // deploy the smart contracts
51
+ const maciContractsAddresses = await (0, sdk_1.deployMaci)({
52
+ ...constants_1.deployArgs,
53
+ signer,
54
+ signupPolicyAddress: signupPolicyContractAddress,
55
+ });
56
+ const startDate = await (0, sdk_1.getBlockTimestamp)(signer);
57
+ // deploy a poll contract
58
+ await (0, sdk_1.deployPoll)({
59
+ ...constants_1.deployPollArgs,
60
+ signer,
61
+ pollStartTimestamp: startDate,
62
+ pollEndTimestamp: startDate + constants_1.pollDuration,
63
+ relayers: [await signer.getAddress()],
64
+ maciAddress: maciContractsAddresses.maciContractAddress,
65
+ verifierContractAddress,
66
+ verifyingKeysRegistryContractAddress: verifyingKeysRegistryAddress,
67
+ policyContractAddress: pollPolicyContractAddress,
68
+ initialVoiceCreditProxyContractAddress,
69
+ mode: sdk_1.EMode.FULL,
70
+ });
71
+ return maciContractsAddresses;
72
+ };
73
+ // before all tests we deploy the verifying keys registry contract and set the verifying keys
74
+ before(async () => {
75
+ signer = await (0, sdk_1.getDefaultSigner)();
76
+ // we deploy the verifying keys registry contract
77
+ verifyingKeysRegistryAddress = await (0, sdk_1.deployVerifyingKeysRegistryContract)({ signer });
78
+ const [initialVoiceCreditProxy] = await (0, sdk_1.deployConstantInitialVoiceCreditProxy)({ amount: constants_1.DEFAULT_INITIAL_VOICE_CREDITS }, signer, undefined, true);
79
+ initialVoiceCreditProxyContractAddress = await initialVoiceCreditProxy.getAddress();
80
+ const verifier = await (0, sdk_1.deployVerifier)(signer, true);
81
+ verifierContractAddress = await verifier.getAddress();
82
+ // we deploy the verifying keys registry contract
83
+ verifyingKeysRegistryAddress = await (0, sdk_1.deployVerifyingKeysRegistryContract)({ signer });
84
+ // we set the verifying keys
85
+ await (0, sdk_1.setVerifyingKeys)({ ...(await (0, constants_1.verifyingKeysArgs)(signer, sdk_1.EMode.FULL)), verifyingKeysRegistryAddress });
86
+ });
87
+ describe("1 signup, 1 message", () => {
88
+ after(async () => {
89
+ await (0, utils_1.clean)();
90
+ });
91
+ const user = new domainobjs_1.Keypair();
92
+ before(async () => {
93
+ // deploy the smart contracts
94
+ maciAddresses = await prepareTest();
95
+ });
96
+ it("should signup one user", async () => {
97
+ await (0, sdk_1.signup)({
98
+ maciAddress: maciAddresses.maciContractAddress,
99
+ maciPublicKey: user.publicKey.serialize(),
100
+ sgData: constants_1.DEFAULT_SG_DATA,
101
+ signer,
102
+ });
103
+ });
104
+ it("should join one user", async () => {
105
+ await (0, sdk_1.joinPoll)({
106
+ maciAddress: maciAddresses.maciContractAddress,
107
+ privateKey: user.privateKey.serialize(),
108
+ pollId: 0n,
109
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
110
+ useWasm: true,
111
+ pollWasm: constants_1.testPollJoiningWasmPath,
112
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
113
+ rapidsnark: constants_1.testRapidsnarkPath,
114
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
115
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
116
+ signer,
117
+ });
118
+ });
119
+ it("should publish one message", async () => {
120
+ await (0, sdk_1.publish)({
121
+ publicKey: user.publicKey.serialize(),
122
+ stateIndex: 1n,
123
+ voteOptionIndex: 0n,
124
+ nonce: 1n,
125
+ pollId: 0n,
126
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
127
+ maciAddress: maciAddresses.maciContractAddress,
128
+ salt: (0, crypto_1.generateRandomSalt)(),
129
+ privateKey: user.privateKey.serialize(),
130
+ signer,
131
+ });
132
+ });
133
+ it("should generate zk-SNARK proofs and verify them", async () => {
134
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
135
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
136
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
137
+ ...generateProofsArgs,
138
+ signer,
139
+ maciAddress: maciAddresses.maciContractAddress,
140
+ mode: sdk_1.EMode.FULL,
141
+ });
142
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
143
+ await (0, sdk_1.verify)({
144
+ ...(await (0, constants_1.verifyArgs)(signer)),
145
+ tallyData: tallyFileData,
146
+ maciAddress: tallyFileData.maci,
147
+ });
148
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString());
149
+ tallyFileData.results.tally.forEach((result, index) => {
150
+ (0, chai_1.expect)(result.toString()).to.eq(index === 0 ? constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString() : "0");
151
+ });
152
+ });
153
+ });
154
+ describe("1 signup, 1 relayed message", () => {
155
+ after(async () => {
156
+ await (0, utils_1.clean)();
157
+ });
158
+ const user = new domainobjs_1.Keypair();
159
+ before(async () => {
160
+ // deploy the smart contracts
161
+ maciAddresses = await prepareTest();
162
+ });
163
+ it("should signup one user", async () => {
164
+ await (0, sdk_1.signup)({
165
+ maciAddress: maciAddresses.maciContractAddress,
166
+ maciPublicKey: user.publicKey.serialize(),
167
+ sgData: constants_1.DEFAULT_SG_DATA,
168
+ signer,
169
+ });
170
+ });
171
+ it("should join one user", async () => {
172
+ await (0, sdk_1.joinPoll)({
173
+ maciAddress: maciAddresses.maciContractAddress,
174
+ privateKey: user.privateKey.serialize(),
175
+ pollId: 0n,
176
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
177
+ useWasm: true,
178
+ pollWasm: constants_1.testPollJoiningWasmPath,
179
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
180
+ rapidsnark: constants_1.testRapidsnarkPath,
181
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
182
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
183
+ signer,
184
+ });
185
+ });
186
+ it("should relay one message", async () => {
187
+ const { message, ephemeralKeypair } = (0, sdk_1.generateVote)({
188
+ pollId: 0n,
189
+ voteOptionIndex: 0n,
190
+ salt: (0, crypto_1.generateRandomSalt)(),
191
+ nonce: 1n,
192
+ privateKey: user.privateKey,
193
+ stateIndex: 1n,
194
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
195
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
196
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
197
+ newPublicKey: user.publicKey,
198
+ });
199
+ const messages = [
200
+ {
201
+ maciAddress: maciAddresses.maciContractAddress,
202
+ poll: 0,
203
+ data: message.data.map(String),
204
+ publicKey: ephemeralKeypair.publicKey.asArray().map(String),
205
+ hash: message.hash(ephemeralKeypair.publicKey).toString(),
206
+ },
207
+ ];
208
+ await (0, utils_1.relayTestMessages)({ messages, signer, pollId: 0, maciAddress: maciAddresses.maciContractAddress });
209
+ });
210
+ it("should generate zk-SNARK proofs and verify them", async () => {
211
+ const ipfsMessageBackupFiles = await (0, utils_1.getBackupFilenames)();
212
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
213
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
214
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
215
+ ...generateProofsArgs,
216
+ signer,
217
+ maciAddress: maciAddresses.maciContractAddress,
218
+ ipfsMessageBackupFiles,
219
+ mode: sdk_1.EMode.FULL,
220
+ });
221
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
222
+ await (0, sdk_1.verify)({
223
+ ...(await (0, constants_1.verifyArgs)(signer)),
224
+ tallyData: tallyFileData,
225
+ maciAddress: tallyFileData.maci,
226
+ });
227
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString());
228
+ tallyFileData.results.tally.forEach((result, index) => {
229
+ (0, chai_1.expect)(result.toString()).to.eq(index === 0 ? constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString() : "0");
230
+ });
231
+ });
232
+ });
233
+ describe("1 signup, 2 valid messages", () => {
234
+ after(async () => {
235
+ await (0, utils_1.clean)();
236
+ });
237
+ const user = new domainobjs_1.Keypair();
238
+ before(async () => {
239
+ // deploy the smart contracts
240
+ maciAddresses = await prepareTest();
241
+ });
242
+ it("should signup one user", async () => {
243
+ await (0, sdk_1.signup)({
244
+ maciAddress: maciAddresses.maciContractAddress,
245
+ maciPublicKey: user.publicKey.serialize(),
246
+ sgData: constants_1.DEFAULT_SG_DATA,
247
+ signer,
248
+ });
249
+ });
250
+ it("should join one user", async () => {
251
+ await (0, sdk_1.joinPoll)({
252
+ maciAddress: maciAddresses.maciContractAddress,
253
+ privateKey: user.privateKey.serialize(),
254
+ pollId: 0n,
255
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
256
+ useWasm: true,
257
+ pollWasm: constants_1.testPollJoiningWasmPath,
258
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
259
+ rapidsnark: constants_1.testRapidsnarkPath,
260
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
261
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
262
+ signer,
263
+ });
264
+ });
265
+ it("should publish two messages", async () => {
266
+ await (0, sdk_1.publish)({
267
+ publicKey: user.publicKey.serialize(),
268
+ stateIndex: 1n,
269
+ voteOptionIndex: 0n,
270
+ nonce: 1n,
271
+ pollId: 0n,
272
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
273
+ maciAddress: maciAddresses.maciContractAddress,
274
+ salt: (0, crypto_1.generateRandomSalt)(),
275
+ privateKey: user.privateKey.serialize(),
276
+ signer,
277
+ });
278
+ await (0, sdk_1.publish)({
279
+ publicKey: user.publicKey.serialize(),
280
+ stateIndex: 1n,
281
+ voteOptionIndex: 1n,
282
+ nonce: 1n,
283
+ pollId: 0n,
284
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
285
+ maciAddress: maciAddresses.maciContractAddress,
286
+ salt: (0, crypto_1.generateRandomSalt)(),
287
+ privateKey: user.privateKey.serialize(),
288
+ signer,
289
+ });
290
+ });
291
+ it("should generate zk-SNARK proofs and verify them", async () => {
292
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
293
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
294
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
295
+ ...generateProofsArgs,
296
+ signer,
297
+ maciAddress: maciAddresses.maciContractAddress,
298
+ mode: sdk_1.EMode.FULL,
299
+ });
300
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
301
+ await (0, sdk_1.verify)({
302
+ ...(await (0, constants_1.verifyArgs)(signer)),
303
+ tallyData: tallyFileData,
304
+ maciAddress: tallyFileData.maci,
305
+ });
306
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString());
307
+ tallyFileData.results.tally.forEach((result, index) => {
308
+ (0, chai_1.expect)(result.toString()).to.eq(index === 1 ? constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString() : "0");
309
+ });
310
+ });
311
+ });
312
+ describe("1 signup, 2 valid and 2 invalid message", () => {
313
+ after(async () => {
314
+ await (0, utils_1.clean)();
315
+ });
316
+ const user = new domainobjs_1.Keypair();
317
+ before(async () => {
318
+ // deploy the smart contracts
319
+ maciAddresses = await prepareTest();
320
+ });
321
+ it("should signup one user", async () => {
322
+ await (0, sdk_1.signup)({
323
+ maciAddress: maciAddresses.maciContractAddress,
324
+ maciPublicKey: user.publicKey.serialize(),
325
+ sgData: constants_1.DEFAULT_SG_DATA,
326
+ signer,
327
+ });
328
+ });
329
+ it("should join one user", async () => {
330
+ await (0, sdk_1.joinPoll)({
331
+ maciAddress: maciAddresses.maciContractAddress,
332
+ privateKey: user.privateKey.serialize(),
333
+ pollId: 0n,
334
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
335
+ useWasm: true,
336
+ pollWasm: constants_1.testPollJoiningWasmPath,
337
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
338
+ rapidsnark: constants_1.testRapidsnarkPath,
339
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
340
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
341
+ signer,
342
+ });
343
+ });
344
+ it("should publish two valid and two invalid messages", async () => {
345
+ await (0, sdk_1.publish)({
346
+ publicKey: user.publicKey.serialize(),
347
+ stateIndex: 1n,
348
+ voteOptionIndex: 0n,
349
+ nonce: 1n,
350
+ pollId: 0n,
351
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
352
+ maciAddress: maciAddresses.maciContractAddress,
353
+ salt: (0, crypto_1.generateRandomSalt)(),
354
+ privateKey: user.privateKey.serialize(),
355
+ signer,
356
+ });
357
+ await (0, sdk_1.publish)({
358
+ publicKey: user.publicKey.serialize(),
359
+ stateIndex: 1n,
360
+ voteOptionIndex: 1n,
361
+ nonce: 1n,
362
+ pollId: 0n,
363
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
364
+ maciAddress: maciAddresses.maciContractAddress,
365
+ salt: (0, crypto_1.generateRandomSalt)(),
366
+ privateKey: user.privateKey.serialize(),
367
+ signer,
368
+ });
369
+ await (0, sdk_1.publish)({
370
+ publicKey: user.publicKey.serialize(),
371
+ stateIndex: 1n,
372
+ voteOptionIndex: 1n,
373
+ nonce: 1n,
374
+ pollId: 0n,
375
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS - 10),
376
+ maciAddress: maciAddresses.maciContractAddress,
377
+ salt: (0, crypto_1.generateRandomSalt)(),
378
+ privateKey: user.privateKey.serialize(),
379
+ signer,
380
+ });
381
+ await (0, sdk_1.publish)({
382
+ publicKey: user.publicKey.serialize(),
383
+ stateIndex: 1n,
384
+ voteOptionIndex: 1n,
385
+ nonce: 1n,
386
+ pollId: 0n,
387
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS + 10),
388
+ maciAddress: maciAddresses.maciContractAddress,
389
+ salt: (0, crypto_1.generateRandomSalt)(),
390
+ privateKey: user.privateKey.serialize(),
391
+ signer,
392
+ });
393
+ });
394
+ it("should generate zk-SNARK proofs and verify them", async () => {
395
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
396
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
397
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
398
+ ...generateProofsArgs,
399
+ signer,
400
+ maciAddress: maciAddresses.maciContractAddress,
401
+ mode: sdk_1.EMode.FULL,
402
+ });
403
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
404
+ await (0, sdk_1.verify)({
405
+ ...(await (0, constants_1.verifyArgs)(signer)),
406
+ tallyData: tallyFileData,
407
+ maciAddress: tallyFileData.maci,
408
+ });
409
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString());
410
+ tallyFileData.results.tally.forEach((result, index) => {
411
+ (0, chai_1.expect)(result.toString()).to.eq(index === 1 ? constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString() : "0");
412
+ });
413
+ });
414
+ });
415
+ describe("4 signups, 8 messages, 16 relayed messages", () => {
416
+ after(async () => {
417
+ await (0, utils_1.clean)();
418
+ });
419
+ const users = [new domainobjs_1.Keypair(), new domainobjs_1.Keypair(), new domainobjs_1.Keypair(), new domainobjs_1.Keypair()];
420
+ before(async () => {
421
+ // deploy the smart contracts
422
+ maciAddresses = await prepareTest();
423
+ });
424
+ it("should signup four users", async () => {
425
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
426
+ for (let i = 0; i < users.length; i += 1) {
427
+ // eslint-disable-next-line no-await-in-loop
428
+ await (0, sdk_1.signup)({
429
+ maciAddress: maciAddresses.maciContractAddress,
430
+ maciPublicKey: users[i].publicKey.serialize(),
431
+ sgData: constants_1.DEFAULT_SG_DATA,
432
+ signer,
433
+ });
434
+ }
435
+ });
436
+ it("should join four users", async () => {
437
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
438
+ for (let i = 0; i < users.length; i += 1) {
439
+ // eslint-disable-next-line no-await-in-loop
440
+ await (0, sdk_1.joinPoll)({
441
+ maciAddress: maciAddresses.maciContractAddress,
442
+ privateKey: users[i].privateKey.serialize(),
443
+ pollId: 0n,
444
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
445
+ useWasm: true,
446
+ pollWasm: constants_1.testPollJoiningWasmPath,
447
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
448
+ rapidsnark: constants_1.testRapidsnarkPath,
449
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
450
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
451
+ signer,
452
+ });
453
+ }
454
+ });
455
+ it("should publish eight messages", async () => {
456
+ await (0, sdk_1.publish)({
457
+ publicKey: users[0].publicKey.serialize(),
458
+ stateIndex: 1n,
459
+ voteOptionIndex: 0n,
460
+ nonce: 2n,
461
+ pollId: 0n,
462
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
463
+ maciAddress: maciAddresses.maciContractAddress,
464
+ salt: (0, crypto_1.generateRandomSalt)(),
465
+ privateKey: users[0].privateKey.serialize(),
466
+ signer,
467
+ });
468
+ await (0, sdk_1.publish)({
469
+ publicKey: users[0].publicKey.serialize(),
470
+ stateIndex: 1n,
471
+ voteOptionIndex: 0n,
472
+ nonce: 2n,
473
+ pollId: 0n,
474
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
475
+ maciAddress: maciAddresses.maciContractAddress,
476
+ salt: (0, crypto_1.generateRandomSalt)(),
477
+ privateKey: users[0].privateKey.serialize(),
478
+ signer,
479
+ });
480
+ await (0, sdk_1.publish)({
481
+ publicKey: users[0].publicKey.serialize(),
482
+ stateIndex: 1n,
483
+ voteOptionIndex: 0n,
484
+ nonce: 1n,
485
+ pollId: 0n,
486
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
487
+ maciAddress: maciAddresses.maciContractAddress,
488
+ salt: (0, crypto_1.generateRandomSalt)(),
489
+ privateKey: users[0].privateKey.serialize(),
490
+ signer,
491
+ });
492
+ await (0, sdk_1.publish)({
493
+ publicKey: users[1].publicKey.serialize(),
494
+ stateIndex: 2n,
495
+ voteOptionIndex: 2n,
496
+ nonce: 1n,
497
+ pollId: 0n,
498
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
499
+ maciAddress: maciAddresses.maciContractAddress,
500
+ salt: (0, crypto_1.generateRandomSalt)(),
501
+ privateKey: users[1].privateKey.serialize(),
502
+ signer,
503
+ });
504
+ await (0, sdk_1.publish)({
505
+ publicKey: users[2].publicKey.serialize(),
506
+ stateIndex: 3n,
507
+ voteOptionIndex: 2n,
508
+ nonce: 1n,
509
+ pollId: 0n,
510
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
511
+ maciAddress: maciAddresses.maciContractAddress,
512
+ salt: (0, crypto_1.generateRandomSalt)(),
513
+ privateKey: users[2].privateKey.serialize(),
514
+ signer,
515
+ });
516
+ await (0, sdk_1.publish)({
517
+ publicKey: users[3].publicKey.serialize(),
518
+ stateIndex: 4n,
519
+ voteOptionIndex: 2n,
520
+ nonce: 3n,
521
+ pollId: 0n,
522
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
523
+ maciAddress: maciAddresses.maciContractAddress,
524
+ salt: (0, crypto_1.generateRandomSalt)(),
525
+ privateKey: users[3].privateKey.serialize(),
526
+ signer,
527
+ });
528
+ await (0, sdk_1.publish)({
529
+ publicKey: users[3].publicKey.serialize(),
530
+ stateIndex: 4n,
531
+ voteOptionIndex: 2n,
532
+ nonce: 2n,
533
+ pollId: 0n,
534
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
535
+ maciAddress: maciAddresses.maciContractAddress,
536
+ salt: (0, crypto_1.generateRandomSalt)(),
537
+ privateKey: users[3].privateKey.serialize(),
538
+ signer,
539
+ });
540
+ await (0, sdk_1.publish)({
541
+ publicKey: users[3].publicKey.serialize(),
542
+ stateIndex: 4n,
543
+ voteOptionIndex: 1n,
544
+ nonce: 1n,
545
+ pollId: 0n,
546
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
547
+ maciAddress: maciAddresses.maciContractAddress,
548
+ salt: (0, crypto_1.generateRandomSalt)(),
549
+ privateKey: users[3].privateKey.serialize(),
550
+ signer,
551
+ });
552
+ });
553
+ it("should relay sixteen messages", async () => {
554
+ const votes = [
555
+ {
556
+ pollId: 0n,
557
+ voteOptionIndex: 1n,
558
+ salt: (0, crypto_1.generateRandomSalt)(),
559
+ nonce: 2n,
560
+ privateKey: users[0].privateKey,
561
+ stateIndex: 1n,
562
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
563
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
564
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
565
+ newPublicKey: users[0].publicKey,
566
+ },
567
+ {
568
+ pollId: 0n,
569
+ voteOptionIndex: 1n,
570
+ salt: (0, crypto_1.generateRandomSalt)(),
571
+ nonce: 2n,
572
+ privateKey: users[0].privateKey,
573
+ stateIndex: 1n,
574
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
575
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
576
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
577
+ newPublicKey: users[0].publicKey,
578
+ },
579
+ {
580
+ pollId: 0n,
581
+ voteOptionIndex: 1n,
582
+ salt: (0, crypto_1.generateRandomSalt)(),
583
+ nonce: 1n,
584
+ privateKey: users[0].privateKey,
585
+ stateIndex: 1n,
586
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
587
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
588
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
589
+ newPublicKey: users[0].publicKey,
590
+ },
591
+ {
592
+ pollId: 0n,
593
+ voteOptionIndex: 1n,
594
+ salt: (0, crypto_1.generateRandomSalt)(),
595
+ nonce: 1n,
596
+ privateKey: users[1].privateKey,
597
+ stateIndex: 2n,
598
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
599
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
600
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
601
+ newPublicKey: users[1].publicKey,
602
+ },
603
+ {
604
+ pollId: 0n,
605
+ voteOptionIndex: 1n,
606
+ salt: (0, crypto_1.generateRandomSalt)(),
607
+ nonce: 1n,
608
+ privateKey: users[2].privateKey,
609
+ stateIndex: 3n,
610
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
611
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
612
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
613
+ newPublicKey: users[2].publicKey,
614
+ },
615
+ {
616
+ pollId: 0n,
617
+ voteOptionIndex: 0n,
618
+ salt: (0, crypto_1.generateRandomSalt)(),
619
+ nonce: 3n,
620
+ privateKey: users[3].privateKey,
621
+ stateIndex: 4n,
622
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
623
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
624
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
625
+ newPublicKey: users[3].publicKey,
626
+ },
627
+ {
628
+ pollId: 0n,
629
+ voteOptionIndex: 0n,
630
+ salt: (0, crypto_1.generateRandomSalt)(),
631
+ nonce: 2n,
632
+ privateKey: users[3].privateKey,
633
+ stateIndex: 4n,
634
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
635
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
636
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
637
+ newPublicKey: users[3].publicKey,
638
+ },
639
+ {
640
+ pollId: 0n,
641
+ voteOptionIndex: 0n,
642
+ salt: (0, crypto_1.generateRandomSalt)(),
643
+ nonce: 1n,
644
+ privateKey: users[3].privateKey,
645
+ stateIndex: 4n,
646
+ voteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
647
+ coordinatorPublicKey: constants_1.coordinatorKeypair.publicKey,
648
+ maxVoteOption: BigInt(core_1.VOTE_OPTION_TREE_ARITY ** constants_1.deployPollArgs.voteOptionTreeDepth),
649
+ newPublicKey: users[3].publicKey,
650
+ },
651
+ ];
652
+ const messages = votes
653
+ .map((vote) => (0, sdk_1.generateVote)(vote))
654
+ .map(({ message, ephemeralKeypair }) => ({
655
+ maciAddress: maciAddresses.maciContractAddress,
656
+ poll: 0,
657
+ data: message.data.map(String),
658
+ publicKey: ephemeralKeypair.publicKey.asArray().map(String),
659
+ hash: message.hash(ephemeralKeypair.publicKey).toString(),
660
+ }));
661
+ await (0, utils_1.relayTestMessages)({ messages, signer, pollId: 0, maciAddress: maciAddresses.maciContractAddress });
662
+ });
663
+ it("should generate zk-SNARK proofs and verify them", async () => {
664
+ const ipfsMessageBackupFiles = await (0, utils_1.getBackupFilenames)();
665
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
666
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
667
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
668
+ ...generateProofsArgs,
669
+ signer,
670
+ maciAddress: maciAddresses.maciContractAddress,
671
+ ipfsMessageBackupFiles,
672
+ });
673
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
674
+ await (0, sdk_1.verify)({ ...(await (0, constants_1.verifyArgs)(signer)) });
675
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq((constants_1.DEFAULT_INITIAL_VOICE_CREDITS * users.length).toString());
676
+ (0, chai_1.expect)(tallyFileData.results.tally[0].toString()).to.eq("100");
677
+ (0, chai_1.expect)(tallyFileData.results.tally[1].toString()).to.eq("300");
678
+ tallyFileData.results.tally.forEach((result, index) => {
679
+ if (index > 1) {
680
+ (0, chai_1.expect)(result).to.eq("0");
681
+ }
682
+ });
683
+ });
684
+ });
685
+ describe("30 signups (31 ballots), 30 messages", () => {
686
+ after(async () => {
687
+ await (0, utils_1.clean)();
688
+ });
689
+ const users = Array.from({ length: 30 }, () => new domainobjs_1.Keypair());
690
+ before(async () => {
691
+ // deploy the smart contracts
692
+ maciAddresses = await prepareTest();
693
+ });
694
+ it("should signup thirty users", async () => {
695
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
696
+ for (let i = 0; i < users.length; i += 1) {
697
+ // eslint-disable-next-line no-await-in-loop
698
+ await (0, sdk_1.signup)({
699
+ maciAddress: maciAddresses.maciContractAddress,
700
+ maciPublicKey: users[i].publicKey.serialize(),
701
+ sgData: constants_1.DEFAULT_SG_DATA,
702
+ signer,
703
+ });
704
+ }
705
+ });
706
+ it("should join thirty users", async () => {
707
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
708
+ for (let i = 0; i < users.length; i += 1) {
709
+ // eslint-disable-next-line no-await-in-loop
710
+ await (0, sdk_1.joinPoll)({
711
+ maciAddress: maciAddresses.maciContractAddress,
712
+ privateKey: users[i].privateKey.serialize(),
713
+ pollId: 0n,
714
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
715
+ useWasm: true,
716
+ pollWasm: constants_1.testPollJoiningWasmPath,
717
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
718
+ rapidsnark: constants_1.testRapidsnarkPath,
719
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
720
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
721
+ signer,
722
+ });
723
+ }
724
+ });
725
+ it("should publish 30 messages", async () => {
726
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
727
+ for (let i = 0; i < users.length; i += 1) {
728
+ // eslint-disable-next-line no-await-in-loop
729
+ await (0, sdk_1.publish)({
730
+ maciAddress: maciAddresses.maciContractAddress,
731
+ publicKey: users[i].publicKey.serialize(),
732
+ stateIndex: BigInt(i + 1),
733
+ voteOptionIndex: 0n,
734
+ nonce: 1n,
735
+ pollId: 0n,
736
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
737
+ salt: (0, crypto_1.generateRandomSalt)(),
738
+ privateKey: users[i].privateKey.serialize(),
739
+ signer,
740
+ });
741
+ }
742
+ });
743
+ it("should generate zk-SNARK proofs and verify them", async () => {
744
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
745
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
746
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
747
+ ...generateProofsArgs,
748
+ maciAddress: maciAddresses.maciContractAddress,
749
+ signer,
750
+ });
751
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
752
+ await (0, sdk_1.verify)({ ...(await (0, constants_1.verifyArgs)(signer)), tallyData: tallyFileData });
753
+ const totalSpent = (constants_1.DEFAULT_INITIAL_VOICE_CREDITS * users.length).toString();
754
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(totalSpent);
755
+ (0, chai_1.expect)(tallyFileData.results.tally[0].toString()).to.eq(totalSpent);
756
+ });
757
+ });
758
+ describe("30 signups, 20 invalid and 1 valid messages", () => {
759
+ after(async () => {
760
+ await (0, utils_1.clean)();
761
+ });
762
+ const users = Array.from({ length: 30 }, () => new domainobjs_1.Keypair());
763
+ before(async () => {
764
+ // deploy the smart contracts
765
+ maciAddresses = await prepareTest();
766
+ });
767
+ it("should signup thirty users", async () => {
768
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
769
+ for (let i = 0; i < users.length; i += 1) {
770
+ // eslint-disable-next-line no-await-in-loop
771
+ await (0, sdk_1.signup)({
772
+ maciAddress: maciAddresses.maciContractAddress,
773
+ maciPublicKey: users[i].publicKey.serialize(),
774
+ sgData: constants_1.DEFAULT_SG_DATA,
775
+ signer,
776
+ });
777
+ }
778
+ });
779
+ it("should join thirty users", async () => {
780
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
781
+ for (let i = 0; i < users.length; i += 1) {
782
+ // eslint-disable-next-line no-await-in-loop
783
+ await (0, sdk_1.joinPoll)({
784
+ maciAddress: maciAddresses.maciContractAddress,
785
+ privateKey: users[i].privateKey.serialize(),
786
+ pollId: 0n,
787
+ pollJoiningZkey: constants_1.testPollJoiningZkeyPath,
788
+ useWasm: true,
789
+ pollWasm: constants_1.testPollJoiningWasmPath,
790
+ pollWitnessGenerator: constants_1.testPollJoiningWitnessPath,
791
+ rapidsnark: constants_1.testRapidsnarkPath,
792
+ sgDataArg: constants_1.DEFAULT_SG_DATA,
793
+ ivcpDataArg: constants_1.DEFAULT_IVCP_DATA,
794
+ signer,
795
+ });
796
+ }
797
+ });
798
+ it("should publish 30 invalid and 1 valid messages", async () => {
799
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
800
+ for (let i = 0; i < users.length; i += 1) {
801
+ // eslint-disable-next-line no-await-in-loop
802
+ await (0, sdk_1.publish)({
803
+ maciAddress: maciAddresses.maciContractAddress,
804
+ publicKey: users[i].publicKey.serialize(),
805
+ stateIndex: BigInt(i + 1),
806
+ voteOptionIndex: 0n,
807
+ nonce: 1n,
808
+ pollId: 0n,
809
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS + 10),
810
+ salt: (0, crypto_1.generateRandomSalt)(),
811
+ privateKey: users[i].privateKey.serialize(),
812
+ signer,
813
+ });
814
+ }
815
+ await (0, sdk_1.publish)({
816
+ maciAddress: maciAddresses.maciContractAddress,
817
+ publicKey: users[0].publicKey.serialize(),
818
+ stateIndex: 1n,
819
+ voteOptionIndex: 0n,
820
+ nonce: 1n,
821
+ pollId: 0n,
822
+ newVoteWeight: BigInt(constants_1.DEFAULT_INITIAL_VOICE_CREDITS),
823
+ salt: (0, crypto_1.generateRandomSalt)(),
824
+ privateKey: users[0].privateKey.serialize(),
825
+ signer,
826
+ });
827
+ });
828
+ it("should generate zk-SNARK proofs and verify them", async () => {
829
+ await (0, sdk_1.timeTravel)({ seconds: constants_1.pollDuration, signer });
830
+ await (0, sdk_1.mergeSignups)({ ...constants_1.mergeSignupsArgs, maciAddress: maciAddresses.maciContractAddress, signer });
831
+ const { tallyData: tallyFileData } = await (0, sdk_1.generateProofs)({
832
+ ...generateProofsArgs,
833
+ maciAddress: maciAddresses.maciContractAddress,
834
+ signer,
835
+ });
836
+ await (0, sdk_1.proveOnChain)({ ...constants_1.proveOnChainArgs, maciAddress: maciAddresses.maciContractAddress, signer });
837
+ await (0, sdk_1.verify)({ ...(await (0, constants_1.verifyArgs)(signer)), tallyData: tallyFileData });
838
+ const totalSpent = constants_1.DEFAULT_INITIAL_VOICE_CREDITS.toString();
839
+ (0, chai_1.expect)(tallyFileData.totalSpentVoiceCredits.spent.toString()).to.eq(totalSpent);
840
+ (0, chai_1.expect)(tallyFileData.results.tally[0].toString()).to.eq(totalSpent);
841
+ });
842
+ });
843
+ });
844
+ //# sourceMappingURL=e2e.full.test.js.map