Skip to content

Commit

Permalink
Merge pull request privacy-scaling-explorations#877 from privacy-scal…
Browse files Browse the repository at this point in the history
…ing-explorations/feat/commitments

feat(commitments): store tally commitments to be used for verification
  • Loading branch information
ctrlc03 authored Dec 7, 2023
2 parents 88cee6a + 56f7afa commit 32351a4
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 132 deletions.
36 changes: 24 additions & 12 deletions cli/tests/e2e.subsidy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -133,6 +133,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -239,7 +240,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -263,6 +264,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -324,7 +326,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -348,6 +350,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -400,7 +403,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -424,6 +427,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -508,7 +512,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -532,6 +536,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -627,7 +632,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -651,6 +656,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -808,7 +814,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -832,6 +838,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -878,7 +885,7 @@ describe("e2e with Subsidy tests", function () {
// generate proofs
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -902,6 +909,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -929,7 +937,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(1);
await mergeSignups(1);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -953,6 +961,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"1",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -1014,7 +1023,7 @@ describe("e2e with Subsidy tests", function () {
// generate proofs
await mergeMessages(0);
await mergeSignups(0);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand All @@ -1038,6 +1047,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"0",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand Down Expand Up @@ -1148,7 +1158,7 @@ describe("e2e with Subsidy tests", function () {
await timeTravel(pollDuration, true);
await mergeMessages(1);
await mergeSignups(1);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand Down Expand Up @@ -1179,6 +1189,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"1",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
pollAddresses.tally,
pollAddresses.subsidy,
Expand All @@ -1190,7 +1201,7 @@ describe("e2e with Subsidy tests", function () {
it("should complete the third poll", async () => {
await mergeMessages(2);
await mergeSignups(2);
await genProofs(
const tallyData = await genProofs(
testProofsDirPath,
testTallyFilePath,
tallyVotesTestZkeyPath,
Expand Down Expand Up @@ -1221,6 +1232,7 @@ describe("e2e with Subsidy tests", function () {
await verify(
"2",
testTallyFilePath,
tallyData,
maciAddresses.maciAddress,
secondPollAddresses.tally,
secondPollAddresses.subsidy,
Expand Down
Loading

0 comments on commit 32351a4

Please sign in to comment.