@maci-protocol/testing 0.0.0-ci.2df0337 → 0.0.0-ci.2ea88a0

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