diff --git a/CHANGELOG.md b/CHANGELOG.md index af34df6241..8cf11351bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,491 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* add branch info ([52deba2](https://github.com/privacy-scaling-explorations/maci/commit/52deba23880b2a4d5a7a433aac34edd788547983)) +* add favicon ([4baefd6](https://github.com/privacy-scaling-explorations/maci/commit/4baefd6f4c5ebda3168dd3a2565535fd878a85f1)) +* add hero image opacity ([4408bc0](https://github.com/privacy-scaling-explorations/maci/commit/4408bc072817b15d046a75670f3d90173bbd69cc)) +* add homepage metadata ([be1ae0d](https://github.com/privacy-scaling-explorations/maci/commit/be1ae0d38627cbe0c88785355b901578d2b8e58d)) +* add info disclaimer to roadmap ([dc1f210](https://github.com/privacy-scaling-explorations/maci/commit/dc1f2104ef011b81b4583a904fd98550e594f515)) +* add info disclaimer to roadmap ([be3a3bb](https://github.com/privacy-scaling-explorations/maci/commit/be3a3bb794b31f3258575d8760f1905bc9829368)) +* add info disclaimer to spec ([6a7bdeb](https://github.com/privacy-scaling-explorations/maci/commit/6a7bdeb3b2982d13fb3b0022afea9dfaec0ed920)) +* add interfaces and factory contracts with Natspec ([579a53f](https://github.com/privacy-scaling-explorations/maci/commit/579a53f1f9a501e95fbfb064d39272c57a9e4f21)) +* add roadmap webpage ([c849237](https://github.com/privacy-scaling-explorations/maci/commit/c84923751f2b9a1ff6adb1bfc0dc23d7a5bb6aa4)) +* add roadmap webpage ([90bf276](https://github.com/privacy-scaling-explorations/maci/commit/90bf276bdf421d582d1583b0238c67cb2a70fc61)) +* add tech stack page [[#851](https://github.com/privacy-scaling-explorations/maci/issues/851)] ([d27b229](https://github.com/privacy-scaling-explorations/maci/commit/d27b229e2a644bc90c0500fde9a586e565c1a079)) +* add tech stack page [[#851](https://github.com/privacy-scaling-explorations/maci/issues/851)] ([c581be9](https://github.com/privacy-scaling-explorations/maci/commit/c581be961d10c65b0722650fec1b782e473243e8)) +* add versioning info [Fixes [#807](https://github.com/privacy-scaling-explorations/maci/issues/807)] ([518ffe8](https://github.com/privacy-scaling-explorations/maci/commit/518ffe8225387843c3cba3e23b35b3fc8f83e38f)) +* build typedoc for website ([bd75ea4](https://github.com/privacy-scaling-explorations/maci/commit/bd75ea4a8aa7346ac2fcd5797527923c2038f66c)) +* **circuits:** remove circomlib fork in favour of latest and zk-kit ([bf11b40](https://github.com/privacy-scaling-explorations/maci/commit/bf11b4092cd531cf0993534061cf7c24e8de44e2)), closes [#772](https://github.com/privacy-scaling-explorations/maci/issues/772) +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* **cli:** accept signer as parameter to cli commands ([b1802e7](https://github.com/privacy-scaling-explorations/maci/commit/b1802e79ac853aa796ba7078e994683b0db35061)) +* **cli:** add get poll cli command ([e6e2dd3](https://github.com/privacy-scaling-explorations/maci/commit/e6e2dd3714ff4a5261a864f26aef5fb9e745ac22)) +* **cli:** add relevant information in tally.json to simplify verify interface ([6fa9c1e](https://github.com/privacy-scaling-explorations/maci/commit/6fa9c1ee62fabff44410e4bd3ab71847de4338ed)) +* **cli:** add seed param for generate keypair command ([29d7b20](https://github.com/privacy-scaling-explorations/maci/commit/29d7b2057741012811622c30f91cda74cf4906eb)) +* **cli:** improve cli integration ux ([7727ab1](https://github.com/privacy-scaling-explorations/maci/commit/7727ab1d99096b296d6c3f25956b0465d036aa4d)) +* **contracts:** made `nextPollId` public to support third-party apps more easily ([c5c6bdb](https://github.com/privacy-scaling-explorations/maci/commit/c5c6bdb3db3e4ce25d0de642e75278becc405d61)) +* **contracts:** return contract addresses when deploying the poll contract ([e94998c](https://github.com/privacy-scaling-explorations/maci/commit/e94998c12d8a5f2bde2fb54b4af384d42e35d646)) +* **eas-gatekeeper:** implement an eas gatekeeper for MACI ([8b25d94](https://github.com/privacy-scaling-explorations/maci/commit/8b25d94c7a99ab1b5e5e75062d782a6dae239b34)) +* make image zoomable by adding package ([ee34a25](https://github.com/privacy-scaling-explorations/maci/commit/ee34a253521efe79f308456080fcbbf79e7484ab)) +* modify cli/.env.template and allow hardhat.config.ts to read env variables ([a206df1](https://github.com/privacy-scaling-explorations/maci/commit/a206df111ef8439bb1c0b7d484a288087602c9f2)) +* optimize deployment and tally event ([185b407](https://github.com/privacy-scaling-explorations/maci/commit/185b407df6db0484824b99286a6b0e866a7345bf)) +* **poll:** add message batch submission ([005258b](https://github.com/privacy-scaling-explorations/maci/commit/005258bad7a87f52fe2d770c55b69e4f300bcca7)) +* **proofs:** make preferred witness type in circuit's genProof function ([2b95044](https://github.com/privacy-scaling-explorations/maci/commit/2b95044921cd0bed72694d069e2f9ed8fa44e72e)) +* **qv:** add optional flag to use quadratic voting or not in MACI ([86ba854](https://github.com/privacy-scaling-explorations/maci/commit/86ba8548780049245482e5277cc47f4a8776e9e6)) +* specify we use SemVer ([078ccf6](https://github.com/privacy-scaling-explorations/maci/commit/078ccf6fd02671527593ea43efb4f9960eead755)) +* **tally:** remove ballotsTallied event and add view function ([32f840e](https://github.com/privacy-scaling-explorations/maci/commit/32f840ec5e61bac8b0bc1d1711fb27fc5b9dbf22)) +* update features on homepage ([9e930a8](https://github.com/privacy-scaling-explorations/maci/commit/9e930a840209986ea76ac8f4bcfc0bf335707975)) +* update fonts ([2d8efdb](https://github.com/privacy-scaling-explorations/maci/commit/2d8efdbcb823b122a17ef5e9c750370c03c12236)) +* update meta image ([bd4a330](https://github.com/privacy-scaling-explorations/maci/commit/bd4a3308b2601f61fdb5f5de8f57865293df4077)) +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) +* update ui ([6571b1e](https://github.com/privacy-scaling-explorations/maci/commit/6571b1e08b389aec92411da13269b23a0dc3b67b)) +* update ui ([f62398e](https://github.com/privacy-scaling-explorations/maci/commit/f62398e0b9a35aa6e2f4ea198c21e7383d5675cc)) + + +### Bug Fixes + +* add on-chain verification ([6427f37](https://github.com/privacy-scaling-explorations/maci/commit/6427f373d805805adb6205270f5074561d5c3a35)) +* **add safelessthan:** add SafeLessThan in utility.circom and use it in incrementalQuinnTree.circom ([60727d4](https://github.com/privacy-scaling-explorations/maci/commit/60727d4d10406edda32ad28e53d399d41d45ed88)) +* **address messageprocessor issues:** address and fixed PR reviews on MessageProcessor.sol ([6505fb2](https://github.com/privacy-scaling-explorations/maci/commit/6505fb2464866bf96c293dad2f3662638930cde8)) +* **address pr reviews:** address PR reviews issues for Tally.sol ([10f2c7f](https://github.com/privacy-scaling-explorations/maci/commit/10f2c7f486de115e3d2706de1a773a93854ca505)) +* **build:** fix bug that prevented c witness from being compiled ([d22caad](https://github.com/privacy-scaling-explorations/maci/commit/d22caadca15dc6de639720faf1d9a53259714ce8)) +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **circuits:** ensure we account for correct num signups in messageValidator ([04c847c](https://github.com/privacy-scaling-explorations/maci/commit/04c847cbc3f34979f292ec7561109f14e274efaf)) +* **circuits:** fix coordinator censoring by passing currentVoteWeight = 0 ([22e091d](https://github.com/privacy-scaling-explorations/maci/commit/22e091d2941b5e86ecd7df2f228bd0e10b6c4c47)) +* **circuits:** replace execSync with execFileSync ([4c121ca](https://github.com/privacy-scaling-explorations/maci/commit/4c121ca0413495979be7af87da5474a9f0b093bf)) +* **cli:** add a check that the subsidy verifying key was set correctly on chain ([6bda14d](https://github.com/privacy-scaling-explorations/maci/commit/6bda14dd7021846a639ce8cffef3a863eda2b447)), closes [#446](https://github.com/privacy-scaling-explorations/maci/issues/446) +* **cli:** add auto mining option for hardhat ([e5ad345](https://github.com/privacy-scaling-explorations/maci/commit/e5ad3452b77be5007b0ddbe593606a7bcd2a9fc5)) +* **cli:** add env initialization for hardhat conifg ([5442b8a](https://github.com/privacy-scaling-explorations/maci/commit/5442b8a88e3133f2cbdbcf68ed1710207d5f0988)) +* **cli:** export genLocalState ([0026669](https://github.com/privacy-scaling-explorations/maci/commit/0026669b31420ad31da1fa7eb716822217a3df30)) +* **cli:** give priority to gatekeeper and voice credit proxy args ([1597ee3](https://github.com/privacy-scaling-explorations/maci/commit/1597ee3a00c05fdf8ff46811804a78af450f066c)) +* **cli:** prioritize contract addresses params ([8ec36c4](https://github.com/privacy-scaling-explorations/maci/commit/8ec36c4d65329b40d7e232861c63208761d73b0a)), closes [#1039](https://github.com/privacy-scaling-explorations/maci/issues/1039) +* **cli:** remove files property from package.json ([5c544c6](https://github.com/privacy-scaling-explorations/maci/commit/5c544c62f071f7e9e2d613fe80c0bfda2a75e202)) +* **cli:** remove hardcoded gas limit from signup and publish ([1bf3a4b](https://github.com/privacy-scaling-explorations/maci/commit/1bf3a4b525956bf06a99cdb93aa5f3eef2d34390)), closes [#1086](https://github.com/privacy-scaling-explorations/maci/issues/1086) +* **cli:** remove redundant local check for poll address ([8b19756](https://github.com/privacy-scaling-explorations/maci/commit/8b1975665fdacffc9b116822d99d4b711f4e2871)), closes [#1084](https://github.com/privacy-scaling-explorations/maci/issues/1084) +* **cli:** run all the tests for package ([859a8cf](https://github.com/privacy-scaling-explorations/maci/commit/859a8cfd4a45fa8919a536f9503fc838b5aa4568)) +* **cli:** signup loop length ([bfecd5b](https://github.com/privacy-scaling-explorations/maci/commit/bfecd5be779b5564d0a4436ad7725d2aedcbb320)) +* **constraint updatesbcommitment:** add onlyOwner modifier to updateSbCommitment ([5b8ee10](https://github.com/privacy-scaling-explorations/maci/commit/5b8ee101f40ed02a79e4bf09a9eaf946b54a8ee2)) +* **contract unit test:** fixed unit test suites error caused by contracts refactor ([0dca2c0](https://github.com/privacy-scaling-explorations/maci/commit/0dca2c07a1fb0199128bf809d35a06f71da36b74)) +* **contracts:** enforce msgType = 1 for vote messages at the contract level ([c547e9c](https://github.com/privacy-scaling-explorations/maci/commit/c547e9c2f32414ab6ec3b1e714217850fd52e18b)) +* **contracts:** fix wrong tally processing check ([a90bcf8](https://github.com/privacy-scaling-explorations/maci/commit/a90bcf838a1236f212e9e22a725e3e605dbc707e)), closes [#1137](https://github.com/privacy-scaling-explorations/maci/issues/1137) +* **contracts:** prevent user DoS the stateAq tree merging ([d07d3bf](https://github.com/privacy-scaling-explorations/maci/commit/d07d3bf565df0a1882b7296ba58e494eb0092681)) +* **contracts:** save numSignups after merging maciStateAq inside the Poll contract ([4985b2d](https://github.com/privacy-scaling-explorations/maci/commit/4985b2d61655f3b802186fc03c2d85a658c0f0da)), closes [#1091](https://github.com/privacy-scaling-explorations/maci/issues/1091) +* **crypto:** get rid of potential prototype polution ([9b8a97c](https://github.com/privacy-scaling-explorations/maci/commit/9b8a97cc9661e0ee6f535cdcab19b4aa0fa98136)) +* dark mode search result ([632b465](https://github.com/privacy-scaling-explorations/maci/commit/632b46587a2973b6898bc720af836e4777a1a0f0)) +* **fetch:** fix bugs related to logs fetching ([7c7874e](https://github.com/privacy-scaling-explorations/maci/commit/7c7874e86ccfff35a45b33caa7587bd3c0b1cf01)), closes [#1043](https://github.com/privacy-scaling-explorations/maci/issues/1043) [#1044](https://github.com/privacy-scaling-explorations/maci/issues/1044) +* **fix integrationtests:** fix integrationTests caused by refactoring ([09ae37f](https://github.com/privacy-scaling-explorations/maci/commit/09ae37fd63db7ee75b977d33e67ded050ce7441d)) +* **fix subsidy.sol issues:** address PR on Subsidy.sol ([bb68116](https://github.com/privacy-scaling-explorations/maci/commit/bb6811667f912c9ab0b3af2af083a5421a0d832b)) +* fixed the maci-circuit package to allow building on circom >2.0.7 ([e954f78](https://github.com/privacy-scaling-explorations/maci/commit/e954f78224d53342826bfe73b082b673e0f147c8)) +* footer link hover ([5fef6b3](https://github.com/privacy-scaling-explorations/maci/commit/5fef6b30199f6b47ca2fa72c5b052d13bdbc4ac7)) +* header for Pre-Compiled Artifacts for testing ([967a8e0](https://github.com/privacy-scaling-explorations/maci/commit/967a8e056f4248ddf25da782318b13d7a618d0d4)) +* homepage header ([cde43cf](https://github.com/privacy-scaling-explorations/maci/commit/cde43cfc4460d01371a3637e58f5a96b27f99bb6)) +* **incrementalquintree:** remove unnecessary condition check in incrementalQuinnTree.circom ([87b3397](https://github.com/privacy-scaling-explorations/maci/commit/87b339790a5d44adb8c5bf447346e16933c48d5c)) +* install wget in DockerFile ([4d357cf](https://github.com/privacy-scaling-explorations/maci/commit/4d357cf5ec7cc8f342b8165d8fe160fd2d75eb24)) +* **integrationTests:** add auto mining option for hardhat ([fe336a2](https://github.com/privacy-scaling-explorations/maci/commit/fe336a269c62b3b8dc40b9c387ca1796759be49b)) +* internal doc links ([c906a94](https://github.com/privacy-scaling-explorations/maci/commit/c906a94b5e201e6102795c0881058f74699cc629)) +* **message-batch-index:** remove redundant check ([98c00a6](https://github.com/privacy-scaling-explorations/maci/commit/98c00a674133e020ea42ab3fee5d089a15d47920)) +* move GH PR template ([a395812](https://github.com/privacy-scaling-explorations/maci/commit/a395812a9eaec3f87c775ac67d27f2c626ca5a11)) +* **nightly:** add back snarkjs to cli as dev dependency and fix poll duration ([1e5e41d](https://github.com/privacy-scaling-explorations/maci/commit/1e5e41d1b1d322af50935058c2dde71c6ccc91bb)) +* **optimisedmt:** update d.ts file formatting and remove any types ([4fe4aea](https://github.com/privacy-scaling-explorations/maci/commit/4fe4aea403ece0418112defe2f9572939ee600cf)) +* **publish:** ensure test packages import exact version ([0ed2f61](https://github.com/privacy-scaling-explorations/maci/commit/0ed2f61617805a1d7ef58074caf89922126609a8)) +* **publish:** ensure we commit unstaged files first ([42cd197](https://github.com/privacy-scaling-explorations/maci/commit/42cd1979531d2510b253e79bcd5d3c39beee5dee)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* **publishing:** do not publish benchmarks folder ([f2fbc36](https://github.com/privacy-scaling-explorations/maci/commit/f2fbc368a8a9520288b365e6fdf04fd3fee9e685)) +* re-add blog image ([7822c9c](https://github.com/privacy-scaling-explorations/maci/commit/7822c9c2298edc9dbe97084bf182a9d12aaaf868)) +* remove extra blank line ([41d0bb1](https://github.com/privacy-scaling-explorations/maci/commit/41d0bb198176047d699666cd427eae12d1eb1e75)) +* remove HackMD TOC ([7554524](https://github.com/privacy-scaling-explorations/maci/commit/755452414b85c78ff52e5b2ea3b14123a5748602)) +* remove trailing chars ([3101a60](https://github.com/privacy-scaling-explorations/maci/commit/3101a6016ebda3385273b47b2de33f5fd9c1221f)) +* remove trailing chars ([101fdaf](https://github.com/privacy-scaling-explorations/maci/commit/101fdafe3c094b3615b651b8ff33337f338d2178)) +* return new poll addres ([acb38ba](https://github.com/privacy-scaling-explorations/maci/commit/acb38bafe3527ec5541e53c712981127246a007f)) +* reword main branch list item ([789128a](https://github.com/privacy-scaling-explorations/maci/commit/789128a5380a5dfeb2f7668bacd1f133b51d7937)) +* **safelessthan:** replaced several LessThan with SafeLessThan; fixed check on enoughVoiceCredit ([2d7a3a0](https://github.com/privacy-scaling-explorations/maci/commit/2d7a3a0efd33dfc3a5f4d3f95bec3adda7abb963)) +* **server:** expanded regex to include capital case values ([ed5915e](https://github.com/privacy-scaling-explorations/maci/commit/ed5915eb524b92299b3a52f2de1000161a8f1a32)) +* **server:** fix arbitrary parameters being injected into cli commands ([295f73f](https://github.com/privacy-scaling-explorations/maci/commit/295f73fe6744e924e677726987bb07b8c4761852)) +* **signups:** ensure we account for the blank state leaf ([b1c8c97](https://github.com/privacy-scaling-explorations/maci/commit/b1c8c9719da5d47b92408f1222399c9c4acf3df9)), closes [#947](https://github.com/privacy-scaling-explorations/maci/issues/947) +* **tests:** fix ceremony params nightly workflow and convert to ts ([b2b4d4a](https://github.com/privacy-scaling-explorations/maci/commit/b2b4d4ad8f3e02ca8eacce7e694b65e104f668e0)) +* **tests:** remove wrong chai matcher from integrationTests ([33d1d4d](https://github.com/privacy-scaling-explorations/maci/commit/33d1d4d726594eed1a27f2ef851daf5f65a36c9e)) +* **topup:** check valid new state leaf balance ([ec12d2b](https://github.com/privacy-scaling-explorations/maci/commit/ec12d2b1ec31b0607f65be49a5679fcae5e3939d)) +* undefined error reading totalSpentVoiceCredits ([10e46af](https://github.com/privacy-scaling-explorations/maci/commit/10e46afd39ec265d0c74f69a3ee13a57340e8955)) +* update 'ceremony' to 'PR' ([f13ff56](https://github.com/privacy-scaling-explorations/maci/commit/f13ff5650d608535638ccc9ec370e7c069a55d1b)) +* update broken GH links ([c414d31](https://github.com/privacy-scaling-explorations/maci/commit/c414d31226c57496014dba594fad8c5e9b9a7721)) +* update broken links ([4f689d5](https://github.com/privacy-scaling-explorations/maci/commit/4f689d581fd5e3aa120adb327706a0a0d27ec996)) +* update GH repo links to v1.1.1 tag ([8474267](https://github.com/privacy-scaling-explorations/maci/commit/847426712b202839762061fff2beabcdfc314119)) +* update to singular "in detail" ([d352781](https://github.com/privacy-scaling-explorations/maci/commit/d352781fa6dbc117dbc036720fa536fc7247a93c)) + + +### Code Refactoring + +* **circuits:** fix ts types, improve docs ([a849486](https://github.com/privacy-scaling-explorations/maci/commit/a84948685d2e4be426cef50c5c608c107b5142b1)) +* **cli:** print relevant values when comparing fails ([2e26126](https://github.com/privacy-scaling-explorations/maci/commit/2e26126f61cf95417aa3f5021775fc657cae7b95)) +* **cli:** use object args for cli commands ([41c4333](https://github.com/privacy-scaling-explorations/maci/commit/41c4333f8471b6a9ed616e5081dd99684b458b51)) +* **contracts:** add audit auggestions ([415c3da](https://github.com/privacy-scaling-explorations/maci/commit/415c3da5c65247b55b5078cc89c8f9605d8be77a)) +* **contracts:** add natspec across contracts and cleanup ([a6ad25e](https://github.com/privacy-scaling-explorations/maci/commit/a6ad25e3787fee837172b95ee706951806131bd4)) +* **contracts:** add public to Tally.isTallied ([0d28b7a](https://github.com/privacy-scaling-explorations/maci/commit/0d28b7a5fa22b6ea2f2b13de5e483f95f46c65be)) +* **contracts:** add virtual to functions which could be overridden ([aefe48a](https://github.com/privacy-scaling-explorations/maci/commit/aefe48abd34da1f64d3db9f25bb01ff3bbf08cc9)) +* **contracts:** cleanup unused scripts and organize ts code ([458bc6b](https://github.com/privacy-scaling-explorations/maci/commit/458bc6b09cbc8db652dbb72525e299a4c2631caf)) +* **contracts:** optimize code by using immutable variables are removing redundant code ([d39d384](https://github.com/privacy-scaling-explorations/maci/commit/d39d3844690749b396ba66226224789b19af522d)) +* **contracts:** optimize publishMessage by using calldata and removing arg change ([6f64471](https://github.com/privacy-scaling-explorations/maci/commit/6f64471e9f06b751297ea33d48d6f1e5b4a86fb9)) +* **contracts:** optimize utilities.padAndHashMessage ([0cc29ca](https://github.com/privacy-scaling-explorations/maci/commit/0cc29cabd6d2e82692dc996b0b3d71be28ad35b5)) +* **contracts:** refactor contracts code by removing dead code, and various optimizations ([7cbe5bd](https://github.com/privacy-scaling-explorations/maci/commit/7cbe5bd67dbfe98b46b485a75361a6cc3badb7ff)) +* **contracts:** refactoring deployment scripts ([eba33cf](https://github.com/privacy-scaling-explorations/maci/commit/eba33cfc822208d9a6ca1ad4e9d3442a8c613c4d)), closes [#555](https://github.com/privacy-scaling-explorations/maci/issues/555) +* **contracts:** remove maxValues and batchSizes from Maci.deployPoll() and instead calculate ([5393868](https://github.com/privacy-scaling-explorations/maci/commit/5393868efa270d9308e78c96e9bf6a7e8d63f3b6)), closes [#1066](https://github.com/privacy-scaling-explorations/maci/issues/1066) +* **contracts:** revisit functions visibility and inheritance ([f729336](https://github.com/privacy-scaling-explorations/maci/commit/f72933674f1253155887936cb40fe833ea219cf4)) +* **contracts:** smart contracts optimizations ([b10ff70](https://github.com/privacy-scaling-explorations/maci/commit/b10ff70a9f90e9e8d97497b7442d1416b06a09b9)) +* **core:** cleanup the core package and ensure every function has a proper type ([f277e48](https://github.com/privacy-scaling-explorations/maci/commit/f277e48c040148f741e7a8cd8dbea9e6bf4ea1cc)) +* **core:** export `TestHarness` from core test utils ([f8d4ccb](https://github.com/privacy-scaling-explorations/maci/commit/f8d4ccb3b70c006bb4aa59d67e5528f7bbf91d8e)) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** refactor the process message functions and general cleanup ([823cacd](https://github.com/privacy-scaling-explorations/maci/commit/823cacd8659281b8390b74c8d765b23ee7a83a80)) +* **core:** remove redundant code which could slow down processing ([5a6fe98](https://github.com/privacy-scaling-explorations/maci/commit/5a6fe987a8e648abbcfd7ce2d768e216c19231a3)) +* **core:** remove unnecessary messageAq from Poll ([d3930f7](https://github.com/privacy-scaling-explorations/maci/commit/d3930f706963747903305cce1ee5a716ea28c31d)) +* **core:** remove unnecessary stateAq from MaciState ([22a4f28](https://github.com/privacy-scaling-explorations/maci/commit/22a4f286010ff5add413eee88d933c0e74898346)) +* **core:** update README.md ([11ba386](https://github.com/privacy-scaling-explorations/maci/commit/11ba386a37cc802c4fd6a3c243e493de8e04a339)) +* **crypto:** improve discoverability of the package by further separating classes and functions ([ed85bc5](https://github.com/privacy-scaling-explorations/maci/commit/ed85bc513336ac8e9d3dacbe98fd58fbaed31151)) +* **crypto:** modify genPrivKey to generate a random seed vs a babyjubjub compatible value ([0f1e9ba](https://github.com/privacy-scaling-explorations/maci/commit/0f1e9bad81a872e67a09e6912beb48784cc19a4b)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **maci-core:** refactor directory structure for quick core component access ([3aeba77](https://github.com/privacy-scaling-explorations/maci/commit/3aeba77435fbd783e5cecf88a1f2c0d4c58c8022)) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **optimisedmt:** remove dependency and implement locally ([c7d81e2](https://github.com/privacy-scaling-explorations/maci/commit/c7d81e20aaf6308c7d4e1efc09c497729f6a8f10)) +* **refactor verify.ts:** refactor verify cli command for Tally and Subsidy contracts ([dedfda6](https://github.com/privacy-scaling-explorations/maci/commit/dedfda6364d9a0ba26492eda6621a32c07fc0683)) +* **remove messageaqfactory:** remove messageAqFactory; remove redundant pollFactory dependency ([dcd1c67](https://github.com/privacy-scaling-explorations/maci/commit/dcd1c67f14f0cb92979d13e7887373ff6e354a6f)) +* **repo:** remove redundant code from certain packages ([d55497a](https://github.com/privacy-scaling-explorations/maci/commit/d55497a9805812b2d2472386caecf75995d6efcf)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add .editorconfig ([85646b1](https://github.com/privacy-scaling-explorations/maci/commit/85646b1c98dee7060f7c8ea7f286b9083030bbd2)) +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add contributing docs ([d5ca0cd](https://github.com/privacy-scaling-explorations/maci/commit/d5ca0cd81c88607779f7ed73f07087a71e1a4de5)) +* add dependabot and codeowners ([1b31cbd](https://github.com/privacy-scaling-explorations/maci/commit/1b31cbd96f46357a9f1d72a04ac5473d9e7a03f4)) +* add description to updateMentionFiles function, add typedoc/ in website/.gitignore ([1f7a509](https://github.com/privacy-scaling-explorations/maci/commit/1f7a509d85dc44f1fad0c7a96e37001143d75899)) +* add licence link to README ([ea33510](https://github.com/privacy-scaling-explorations/maci/commit/ea33510406a945649609c8ece85685babe9f8266)) +* add lint-staged to pre-commit hook for automatic ESLint fix ([7186bf3](https://github.com/privacy-scaling-explorations/maci/commit/7186bf3a1a24789f5cfa70ca857ac9734bc79aa1)) +* add maci 1.0 spec ([87aa8f8](https://github.com/privacy-scaling-explorations/maci/commit/87aa8f80061fec243bccf83299db1b45dc22219b)) +* add prettier ([fd915a3](https://github.com/privacy-scaling-explorations/maci/commit/fd915a306c6edf61526cad45ad523d7123a6b7f8)) +* add prettier command to .lintstagedrc.json ([a2ceafd](https://github.com/privacy-scaling-explorations/maci/commit/a2ceafd4d88ecfb9f876c83956503a69644a7b2d)) +* add programming language links ([7e850a0](https://github.com/privacy-scaling-explorations/maci/commit/7e850a00ace0be010f8206574c3feb7372fb689b)) +* add roadmap blog post ([3a0c732](https://github.com/privacy-scaling-explorations/maci/commit/3a0c7321ed4d884f28354ba248fff6933e0e94b0)) +* add slither github action ([7dcd048](https://github.com/privacy-scaling-explorations/maci/commit/7dcd048e37a157757f4b2334a235a68a509c2dba)) +* add test file routes to circuit test commands ([6f0228f](https://github.com/privacy-scaling-explorations/maci/commit/6f0228f115211f8cf6581d7e80438791f98f6de0)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* **blog-post:** fixed header in v1.0 release post ([06590ca](https://github.com/privacy-scaling-explorations/maci/commit/06590ca5dd80e9336a60bd65092db84020950230)) +* bump docusaurus packages ([00f5e38](https://github.com/privacy-scaling-explorations/maci/commit/00f5e38d892f6323edb3df6c430438763252a11c)) +* bump homepage copy font size ([4692832](https://github.com/privacy-scaling-explorations/maci/commit/4692832ff1d3cf8ae33b87116bb156a471b22fd8)) +* bump position of troublshooting page ([04440d7](https://github.com/privacy-scaling-explorations/maci/commit/04440d77847e9c0d44d66e122b894759621ef08c)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **ceremony:** add circuit tests with ceremony params ([58611db](https://github.com/privacy-scaling-explorations/maci/commit/58611dbf62f2dc01cf978d6bf01cf15bdef77356)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **circuits:** fix wrong circuit param description ([0ede225](https://github.com/privacy-scaling-explorations/maci/commit/0ede2250defefeb7064e944ba691c5cf8913f175)) +* **circuits:** integrate linter ([93e8a65](https://github.com/privacy-scaling-explorations/maci/commit/93e8a657fccb3232b18bf191984c6bea5ccabf85)) +* **circuits:** refactor and add tests for the circom circuits ([4d6419b](https://github.com/privacy-scaling-explorations/maci/commit/4d6419b4962af6e94929721a3008406b6bc29c1e)) +* **circuits:** remove todo messages ([071acc4](https://github.com/privacy-scaling-explorations/maci/commit/071acc42322be736932ef05d6e02356da4808bda)) +* clarify installation instructions in readme ([88f947c](https://github.com/privacy-scaling-explorations/maci/commit/88f947cf057315c5d401f93829f7fc8059b1f035)) +* clean up README ([e323734](https://github.com/privacy-scaling-explorations/maci/commit/e323734a168270f3dcb7ec3e0019cc75f5ef62ae)) +* **cli:** change maci-cli script run instructions ([c51c34d](https://github.com/privacy-scaling-explorations/maci/commit/c51c34dc915721770474ad3555853ce1264aea07)) +* **cli:** clarify cli commands ([3aa4f33](https://github.com/privacy-scaling-explorations/maci/commit/3aa4f33aa7f4558f16da65b5a3fb93b282bd4fe5)) +* **cli:** integrate linter ([49571a1](https://github.com/privacy-scaling-explorations/maci/commit/49571a1199a8a027c64a7c39bd21f46a3a268f43)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **cli:** prepare cli package for web apps ([f706d9a](https://github.com/privacy-scaling-explorations/maci/commit/f706d9aa5689f58e646650d92b188f27e5beb4d8)) +* **cli:** reorganize e2e tests and add more tests for cli commands ([6000227](https://github.com/privacy-scaling-explorations/maci/commit/6000227231bee3917686b64685c14ca329fcf38b)) +* **cli:** support install for web apps ([3166cdd](https://github.com/privacy-scaling-explorations/maci/commit/3166cdd249450c36f069e0d9703980902339eb54)) +* **cli:** unify publish arg type ([50635dc](https://github.com/privacy-scaling-explorations/maci/commit/50635dc429f8784dde3815d91384c3d67eae8f85)) +* **cli:** update cli docs to reflect latest changes ([ca1a1eb](https://github.com/privacy-scaling-explorations/maci/commit/ca1a1eb86464fcc76fdaa9811070277a91748704)) +* comment out new font-family ([d0624ef](https://github.com/privacy-scaling-explorations/maci/commit/d0624ef27cf9eb636e8dd08ac121dd9acb531af5)) +* **commitizen:** add commit-msg hook and npm script for committing ([352fce5](https://github.com/privacy-scaling-explorations/maci/commit/352fce5ec2ddb5c009132f8ee2248a817df7a10a)) +* **contract:** add contract verification task ([ab4718f](https://github.com/privacy-scaling-explorations/maci/commit/ab4718f2084588ac443812ffb873d2cdcac0742b)) +* **contract:** add deploy script for eas gatekeeper ([65d883c](https://github.com/privacy-scaling-explorations/maci/commit/65d883c5686e8ba21c4858d298c08bf118ad91ad)) +* **contract:** add deploy tasks for maci ([8b58688](https://github.com/privacy-scaling-explorations/maci/commit/8b586889033c0703b6358ddda78753725b8d07c9)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **contract:** disable empty code blocks warnings ([f30bda2](https://github.com/privacy-scaling-explorations/maci/commit/f30bda2cd1cc58da5864f9954b177558e592e1f5)) +* **contract:** improve the content of the index.md file used as TOC for NatSpec docs ([017e1f8](https://github.com/privacy-scaling-explorations/maci/commit/017e1f8ee5cee77b77f269ace4e176322c329b7d)) +* **contracts:** add documentation for deployment workflow ([243690e](https://github.com/privacy-scaling-explorations/maci/commit/243690ea11fb91eb8bad3aea5539c1a19720e740)) +* **contracts:** add gas reporter to hardhat config ([fd00eb5](https://github.com/privacy-scaling-explorations/maci/commit/fd00eb5d073b12e3c8a6236d1629fe9ccc80f2e3)) +* **contracts:** add merge signups and messages task ([5ee0237](https://github.com/privacy-scaling-explorations/maci/commit/5ee023761f4c448f52a01007a1f2f84b74edd446)) +* **contracts:** add proof generation for task coordinator ([c145883](https://github.com/privacy-scaling-explorations/maci/commit/c145883ecc42b87170a401894b68cd2287d15832)) +* **contracts:** clarify EASGatekeeper description ([301a42b](https://github.com/privacy-scaling-explorations/maci/commit/301a42b9cf9921932b013f0c2882bce444e61113)) +* **contracts:** deploy poll ([f3ae8f8](https://github.com/privacy-scaling-explorations/maci/commit/f3ae8f8895c78e8e7f932c341a2063bad6f52f0e)) +* **contracts:** enable linter ([5c92154](https://github.com/privacy-scaling-explorations/maci/commit/5c92154fc09f0c59ca5054229798f3c8ad7d134d)) +* **contracts:** re-organize smart contract tests in separate files ([c7ee31e](https://github.com/privacy-scaling-explorations/maci/commit/c7ee31e0f2ef623e069cc5a5261ebcd40dbba4c6)) +* **contracts:** refactor and add unit tests to the current suite ([32c3485](https://github.com/privacy-scaling-explorations/maci/commit/32c348556e5bf7b0a586ed8925ef7037f6623af9)) +* **core:** add `CircuitInputs` type ([c4b72b0](https://github.com/privacy-scaling-explorations/maci/commit/c4b72b0f0b25a1bb147348a728a9550c8b6460a1)) +* **core:** add quiet flag to process messages to log errors ([8793a09](https://github.com/privacy-scaling-explorations/maci/commit/8793a09dd3c52021d467b27e1cb64c023faba317)), closes [#1135](https://github.com/privacy-scaling-explorations/maci/issues/1135) +* **core:** add Typedoc comments ([a8521ee](https://github.com/privacy-scaling-explorations/maci/commit/a8521eea97bca47298bc2c59ae1c31df9533258b)) +* **core:** add unit tests for the process messages functions of the core package ([c78e1b4](https://github.com/privacy-scaling-explorations/maci/commit/c78e1b4c4a7acea9e18beef7291c8258b7b08c65)) +* **core:** integrate linter ([614e76b](https://github.com/privacy-scaling-explorations/maci/commit/614e76b1b1de5d2c9876b11f15439e92b86db8f6)) +* **core:** process messages test ([3db370e](https://github.com/privacy-scaling-explorations/maci/commit/3db370ef876213b1cefce39fb98b00640d9750e9)) +* **core:** publish a declaration file ([0b55568](https://github.com/privacy-scaling-explorations/maci/commit/0b55568ee41dc9191b342dab057feccd1745b5fd)) +* **core:** refactor and add tests for the core package ([4aedb83](https://github.com/privacy-scaling-explorations/maci/commit/4aedb83c917c0590f88a982a4b2eb910a2aab893)) +* **core:** remove unnecessary code ([5f6d6b5](https://github.com/privacy-scaling-explorations/maci/commit/5f6d6b507665c64a7f6b0c81b0fc2475bc073984)) +* **core:** replace repeated chaining call ([0588ef6](https://github.com/privacy-scaling-explorations/maci/commit/0588ef649420b850c9fe6f115dc5431016b741fb)) +* **coverage:** setup coverage for TS packages ([f4e6964](https://github.com/privacy-scaling-explorations/maci/commit/f4e6964b3e268e4d3f2819b85e6abf3e34bcb10e)) +* **crypto:** add type export for path elements ([35866fb](https://github.com/privacy-scaling-explorations/maci/commit/35866fb0f086b18835b74e5ecdb55aaceb3ef8db)) +* **crypto:** complete unit tests for the crypto package ([80bd832](https://github.com/privacy-scaling-explorations/maci/commit/80bd832e49613172ef2b3972986f6e85c768c963)) +* cut down /roadmap length ([5815208](https://github.com/privacy-scaling-explorations/maci/commit/5815208158143b42ba2083786cfdad5502cd80b2)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @commitlint/cli from 18.4.3 to 18.4.4 ([87d2edb](https://github.com/privacy-scaling-explorations/maci/commit/87d2edb614a0d067c5f34604dddba63525206d3b)) +* **deps-dev:** bump @commitlint/cli from 18.4.4 to 18.5.0 ([6057392](https://github.com/privacy-scaling-explorations/maci/commit/6057392770bcdd65e562f9ff767e2214ecca3b14)) +* **deps-dev:** bump @commitlint/cli from 18.5.0 to 18.6.0 ([97dda5f](https://github.com/privacy-scaling-explorations/maci/commit/97dda5fd89ccf9d251b78892586ddbd15d06ec21)) +* **deps-dev:** bump @commitlint/cli from 18.6.0 to 18.6.1 ([db86198](https://github.com/privacy-scaling-explorations/maci/commit/db86198c961c4a211566ae24431d62a085245092)) +* **deps-dev:** bump @commitlint/config-conventional ([125ffd6](https://github.com/privacy-scaling-explorations/maci/commit/125ffd652a42e1704110bd1009c96b882506b4fd)) +* **deps-dev:** bump @commitlint/config-conventional ([75fecbe](https://github.com/privacy-scaling-explorations/maci/commit/75fecbe165683101fad54eac41d6465a0607066c)) +* **deps-dev:** bump @commitlint/config-conventional ([45c5491](https://github.com/privacy-scaling-explorations/maci/commit/45c54916f2e9059b281db8166343b13f31ec0f70)) +* **deps-dev:** bump @commitlint/config-conventional ([511a64b](https://github.com/privacy-scaling-explorations/maci/commit/511a64b5c11a6baf0e02180fa9acc78d472ae802)) +* **deps-dev:** bump @docusaurus/module-type-aliases ([ee4314d](https://github.com/privacy-scaling-explorations/maci/commit/ee4314d224cabdf620e2dd2e9d6deeae867e12f9)) +* **deps-dev:** bump @docusaurus/module-type-aliases ([64aaad6](https://github.com/privacy-scaling-explorations/maci/commit/64aaad6734e3e235b84a66ca15bfee0d917e12ae)) +* **deps-dev:** bump @docusaurus/tsconfig from 3.1.0 to 3.1.1 ([1d86718](https://github.com/privacy-scaling-explorations/maci/commit/1d867180f7a461a024458da43f0bf11df70a706c)) +* **deps-dev:** bump @docusaurus/types from 3.0.0 to 3.1.0 ([2de823f](https://github.com/privacy-scaling-explorations/maci/commit/2de823fd5f480a4f0cbf7028ffd19b59cc007ade)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump @types/snarkjs from 0.7.7 to 0.7.8 ([0d98828](https://github.com/privacy-scaling-explorations/maci/commit/0d988285b1694d57c40f815a1d1ec5f6a50e5296)) +* **deps-dev:** bump @typescript-eslint/eslint-plugin ([9353753](https://github.com/privacy-scaling-explorations/maci/commit/9353753174b391a0f397aebb0a34b912c70fff64)) +* **deps-dev:** bump @typescript-eslint/eslint-plugin ([83bd561](https://github.com/privacy-scaling-explorations/maci/commit/83bd561e3d6bad7293fa97ec9747b18213fa93e8)) +* **deps-dev:** bump @typescript-eslint/eslint-plugin ([0f3bbba](https://github.com/privacy-scaling-explorations/maci/commit/0f3bbba41e1d83e2ab1d68498cb063401f58cc1d)) +* **deps-dev:** bump @typescript-eslint/eslint-plugin ([b5186a1](https://github.com/privacy-scaling-explorations/maci/commit/b5186a1930e0162b2961a8db3134fcd7973fe329)) +* **deps-dev:** bump @typescript-eslint/eslint-plugin ([acbef4c](https://github.com/privacy-scaling-explorations/maci/commit/acbef4c9116307fa10004c1c94faabafaf1fb807)) +* **deps-dev:** bump @typescript-eslint/parser from 6.13.2 to 6.18.1 ([3901c97](https://github.com/privacy-scaling-explorations/maci/commit/3901c9760301c4f27caa83a173a9e8eb7a924b30)) +* **deps-dev:** bump @typescript-eslint/parser from 6.18.1 to 6.19.0 ([a6992b5](https://github.com/privacy-scaling-explorations/maci/commit/a6992b57f88c321edcc01e71a65f7eb1935170f3)) +* **deps-dev:** bump @typescript-eslint/parser from 6.19.0 to 6.19.1 ([bb064c3](https://github.com/privacy-scaling-explorations/maci/commit/bb064c328f492873aca8102a0e6b7a3c6fb58170)) +* **deps-dev:** bump @typescript-eslint/parser from 6.19.1 to 6.20.0 ([b131368](https://github.com/privacy-scaling-explorations/maci/commit/b1313684dcc00d652f37b21dcb94bb79fbb230f1)) +* **deps-dev:** bump @typescript-eslint/parser from 6.20.0 to 6.21.0 ([3724850](https://github.com/privacy-scaling-explorations/maci/commit/3724850a5bed27114a84f258b643467e1087b6b9)) +* **deps-dev:** bump conventional-changelog-conventionalcommits ([5ded61d](https://github.com/privacy-scaling-explorations/maci/commit/5ded61d4f37976848aa1c60bb5290bf0bf8531cf)) +* **deps-dev:** bump eslint from 8.55.0 to 8.56.0 ([f6269e7](https://github.com/privacy-scaling-explorations/maci/commit/f6269e78460086bcf23a73f12e0e3200695cca1c)) +* **deps-dev:** bump eslint-plugin-import from 2.29.0 to 2.29.1 ([865eb63](https://github.com/privacy-scaling-explorations/maci/commit/865eb6321b54d4d033a09c9ef97ab194b59382b3)) +* **deps-dev:** bump eslint-plugin-prettier from 5.0.1 to 5.1.3 ([1de434e](https://github.com/privacy-scaling-explorations/maci/commit/1de434ea3db4fb1529a3d76f903be57468797db3)) +* **deps-dev:** bump eslint-plugin-unused-imports from 3.0.0 to 3.1.0 ([7231e08](https://github.com/privacy-scaling-explorations/maci/commit/7231e086c27ce7abfa81d1084428c14197b1a6e2)) +* **deps-dev:** bump husky from 8.0.3 to 9.0.7 ([183594c](https://github.com/privacy-scaling-explorations/maci/commit/183594c98bef18084a778688a08b2499039c54be)) +* **deps-dev:** bump husky from 9.0.10 to 9.0.11 ([3fa6e68](https://github.com/privacy-scaling-explorations/maci/commit/3fa6e684f72eb957c6a527b5aa039d03c6e71c34)) +* **deps-dev:** bump husky from 9.0.7 to 9.0.10 ([4751e21](https://github.com/privacy-scaling-explorations/maci/commit/4751e21d89ae20e2827814c16528e07186e6d9c8)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump lerna from 8.0.2 to 8.1.2 ([472501c](https://github.com/privacy-scaling-explorations/maci/commit/472501c053858394195bb82d1fb36dbfc4eabd21)) +* **deps-dev:** bump lint-staged from 15.2.0 to 15.2.2 ([84ce33e](https://github.com/privacy-scaling-explorations/maci/commit/84ce33e38d2d6e8901e12814da134b8e90f2a2e3)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **deps-dev:** bump prettier from 3.1.0 to 3.1.1 ([5d3e8e7](https://github.com/privacy-scaling-explorations/maci/commit/5d3e8e780b4503facd43b563a2d4de058f479993)) +* **deps-dev:** bump prettier from 3.1.1 to 3.2.2 ([5ece5c9](https://github.com/privacy-scaling-explorations/maci/commit/5ece5c9cb1188b2a0d6bdeff52d2713a1d92612e)) +* **deps-dev:** bump prettier from 3.2.2 to 3.2.4 ([1cafebb](https://github.com/privacy-scaling-explorations/maci/commit/1cafebbae2a29b1c28e9561f7ae75ed023d8e7bd)) +* **deps-dev:** bump prettier from 3.2.4 to 3.2.5 ([ab2e7e3](https://github.com/privacy-scaling-explorations/maci/commit/ab2e7e3c3c97f1fc30219ed6bc1a7c5667d32e73)) +* **deps-dev:** bump prettier-plugin-solidity from 1.2.0 to 1.3.1 ([8e3089e](https://github.com/privacy-scaling-explorations/maci/commit/8e3089e2c2f8669c2fdf2a1d571b2f025500338d)) +* **deps-dev:** bump solhint from 4.0.0 to 4.1.1 ([e020ae1](https://github.com/privacy-scaling-explorations/maci/commit/e020ae10f53ce5fbd41b1d83f81097247d331b10)) +* **deps-dev:** bump typedoc from 0.25.4 to 0.25.7 ([1b51ef1](https://github.com/privacy-scaling-explorations/maci/commit/1b51ef14935b7c5a60b3ddc309efcd38f79ccd84)) +* **deps-dev:** bump typedoc from 0.25.7 to 0.25.8 ([929f00c](https://github.com/privacy-scaling-explorations/maci/commit/929f00ca3621030d3bce1dc5edb131bfa4ec6247)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump @commander-js/extra-typings from 11.1.0 to 12.0.0 ([8688daa](https://github.com/privacy-scaling-explorations/maci/commit/8688daadb2cd2f863bbee718e30cf8d9e8c9b110)) +* **deps:** bump @docusaurus/preset-classic from 3.1.0 to 3.1.1 ([35e1954](https://github.com/privacy-scaling-explorations/maci/commit/35e1954b810e4185d2f370b51efed4273ee7811b)) +* **deps:** bump @docusaurus/theme-classic from 3.0.0 to 3.1.0 ([9ff0c26](https://github.com/privacy-scaling-explorations/maci/commit/9ff0c26904ede3dfea76652d7072369e583d5175)) +* **deps:** bump @docusaurus/theme-classic from 3.1.0 to 3.1.1 ([049bb10](https://github.com/privacy-scaling-explorations/maci/commit/049bb103a0f2cc288dbff29ccf64768dedb7705a)) +* **deps:** bump @easyops-cn/docusaurus-search-local ([ae6cd48](https://github.com/privacy-scaling-explorations/maci/commit/ae6cd489d55634b8415ade080ec73abbc9d747a1)) +* **deps:** bump @mdx-js/react from 3.0.0 to 3.0.1 ([69990ab](https://github.com/privacy-scaling-explorations/maci/commit/69990abe87f21f85d643fa7bf649a1486903928c)) +* **deps:** bump @zk-kit/poseidon-cipher from 0.1.1 to 0.2.1 ([7fb1d67](https://github.com/privacy-scaling-explorations/maci/commit/7fb1d671d48d5dd364d39eff752ce0f2f9b67d26)) +* **deps:** bump actions/setup-node from 3 to 4 ([f358085](https://github.com/privacy-scaling-explorations/maci/commit/f35808528611bf4e36db593d97eb643b3d542184)) +* **deps:** bump circomkit from 0.0.21 to 0.0.22 ([1c4e405](https://github.com/privacy-scaling-explorations/maci/commit/1c4e4051920e84df88a28b1ed908ee8e6d3266b8)) +* **deps:** bump circomkit from 0.0.22 to 0.0.24 ([2ff4d38](https://github.com/privacy-scaling-explorations/maci/commit/2ff4d380d6601e363abd2435d59ac150ca2c190f)) +* **deps:** bump clsx from 1.2.1 to 2.1.0 ([6e625b3](https://github.com/privacy-scaling-explorations/maci/commit/6e625b3c67a1899d73aa5dc23a3b4d8d0e91f316)) +* **deps:** bump commander from 11.1.0 to 12.0.0 ([72b1a2e](https://github.com/privacy-scaling-explorations/maci/commit/72b1a2e672d4808d3b2c7a3ad13e92b7db0811c8)) +* **deps:** bump crytic/slither-action from 0.3.0 to 0.3.1 ([847c259](https://github.com/privacy-scaling-explorations/maci/commit/847c25989c8ad7f8967305fc7b4633ab06130da0)) +* **deps:** bump docusaurus-plugin-image-zoom from 1.0.1 to 2.0.0 ([2fa993c](https://github.com/privacy-scaling-explorations/maci/commit/2fa993c86a56cd97b8700fc8c6aca3a20598cfb0)) +* **deps:** bump dotenv from 16.3.1 to 16.3.2 ([845becc](https://github.com/privacy-scaling-explorations/maci/commit/845becc8508d841b01430eb56379f828687b840b)) +* **deps:** bump dotenv from 16.3.2 to 16.4.1 ([2430c50](https://github.com/privacy-scaling-explorations/maci/commit/2430c50ba5625f87f632f302c420a7fd10f5467a)) +* **deps:** bump dotenv from 16.4.1 to 16.4.2 ([8431e74](https://github.com/privacy-scaling-explorations/maci/commit/8431e74c22099dcd7201e7005dbc25bc03c9e65c)) +* **deps:** bump dotenv from 16.4.2 to 16.4.4 ([472c616](https://github.com/privacy-scaling-explorations/maci/commit/472c616570c427f508f3854e1cd357ceed4a8e1a)) +* **deps:** bump ethers from 6.10.0 to 6.11.0 ([815696d](https://github.com/privacy-scaling-explorations/maci/commit/815696de4268c41e466ab6794215807a38906938)) +* **deps:** bump ethers from 6.11.0 to 6.11.1 ([a01f434](https://github.com/privacy-scaling-explorations/maci/commit/a01f434451a377447052518236a23ad3c9051d17)) +* **deps:** bump ethers from 6.9.2 to 6.10.0 ([dd8b4a0](https://github.com/privacy-scaling-explorations/maci/commit/dd8b4a048c013f28be175cc0db17fe5fc45d5976)) +* **deps:** bump github/codeql-action from 2 to 3 ([e06e5ec](https://github.com/privacy-scaling-explorations/maci/commit/e06e5ec49e345b52deb46f71fe57453c98c68fe8)) +* **deps:** bump hardhat from 2.19.4 to 2.19.5 ([40ab10d](https://github.com/privacy-scaling-explorations/maci/commit/40ab10defff0a538aefa81d67fd6ce04b69f5eb6)) +* **deps:** bump hardhat from 2.19.5 to 2.20.1 ([68543a6](https://github.com/privacy-scaling-explorations/maci/commit/68543a6886b2836c42fd18b77f9e98f322fb971e)) +* **deps:** bump pnpm/action-setup from 2 to 3 ([859cb7c](https://github.com/privacy-scaling-explorations/maci/commit/859cb7c9ed7a783f9122569583fa95f83645aa84)) +* **deps:** bump snarkjs from 0.7.2 to 0.7.3 ([cf95b6f](https://github.com/privacy-scaling-explorations/maci/commit/cf95b6ff6f66342e3b75dedd5c70d62f8f0816b1)) +* **deps:** remove circomlib and add big-integer ([50eff2f](https://github.com/privacy-scaling-explorations/maci/commit/50eff2f6a8e009c19eab50b3b3e15b779d63f8f3)) +* **deps:** update circomkit to latest version and add console logs ([9f7ec50](https://github.com/privacy-scaling-explorations/maci/commit/9f7ec50dadcfb1a27bccb845f1552a2af2b8b1f2)) +* **domainobjs:** apply linter rules and fixes ([6649ca6](https://github.com/privacy-scaling-explorations/maci/commit/6649ca6d2afc83cfec60008fa6314add1cd837cd)) +* **domainobjs:** implement unit tests for the domainobjs package ([c19d1d3](https://github.com/privacy-scaling-explorations/maci/commit/c19d1d3b6652d306e5ae7f4083eb20c4832c1233)) +* enable codeql and workflows cleanup ([37a735c](https://github.com/privacy-scaling-explorations/maci/commit/37a735c349eeb1f7fc13fd8930041967a4813b11)) +* fix description of circuit parameter ([26b08eb](https://github.com/privacy-scaling-explorations/maci/commit/26b08eba98394f97f054163a6d4d91bbd0595f44)) +* fix emojis ([65bd610](https://github.com/privacy-scaling-explorations/maci/commit/65bd610ee4e8a1a9caf75fa586d29c854dc65d66)) +* fix grammar ([075ce47](https://github.com/privacy-scaling-explorations/maci/commit/075ce47011209271cf9ab4b64ec2ba36409ec26a)) +* fix markdown syntax in README.md ([4540f22](https://github.com/privacy-scaling-explorations/maci/commit/4540f227139e72061085bcdf9bdfd48bc7c57c2a)) +* fix typo ([60f66ad](https://github.com/privacy-scaling-explorations/maci/commit/60f66ad70f698ebe3ce18e7907889929076fbbc2)) +* fix typos and remove redundant introductions ([99d1e91](https://github.com/privacy-scaling-explorations/maci/commit/99d1e9174d38192f8b525fd0aeae1f87a72de560)) +* fix word repetition ([92d7174](https://github.com/privacy-scaling-explorations/maci/commit/92d717496bc94d23d1d631e637a7fff1756d2352)) +* **git hooks:** add commit-msg and pre-commit hooks to package.json ([1da19d8](https://github.com/privacy-scaling-explorations/maci/commit/1da19d8beeb37b27be789c84c98e418f369a8af6)) +* ignore dependabot commit messages for linting ([3e79ddf](https://github.com/privacy-scaling-explorations/maci/commit/3e79ddffd3a18a87f637d54dcef2e19580577de8)) +* **integration:** clarify integraration docs ([09edffd](https://github.com/privacy-scaling-explorations/maci/commit/09edffd7e6c2f58c1242dd92fb0bbd681444b937)) +* **integration:** ensure integration tests are using the correct user keys ([5b6aa92](https://github.com/privacy-scaling-explorations/maci/commit/5b6aa9255907cd0e02f692ad7d8487f9bd9a70f3)) +* **intergationTests:** apply linter for intergration tests package ([ef75ec3](https://github.com/privacy-scaling-explorations/maci/commit/ef75ec37b2b4e000ad4b3fcdbdf85ba822690512)) +* keep footer links consistent on hover ([35da4c9](https://github.com/privacy-scaling-explorations/maci/commit/35da4c941d17a4c53f51e3ebac862785a0279c6c)) +* **key-change:** add tests and docs around key-change ([ce394e2](https://github.com/privacy-scaling-explorations/maci/commit/ce394e2d2bf3c8c6748cf8e8d1e401b8f3c924ee)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **maci-cli:** check hardhat config file ([3a6ac6b](https://github.com/privacy-scaling-explorations/maci/commit/3a6ac6b41b759edff67533c0b665777329d63735)) +* **maci:** added audit report and amended Contract's README ([0c6d28b](https://github.com/privacy-scaling-explorations/maci/commit/0c6d28b66091609a3cf62b1a0faa08e87b5c82aa)) +* **maci:** added README for the circuit package and fixed typo in contract's README ([4d0f74b](https://github.com/privacy-scaling-explorations/maci/commit/4d0f74b8480cd2d20e835d43b33c2aab6578d194)) +* **maci:** amended and added new sections in the docs ([d9780fa](https://github.com/privacy-scaling-explorations/maci/commit/d9780fabed10e9d97bb72cf6d118e061b83157b9)), closes [#531](https://github.com/privacy-scaling-explorations/maci/issues/531) +* **maci:** updated docs after review ([fd0da34](https://github.com/privacy-scaling-explorations/maci/commit/fd0da346406a5c2c6648bbff1b081863039bcf2b)), closes [#531](https://github.com/privacy-scaling-explorations/maci/issues/531) [#556](https://github.com/privacy-scaling-explorations/maci/issues/556) +* migrate to husky v9 ([6dc83de](https://github.com/privacy-scaling-explorations/maci/commit/6dc83de1d3701883966091df9dd3b486823aaf4c)) +* minor updates to roadmap page ([6a8ada8](https://github.com/privacy-scaling-explorations/maci/commit/6a8ada85a2a9486926bd8dbbb56e33f476b5d8de)) +* minor updates to roadmap page ([046b922](https://github.com/privacy-scaling-explorations/maci/commit/046b92257027591978e56c472d0b2d11fc76d67a)) +* **non-qv:** update docs to reflect the integration of non-quadratic voting ([35ff781](https://github.com/privacy-scaling-explorations/maci/commit/35ff7818dc62152a0b2d7449bebc8990dae7f0d4)) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publish:** fix publishing scripts to publish contracts with ceremony params ([f27af1c](https://github.com/privacy-scaling-explorations/maci/commit/f27af1cbea7070848686fdbebb234bce47a180c8)), closes [#973](https://github.com/privacy-scaling-explorations/maci/issues/973) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* rebased with the dev branch ([8165968](https://github.com/privacy-scaling-explorations/maci/commit/8165968fb18aa599a30c2f4ba48553cf65a16980)) +* refer md files to contributing docs ([21c2fe4](https://github.com/privacy-scaling-explorations/maci/commit/21c2fe4a01f0ff699eed7088b403b3c00c9903ab)) +* refer README links to website docs ([c3ce015](https://github.com/privacy-scaling-explorations/maci/commit/c3ce0154749a2b72bffd89255910777b45f6a685)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* remove 2023 section ([38a9507](https://github.com/privacy-scaling-explorations/maci/commit/38a9507500a4d9e6e9d72c01e734136053b1880c)) +* remove placeholder post ([71fd332](https://github.com/privacy-scaling-explorations/maci/commit/71fd332e5844797feda1ed734273cfa4a5fbd4d2)) +* remove QFI ([db1d931](https://github.com/privacy-scaling-explorations/maci/commit/db1d931062bd1ce5305eeb850608533565bcad7c)) +* remove resource requirements ([62f9b89](https://github.com/privacy-scaling-explorations/maci/commit/62f9b89c772e1f46e53f271b8a36e92f54d92014)) +* remove TOC line ([83d8d56](https://github.com/privacy-scaling-explorations/maci/commit/83d8d56d712864d62afe3cc93b964f52398e7f7e)) +* rename file to testing-in-detail ([cf7fdf9](https://github.com/privacy-scaling-explorations/maci/commit/cf7fdf9d528358ebceb50fce0281f1b4d1bd4fa5)) +* rename page to "Overview" ([5c98942](https://github.com/privacy-scaling-explorations/maci/commit/5c989424842fcabd5d3ae54ce0d4a3035a63789d)) +* **repo:** rebase master into dev and amend CI ([0d7b99c](https://github.com/privacy-scaling-explorations/maci/commit/0d7b99c00cde64a7f49b92fcd3b9e3ff1320e29b)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* set format for CHANGELOG ([3ad82e5](https://github.com/privacy-scaling-explorations/maci/commit/3ad82e54e160569b7879f14c180bb8db482e939c)) +* **testing:** revisit testing docs and add more in detail info ([183c1d8](https://github.com/privacy-scaling-explorations/maci/commit/183c1d8361bdf3a192a212ef610ae7855c96c587)) +* **topup:** implement test cases for the topup feature ([7775a8b](https://github.com/privacy-scaling-explorations/maci/commit/7775a8b3295f29b098446d3e78a4200c03c847dd)) +* tweak secure feature copy ([e259bef](https://github.com/privacy-scaling-explorations/maci/commit/e259befbbbd75296b4800bea85fd789659347e29)) +* update /release page to /versioning ([7e662fc](https://github.com/privacy-scaling-explorations/maci/commit/7e662fc843b6fd6beacd3af4e27e90010c797b83)) +* update blog slugs to kebab case ([afa6329](https://github.com/privacy-scaling-explorations/maci/commit/afa632940b8504ab8a42da3f852a19789522c8d6)) +* update blog slugs to kebab case ([ad914a1](https://github.com/privacy-scaling-explorations/maci/commit/ad914a124d02d08a1d8e7ba86d3b4b192824c0ad)) +* update circomlib dependency format in package.json ([f0e8d19](https://github.com/privacy-scaling-explorations/maci/commit/f0e8d1978db6a0771d876b828843bc763e397220)) +* update docs ([d33e7e6](https://github.com/privacy-scaling-explorations/maci/commit/d33e7e6bc833907bec1d5575ec4f46656011028c)) +* update GH template links ([917d092](https://github.com/privacy-scaling-explorations/maci/commit/917d09219fe869fb1739d932b1d31db20c3084d0)) +* update headers for testing page ([dd99e55](https://github.com/privacy-scaling-explorations/maci/commit/dd99e55dcdacfb4b69c21b938736897bd8e9cc3e)) +* update homepage copy ([2f2439b](https://github.com/privacy-scaling-explorations/maci/commit/2f2439baa7087add03b28b37bf0ca18091395b38)) +* update into page ([38752b9](https://github.com/privacy-scaling-explorations/maci/commit/38752b991415da12043d2c4140838b8abf8d88f4)) +* update intro with Discord link ([f3881fd](https://github.com/privacy-scaling-explorations/maci/commit/f3881fd40f333283f0bea3c70fa403c6fd31f2c1)) +* update main README.md ([596705c](https://github.com/privacy-scaling-explorations/maci/commit/596705c5aef223ed44c8920676d2f69aa47a5352)) +* update missing docusaurus deps ([a3a1fbf](https://github.com/privacy-scaling-explorations/maci/commit/a3a1fbfab0c9d410e8d13f64bce3dec820c6a406)) +* update overview page ([f1682b2](https://github.com/privacy-scaling-explorations/maci/commit/f1682b2a0abc50941fceb5af6df64de221fb156a)) +* update PR template ([4dd95f2](https://github.com/privacy-scaling-explorations/maci/commit/4dd95f2f59ec44a0ab2290aa3bfe753ee0e4dff5)) +* update ptauFiles URLs ([b11b56a](https://github.com/privacy-scaling-explorations/maci/commit/b11b56ae09d78ef89443b094adad5b1916438ca1)) +* update QF site links ([6120d89](https://github.com/privacy-scaling-explorations/maci/commit/6120d89e94bbea732e306aacac972d9e2907e77d)) +* update README with build guide for MACI circuits ([77fdb63](https://github.com/privacy-scaling-explorations/maci/commit/77fdb63c9993612117505bc8319555321bf8b9d0)) +* update README.md to reflect current status ([14ac799](https://github.com/privacy-scaling-explorations/maci/commit/14ac7994aa7148cff9fdb9b9cd36ecac93290cda)) +* update sidebar_position of docs ([93a6faf](https://github.com/privacy-scaling-explorations/maci/commit/93a6fafdd7e483937a55d16e6cc99dd6e8aae4a2)) +* update sidebar_position of docs ([63be592](https://github.com/privacy-scaling-explorations/maci/commit/63be5928ee47dc53af9326516deabb5d8639d905)) +* update testing header ([688225c](https://github.com/privacy-scaling-explorations/maci/commit/688225c0a5d783fa8b585578e4ca0662e4ad1bd1)) +* update the favicon file ([1056fe7](https://github.com/privacy-scaling-explorations/maci/commit/1056fe74f7dd265e7125c8031897980b83148816)) +* use pnpm instead of npx ([fbe968f](https://github.com/privacy-scaling-explorations/maci/commit/fbe968f229121cd30eb5a58f187b813b955a8e1b)) +* **website/versioned_docs/version-v1.x:** typo fix ([#893](https://github.com/privacy-scaling-explorations/maci/issues/893)) ([c90466c](https://github.com/privacy-scaling-explorations/maci/commit/c90466c1cac756fc3aa711874cd7d63d1b8ada73)) +* **website:** apply linter for website and remove unused packages ([1a3b343](https://github.com/privacy-scaling-explorations/maci/commit/1a3b343948f9f48ed4948a5ade63b4b55645f4ab)) + +## [0.9.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.9.3...v0.9.4) (2021-07-08) + +## [0.9.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.9.2...v0.9.3) (2021-07-08) + +## [0.9.2](https://github.com/privacy-scaling-explorations/maci/compare/v0.9.1...v0.9.2) (2021-07-06) + +## [0.9.1](https://github.com/privacy-scaling-explorations/maci/compare/v0.8.4...v0.9.1) (2021-07-05) + +## [0.8.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.8.3...v0.8.4) (2021-05-28) + +## [0.8.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.8.1...v0.8.3) (2021-05-28) + +## [0.8.1](https://github.com/privacy-scaling-explorations/maci/compare/v0.7.4...v0.8.1) (2021-05-28) + +## [0.7.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.7.3...v0.7.4) (2021-05-09) + +## [0.7.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.8.0...v0.7.3) (2021-05-07) + +## [0.8.0](https://github.com/privacy-scaling-explorations/maci/compare/v0.7.0...v0.8.0) (2021-04-01) + +## [0.7.0](https://github.com/privacy-scaling-explorations/maci/compare/v0.6.7...v0.7.0) (2021-03-25) + +## [0.6.7](https://github.com/privacy-scaling-explorations/maci/compare/v0.6.6...v0.6.7) (2021-03-19) + +## [0.6.6](https://github.com/privacy-scaling-explorations/maci/compare/v0.6.3...v0.6.6) (2021-03-19) + +## [0.6.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.6.1...v0.6.3) (2021-03-19) + +## [0.6.1](https://github.com/privacy-scaling-explorations/maci/compare/v0.6.0...v0.6.1) (2021-03-18) + +## [0.6.0](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.16...v0.6.0) (2021-03-18) + +## [0.5.16](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.15...v0.5.16) (2021-03-03) + +## [0.5.15](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.14...v0.5.15) (2021-03-03) + +## [0.5.14](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.13...v0.5.14) (2021-03-03) + +## [0.5.13](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.12...v0.5.13) (2021-03-02) + +## [0.5.12](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.11...v0.5.12) (2021-03-02) + +## [0.5.11](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.10...v0.5.11) (2021-03-01) + +## [0.5.10](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.9...v0.5.10) (2021-02-22) + +## [0.5.9](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.8...v0.5.9) (2021-02-22) + +## [0.5.8](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.7...v0.5.8) (2021-02-22) + +## [0.5.7](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.6...v0.5.7) (2021-02-06) + +## [0.5.6](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.5...v0.5.6) (2021-02-05) + +## [0.5.5](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.4...v0.5.5) (2021-01-22) + +## [0.5.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.3...v0.5.4) (2021-01-20) + +## [0.5.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.2...v0.5.3) (2021-01-19) + +## [0.5.2](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.1...v0.5.2) (2021-01-19) + +## [0.5.1](https://github.com/privacy-scaling-explorations/maci/compare/v0.5.0...v0.5.1) (2021-01-19) + +## [0.5.0](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.11...v0.5.0) (2021-01-19) + +## [0.4.11](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.10...v0.4.11) (2020-11-16) + +## [0.4.10](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.9...v0.4.10) (2020-11-15) + +## [0.4.9](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.8...v0.4.9) (2020-11-15) + +## [0.4.8](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.7...v0.4.8) (2020-11-14) + +## [0.4.7](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.6...v0.4.7) (2020-11-14) + +## [0.4.6](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.5...v0.4.6) (2020-11-14) + +## [0.4.5](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.4...v0.4.5) (2020-11-14) + +## [0.4.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.3...v0.4.4) (2020-11-14) + +## [0.4.3](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.2...v0.4.3) (2020-11-14) + +## [0.4.2](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.1...v0.4.2) (2020-11-14) + +## [0.4.1](https://github.com/privacy-scaling-explorations/maci/compare/v0.4.0...v0.4.1) (2020-11-14) + +## [0.4.0](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.8...v0.4.0) (2020-11-14) + +## [0.3.8](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.7...v0.3.8) (2020-10-18) + +## [0.3.7](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.6...v0.3.7) (2020-10-18) + +## [0.3.6](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.5...v0.3.6) (2020-10-18) + +## [0.3.5](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.4...v0.3.5) (2020-10-18) + +## [0.3.4](https://github.com/privacy-scaling-explorations/maci/compare/v0.3.2...v0.3.4) (2020-10-12) + + + ## [1.1.2](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Features diff --git a/circuits/CHANGELOG.md b/circuits/CHANGELOG.md index 36b591b453..578ea48a0b 100644 --- a/circuits/CHANGELOG.md +++ b/circuits/CHANGELOG.md @@ -3,6 +3,102 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* **circuits:** remove circomlib fork in favour of latest and zk-kit ([bf11b40](https://github.com/privacy-scaling-explorations/maci/commit/bf11b4092cd531cf0993534061cf7c24e8de44e2)), closes [#772](https://github.com/privacy-scaling-explorations/maci/issues/772) +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* **contracts:** return contract addresses when deploying the poll contract ([e94998c](https://github.com/privacy-scaling-explorations/maci/commit/e94998c12d8a5f2bde2fb54b4af384d42e35d646)) +* **proofs:** make preferred witness type in circuit's genProof function ([2b95044](https://github.com/privacy-scaling-explorations/maci/commit/2b95044921cd0bed72694d069e2f9ed8fa44e72e)) +* **qv:** add optional flag to use quadratic voting or not in MACI ([86ba854](https://github.com/privacy-scaling-explorations/maci/commit/86ba8548780049245482e5277cc47f4a8776e9e6)) + + +### Bug Fixes + +* **add safelessthan:** add SafeLessThan in utility.circom and use it in incrementalQuinnTree.circom ([60727d4](https://github.com/privacy-scaling-explorations/maci/commit/60727d4d10406edda32ad28e53d399d41d45ed88)) +* **build:** fix bug that prevented c witness from being compiled ([d22caad](https://github.com/privacy-scaling-explorations/maci/commit/d22caadca15dc6de639720faf1d9a53259714ce8)) +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **circuits:** ensure we account for correct num signups in messageValidator ([04c847c](https://github.com/privacy-scaling-explorations/maci/commit/04c847cbc3f34979f292ec7561109f14e274efaf)) +* **circuits:** fix coordinator censoring by passing currentVoteWeight = 0 ([22e091d](https://github.com/privacy-scaling-explorations/maci/commit/22e091d2941b5e86ecd7df2f228bd0e10b6c4c47)) +* **circuits:** replace execSync with execFileSync ([4c121ca](https://github.com/privacy-scaling-explorations/maci/commit/4c121ca0413495979be7af87da5474a9f0b093bf)) +* **contracts:** save numSignups after merging maciStateAq inside the Poll contract ([4985b2d](https://github.com/privacy-scaling-explorations/maci/commit/4985b2d61655f3b802186fc03c2d85a658c0f0da)), closes [#1091](https://github.com/privacy-scaling-explorations/maci/issues/1091) +* **crypto:** get rid of potential prototype polution ([9b8a97c](https://github.com/privacy-scaling-explorations/maci/commit/9b8a97cc9661e0ee6f535cdcab19b4aa0fa98136)) +* fixed the maci-circuit package to allow building on circom >2.0.7 ([e954f78](https://github.com/privacy-scaling-explorations/maci/commit/e954f78224d53342826bfe73b082b673e0f147c8)) +* **incrementalquintree:** remove unnecessary condition check in incrementalQuinnTree.circom ([87b3397](https://github.com/privacy-scaling-explorations/maci/commit/87b339790a5d44adb8c5bf447346e16933c48d5c)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* remove trailing chars ([3101a60](https://github.com/privacy-scaling-explorations/maci/commit/3101a6016ebda3385273b47b2de33f5fd9c1221f)) +* **safelessthan:** replaced several LessThan with SafeLessThan; fixed check on enoughVoiceCredit ([2d7a3a0](https://github.com/privacy-scaling-explorations/maci/commit/2d7a3a0efd33dfc3a5f4d3f95bec3adda7abb963)) +* **topup:** check valid new state leaf balance ([ec12d2b](https://github.com/privacy-scaling-explorations/maci/commit/ec12d2b1ec31b0607f65be49a5679fcae5e3939d)) + + +### Code Refactoring + +* **circuits:** fix ts types, improve docs ([a849486](https://github.com/privacy-scaling-explorations/maci/commit/a84948685d2e4be426cef50c5c608c107b5142b1)) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** refactor the process message functions and general cleanup ([823cacd](https://github.com/privacy-scaling-explorations/maci/commit/823cacd8659281b8390b74c8d765b23ee7a83a80)) +* **core:** remove unnecessary messageAq from Poll ([d3930f7](https://github.com/privacy-scaling-explorations/maci/commit/d3930f706963747903305cce1ee5a716ea28c31d)) +* **core:** remove unnecessary stateAq from MaciState ([22a4f28](https://github.com/privacy-scaling-explorations/maci/commit/22a4f286010ff5add413eee88d933c0e74898346)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **maci-core:** refactor directory structure for quick core component access ([3aeba77](https://github.com/privacy-scaling-explorations/maci/commit/3aeba77435fbd783e5cecf88a1f2c0d4c58c8022)) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **optimisedmt:** remove dependency and implement locally ([c7d81e2](https://github.com/privacy-scaling-explorations/maci/commit/c7d81e20aaf6308c7d4e1efc09c497729f6a8f10)) +* **remove messageaqfactory:** remove messageAqFactory; remove redundant pollFactory dependency ([dcd1c67](https://github.com/privacy-scaling-explorations/maci/commit/dcd1c67f14f0cb92979d13e7887373ff6e354a6f)) +* **repo:** remove redundant code from certain packages ([d55497a](https://github.com/privacy-scaling-explorations/maci/commit/d55497a9805812b2d2472386caecf75995d6efcf)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add test file routes to circuit test commands ([6f0228f](https://github.com/privacy-scaling-explorations/maci/commit/6f0228f115211f8cf6581d7e80438791f98f6de0)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **ceremony:** add circuit tests with ceremony params ([58611db](https://github.com/privacy-scaling-explorations/maci/commit/58611dbf62f2dc01cf978d6bf01cf15bdef77356)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **circuits:** integrate linter ([93e8a65](https://github.com/privacy-scaling-explorations/maci/commit/93e8a657fccb3232b18bf191984c6bea5ccabf85)) +* **circuits:** refactor and add tests for the circom circuits ([4d6419b](https://github.com/privacy-scaling-explorations/maci/commit/4d6419b4962af6e94929721a3008406b6bc29c1e)) +* **circuits:** remove todo messages ([071acc4](https://github.com/privacy-scaling-explorations/maci/commit/071acc42322be736932ef05d6e02356da4808bda)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **contracts:** add proof generation for task coordinator ([c145883](https://github.com/privacy-scaling-explorations/maci/commit/c145883ecc42b87170a401894b68cd2287d15832)) +* **core:** add `CircuitInputs` type ([c4b72b0](https://github.com/privacy-scaling-explorations/maci/commit/c4b72b0f0b25a1bb147348a728a9550c8b6460a1)) +* **core:** add Typedoc comments ([a8521ee](https://github.com/privacy-scaling-explorations/maci/commit/a8521eea97bca47298bc2c59ae1c31df9533258b)) +* **core:** integrate linter ([614e76b](https://github.com/privacy-scaling-explorations/maci/commit/614e76b1b1de5d2c9876b11f15439e92b86db8f6)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump circomkit from 0.0.21 to 0.0.22 ([1c4e405](https://github.com/privacy-scaling-explorations/maci/commit/1c4e4051920e84df88a28b1ed908ee8e6d3266b8)) +* **deps:** bump circomkit from 0.0.22 to 0.0.24 ([2ff4d38](https://github.com/privacy-scaling-explorations/maci/commit/2ff4d380d6601e363abd2435d59ac150ca2c190f)) +* **deps:** bump snarkjs from 0.7.2 to 0.7.3 ([cf95b6f](https://github.com/privacy-scaling-explorations/maci/commit/cf95b6ff6f66342e3b75dedd5c70d62f8f0816b1)) +* **deps:** update circomkit to latest version and add console logs ([9f7ec50](https://github.com/privacy-scaling-explorations/maci/commit/9f7ec50dadcfb1a27bccb845f1552a2af2b8b1f2)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **maci:** added README for the circuit package and fixed typo in contract's README ([4d0f74b](https://github.com/privacy-scaling-explorations/maci/commit/4d0f74b8480cd2d20e835d43b33c2aab6578d194)) +* **maci:** updated docs after review ([fd0da34](https://github.com/privacy-scaling-explorations/maci/commit/fd0da346406a5c2c6648bbff1b081863039bcf2b)), closes [#531](https://github.com/privacy-scaling-explorations/maci/issues/531) [#556](https://github.com/privacy-scaling-explorations/maci/issues/556) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **topup:** implement test cases for the topup feature ([7775a8b](https://github.com/privacy-scaling-explorations/maci/commit/7775a8b3295f29b098446d3e78a4200c03c847dd)) +* update circomlib dependency format in package.json ([f0e8d19](https://github.com/privacy-scaling-explorations/maci/commit/f0e8d1978db6a0771d876b828843bc763e397220)) +* update README with build guide for MACI circuits ([77fdb63](https://github.com/privacy-scaling-explorations/maci/commit/77fdb63c9993612117505bc8319555321bf8b9d0)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Code Refactoring diff --git a/circuits/circom/processMessages.circom b/circuits/circom/processMessages.circom index 3121b46f47..6b1c9c3e22 100644 --- a/circuits/circom/processMessages.circom +++ b/circuits/circom/processMessages.circom @@ -84,7 +84,7 @@ template ProcessMessages( // The index of the last message leaf in the batch to process, exclusive. // This value may be less than batchStartIndex + batchSize if this batch is - // the last batch and the total number of mesages is not a multiple of the + // the last batch and the total number of messages is not a multiple of the // batch size. signal batchEndIndex; @@ -401,8 +401,8 @@ template ProcessTopup(stateTreeDepth) { // msgType of topup command is 2 amt <== amount * (msgType - 1); index <== stateTreeIndex * (msgType - 1); - component validCreditBalance = LessEqThan(N_BITS); - // check stateIndex, if invalid index, set index and amount to zero + + // check stateIndex, if invalid index, set index to zero component validStateLeafIndex = LessEqThan(N_BITS); validStateLeafIndex.in[0] <== index; validStateLeafIndex.in[1] <== numSignUps; @@ -419,17 +419,27 @@ template ProcessTopup(stateTreeDepth) { amtMux.c[0] <== 0; amtMux.c[1] <== amt; - // check less than field size + // check new balance is valid signal newCreditBalance; + // add either 0 or the actual amount (if the state index is valid) newCreditBalance <== stateLeaf[STATE_LEAF_VOICE_CREDIT_BALANCE_IDX] + amtMux.out; + + // we need to ensure it did not overflow (so previous must be <= new) + component validCreditBalance = SafeLessEqThan(N_BITS); validCreditBalance.in[0] <== stateLeaf[STATE_LEAF_VOICE_CREDIT_BALANCE_IDX]; validCreditBalance.in[1] <== newCreditBalance; + // if the new one is <= the old one, then we have a valid topup + component creditBalanceMux = Mux1(); + creditBalanceMux.s <== validCreditBalance.out; + creditBalanceMux.c[0] <== stateLeaf[STATE_LEAF_VOICE_CREDIT_BALANCE_IDX]; + creditBalanceMux.c[1] <== newCreditBalance; + // update credit voice balance component newStateLeafHasher = Hasher4(); newStateLeafHasher.in[STATE_LEAF_PUB_X_IDX] <== stateLeaf[STATE_LEAF_PUB_X_IDX]; newStateLeafHasher.in[STATE_LEAF_PUB_Y_IDX] <== stateLeaf[STATE_LEAF_PUB_Y_IDX]; - newStateLeafHasher.in[STATE_LEAF_VOICE_CREDIT_BALANCE_IDX] <== newCreditBalance; + newStateLeafHasher.in[STATE_LEAF_VOICE_CREDIT_BALANCE_IDX] <== creditBalanceMux.out; newStateLeafHasher.in[STATE_LEAF_TIMESTAMP_IDX] <== stateLeaf[STATE_LEAF_TIMESTAMP_IDX]; component stateLeafPathIndices = QuinGeneratePathIndices(stateTreeDepth); @@ -534,7 +544,7 @@ template ProcessOne(stateTreeDepth, voteOptionTreeDepth) { // ----------------------------------------------------------------------- // 2. If msgType = 0 and isValid is 0, generate indices for leaf 0 - // Otherwise, generate indices for commmand.stateIndex or topupStateIndex depending on msgType + // Otherwise, generate indices for command.stateIndex or topupStateIndex depending on msgType signal indexByType; signal tmpIndex1; signal tmpIndex2; diff --git a/circuits/circom/processMessagesNonQv.circom b/circuits/circom/processMessagesNonQv.circom index 190a0c1fdf..7f484e1892 100644 --- a/circuits/circom/processMessagesNonQv.circom +++ b/circuits/circom/processMessagesNonQv.circom @@ -85,7 +85,7 @@ template ProcessMessagesNonQv( // The index of the last message leaf in the batch to process, exclusive. // This value may be less than batchStartIndex + batchSize if this batch is - // the last batch and the total number of mesages is not a multiple of the + // the last batch and the total number of messages is not a multiple of the // batch size. signal batchEndIndex; @@ -457,7 +457,7 @@ template ProcessOneNonQv(stateTreeDepth, voteOptionTreeDepth) { // ----------------------------------------------------------------------- // 2. If msgType = 0 and isValid is 0, generate indices for leaf 0 - // Otherwise, generate indices for commmand.stateIndex or topupStateIndex depending on msgType + // Otherwise, generate indices for command.stateIndex or topupStateIndex depending on msgType signal indexByType; signal tmpIndex1; signal tmpIndex2; diff --git a/circuits/circom/stateLeafAndBallotTransformer.circom b/circuits/circom/stateLeafAndBallotTransformer.circom index 79dde80d33..afaf536346 100644 --- a/circuits/circom/stateLeafAndBallotTransformer.circom +++ b/circuits/circom/stateLeafAndBallotTransformer.circom @@ -21,7 +21,7 @@ template StateLeafAndBallotTransformer() { signal input slPubKey[2]; // the current voice credit balance of the signed up user signal input slVoiceCreditBalance; - // the signup timestmap + // the signup timestamp signal input slTimestamp; // when the poll ends signal input pollEndTimestamp; diff --git a/circuits/circom/stateLeafAndBallotTransformerNonQv.circom b/circuits/circom/stateLeafAndBallotTransformerNonQv.circom index 0055c84a14..8fb900a007 100644 --- a/circuits/circom/stateLeafAndBallotTransformerNonQv.circom +++ b/circuits/circom/stateLeafAndBallotTransformerNonQv.circom @@ -21,7 +21,7 @@ template StateLeafAndBallotTransformerNonQv() { signal input slPubKey[2]; // the current voice credit balance of the signed up user signal input slVoiceCreditBalance; - // the signup timestmap + // the signup timestamp signal input slTimestamp; // when the poll ends signal input pollEndTimestamp; diff --git a/circuits/circom/trees/incrementalQuinTree.circom b/circuits/circom/trees/incrementalQuinTree.circom index 434cf9f7ad..9b3251626a 100644 --- a/circuits/circom/trees/incrementalQuinTree.circom +++ b/circuits/circom/trees/incrementalQuinTree.circom @@ -10,7 +10,7 @@ include "./checkRoot.circom"; include "../hasherPoseidon.circom"; include "../utils.circom"; -// This file contains circuits for quintary Merkle tree verifcation. +// This file contains circuits for quintary Merkle tree verification. // It assumes that each node contains 5 leaves, as we use the PoseidonT6 // circuit to hash leaves, which supports up to 5 input elements. diff --git a/circuits/package.json b/circuits/package.json index f8912fe2b3..8417613cef 100644 --- a/circuits/package.json +++ b/circuits/package.json @@ -1,6 +1,6 @@ { "name": "maci-circuits", - "version": "1.1.2", + "version": "1.2.0", "description": "zk-SNARK circuits for MACI", "main": "build/ts/index.js", "files": [ @@ -41,9 +41,9 @@ "@zk-kit/circuits": "^0.3.0", "circomkit": "^0.0.24", "circomlib": "^2.0.5", - "maci-core": "^1.1.2", - "maci-crypto": "^1.1.2", - "maci-domainobjs": "^1.1.2", + "maci-core": "^1.2.0", + "maci-crypto": "^1.2.0", + "maci-domainobjs": "^1.2.0", "snarkjs": "^0.7.3" }, "devDependencies": { diff --git a/circuits/ts/__tests__/CeremonyParams.test.ts b/circuits/ts/__tests__/CeremonyParams.test.ts index 12ae5f4c8a..373071a87c 100644 --- a/circuits/ts/__tests__/CeremonyParams.test.ts +++ b/circuits/ts/__tests__/CeremonyParams.test.ts @@ -334,7 +334,7 @@ describe("Ceremony param tests", () => { await testCircuit.expectConstraintPass(witness); }); - it("should produce the correct result if the inital tally is not zero", async () => { + it("should produce the correct result if the initial tally is not zero", async () => { const generatedInputs = poll.tallyVotes() as unknown as ITallyVotesInputs; // Start the tally from non-zero value diff --git a/circuits/ts/__tests__/Ecdh.test.ts b/circuits/ts/__tests__/Ecdh.test.ts index 3baa883900..a8b0dda20e 100644 --- a/circuits/ts/__tests__/Ecdh.test.ts +++ b/circuits/ts/__tests__/Ecdh.test.ts @@ -40,7 +40,7 @@ describe("Public key derivation circuit", () => { pubKey: keypair2.pubKey.asCircuitInputs() as unknown as bigint[], }; - // calculate first time witness and check contraints + // calculate first time witness and check constraints const witness = await circuit.calculateWitness(circuitInputs); await circuit.expectConstraintPass(witness); diff --git a/circuits/ts/__tests__/TallyVotes.test.ts b/circuits/ts/__tests__/TallyVotes.test.ts index d141691ef3..ca9afe3305 100644 --- a/circuits/ts/__tests__/TallyVotes.test.ts +++ b/circuits/ts/__tests__/TallyVotes.test.ts @@ -133,7 +133,7 @@ describe("TallyVotes circuit", function test() { await circuit.expectConstraintPass(witness); }); - it("should produce the correct result if the inital tally is not zero", async () => { + it("should produce the correct result if the initial tally is not zero", async () => { const generatedInputs = poll.tallyVotes() as unknown as ITallyVotesInputs; // Start the tally from non-zero value @@ -220,7 +220,7 @@ describe("TallyVotes circuit", function test() { await circuitNonQv.expectConstraintPass(witness); }); - it("should produce the correct result if the inital tally is not zero", async () => { + it("should produce the correct result if the initial tally is not zero", async () => { const generatedInputs = poll.tallyVotesNonQv() as unknown as ITallyVotesInputs; // Start the tally from non-zero value diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 3088f01e15..b931232155 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -3,6 +3,136 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* add interfaces and factory contracts with Natspec ([579a53f](https://github.com/privacy-scaling-explorations/maci/commit/579a53f1f9a501e95fbfb064d39272c57a9e4f21)) +* **circuits:** remove circomlib fork in favour of latest and zk-kit ([bf11b40](https://github.com/privacy-scaling-explorations/maci/commit/bf11b4092cd531cf0993534061cf7c24e8de44e2)), closes [#772](https://github.com/privacy-scaling-explorations/maci/issues/772) +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* **cli:** accept signer as parameter to cli commands ([b1802e7](https://github.com/privacy-scaling-explorations/maci/commit/b1802e79ac853aa796ba7078e994683b0db35061)) +* **cli:** add get poll cli command ([e6e2dd3](https://github.com/privacy-scaling-explorations/maci/commit/e6e2dd3714ff4a5261a864f26aef5fb9e745ac22)) +* **cli:** add relevant information in tally.json to simplify verify interface ([6fa9c1e](https://github.com/privacy-scaling-explorations/maci/commit/6fa9c1ee62fabff44410e4bd3ab71847de4338ed)) +* **cli:** add seed param for generate keypair command ([29d7b20](https://github.com/privacy-scaling-explorations/maci/commit/29d7b2057741012811622c30f91cda74cf4906eb)) +* **cli:** improve cli integration ux ([7727ab1](https://github.com/privacy-scaling-explorations/maci/commit/7727ab1d99096b296d6c3f25956b0465d036aa4d)) +* **contracts:** return contract addresses when deploying the poll contract ([e94998c](https://github.com/privacy-scaling-explorations/maci/commit/e94998c12d8a5f2bde2fb54b4af384d42e35d646)) +* modify cli/.env.template and allow hardhat.config.ts to read env variables ([a206df1](https://github.com/privacy-scaling-explorations/maci/commit/a206df111ef8439bb1c0b7d484a288087602c9f2)) +* optimize deployment and tally event ([185b407](https://github.com/privacy-scaling-explorations/maci/commit/185b407df6db0484824b99286a6b0e866a7345bf)) +* **proofs:** make preferred witness type in circuit's genProof function ([2b95044](https://github.com/privacy-scaling-explorations/maci/commit/2b95044921cd0bed72694d069e2f9ed8fa44e72e)) +* **qv:** add optional flag to use quadratic voting or not in MACI ([86ba854](https://github.com/privacy-scaling-explorations/maci/commit/86ba8548780049245482e5277cc47f4a8776e9e6)) +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) + + +### Bug Fixes + +* add on-chain verification ([6427f37](https://github.com/privacy-scaling-explorations/maci/commit/6427f373d805805adb6205270f5074561d5c3a35)) +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **cli:** add a check that the subsidy verifying key was set correctly on chain ([6bda14d](https://github.com/privacy-scaling-explorations/maci/commit/6bda14dd7021846a639ce8cffef3a863eda2b447)), closes [#446](https://github.com/privacy-scaling-explorations/maci/issues/446) +* **cli:** add env initialization for hardhat conifg ([5442b8a](https://github.com/privacy-scaling-explorations/maci/commit/5442b8a88e3133f2cbdbcf68ed1710207d5f0988)) +* **cli:** export genLocalState ([0026669](https://github.com/privacy-scaling-explorations/maci/commit/0026669b31420ad31da1fa7eb716822217a3df30)) +* **cli:** give priority to gatekeeper and voice credit proxy args ([1597ee3](https://github.com/privacy-scaling-explorations/maci/commit/1597ee3a00c05fdf8ff46811804a78af450f066c)) +* **cli:** prioritize contract addresses params ([8ec36c4](https://github.com/privacy-scaling-explorations/maci/commit/8ec36c4d65329b40d7e232861c63208761d73b0a)), closes [#1039](https://github.com/privacy-scaling-explorations/maci/issues/1039) +* **cli:** remove files property from package.json ([5c544c6](https://github.com/privacy-scaling-explorations/maci/commit/5c544c62f071f7e9e2d613fe80c0bfda2a75e202)) +* **cli:** remove hardcoded gas limit from signup and publish ([1bf3a4b](https://github.com/privacy-scaling-explorations/maci/commit/1bf3a4b525956bf06a99cdb93aa5f3eef2d34390)), closes [#1086](https://github.com/privacy-scaling-explorations/maci/issues/1086) +* **cli:** remove redundant local check for poll address ([8b19756](https://github.com/privacy-scaling-explorations/maci/commit/8b1975665fdacffc9b116822d99d4b711f4e2871)), closes [#1084](https://github.com/privacy-scaling-explorations/maci/issues/1084) +* **cli:** run all the tests for package ([859a8cf](https://github.com/privacy-scaling-explorations/maci/commit/859a8cfd4a45fa8919a536f9503fc838b5aa4568)) +* **cli:** signup loop length ([bfecd5b](https://github.com/privacy-scaling-explorations/maci/commit/bfecd5be779b5564d0a4436ad7725d2aedcbb320)) +* **contracts:** fix wrong tally processing check ([a90bcf8](https://github.com/privacy-scaling-explorations/maci/commit/a90bcf838a1236f212e9e22a725e3e605dbc707e)), closes [#1137](https://github.com/privacy-scaling-explorations/maci/issues/1137) +* **contracts:** save numSignups after merging maciStateAq inside the Poll contract ([4985b2d](https://github.com/privacy-scaling-explorations/maci/commit/4985b2d61655f3b802186fc03c2d85a658c0f0da)), closes [#1091](https://github.com/privacy-scaling-explorations/maci/issues/1091) +* **fetch:** fix bugs related to logs fetching ([7c7874e](https://github.com/privacy-scaling-explorations/maci/commit/7c7874e86ccfff35a45b33caa7587bd3c0b1cf01)), closes [#1043](https://github.com/privacy-scaling-explorations/maci/issues/1043) [#1044](https://github.com/privacy-scaling-explorations/maci/issues/1044) +* **fix integrationtests:** fix integrationTests caused by refactoring ([09ae37f](https://github.com/privacy-scaling-explorations/maci/commit/09ae37fd63db7ee75b977d33e67ded050ce7441d)) +* **fix subsidy.sol issues:** address PR on Subsidy.sol ([bb68116](https://github.com/privacy-scaling-explorations/maci/commit/bb6811667f912c9ab0b3af2af083a5421a0d832b)) +* **message-batch-index:** remove redundant check ([98c00a6](https://github.com/privacy-scaling-explorations/maci/commit/98c00a674133e020ea42ab3fee5d089a15d47920)) +* **nightly:** add back snarkjs to cli as dev dependency and fix poll duration ([1e5e41d](https://github.com/privacy-scaling-explorations/maci/commit/1e5e41d1b1d322af50935058c2dde71c6ccc91bb)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* **signups:** ensure we account for the blank state leaf ([b1c8c97](https://github.com/privacy-scaling-explorations/maci/commit/b1c8c9719da5d47b92408f1222399c9c4acf3df9)), closes [#947](https://github.com/privacy-scaling-explorations/maci/issues/947) +* **tests:** fix ceremony params nightly workflow and convert to ts ([b2b4d4a](https://github.com/privacy-scaling-explorations/maci/commit/b2b4d4ad8f3e02ca8eacce7e694b65e104f668e0)) +* undefined error reading totalSpentVoiceCredits ([10e46af](https://github.com/privacy-scaling-explorations/maci/commit/10e46afd39ec265d0c74f69a3ee13a57340e8955)) + + +### Code Refactoring + +* **circuits:** fix ts types, improve docs ([a849486](https://github.com/privacy-scaling-explorations/maci/commit/a84948685d2e4be426cef50c5c608c107b5142b1)) +* **cli:** print relevant values when comparing fails ([2e26126](https://github.com/privacy-scaling-explorations/maci/commit/2e26126f61cf95417aa3f5021775fc657cae7b95)) +* **cli:** use object args for cli commands ([41c4333](https://github.com/privacy-scaling-explorations/maci/commit/41c4333f8471b6a9ed616e5081dd99684b458b51)) +* **contracts:** cleanup unused scripts and organize ts code ([458bc6b](https://github.com/privacy-scaling-explorations/maci/commit/458bc6b09cbc8db652dbb72525e299a4c2631caf)) +* **contracts:** refactor contracts code by removing dead code, and various optimizations ([7cbe5bd](https://github.com/privacy-scaling-explorations/maci/commit/7cbe5bd67dbfe98b46b485a75361a6cc3badb7ff)) +* **contracts:** remove maxValues and batchSizes from Maci.deployPoll() and instead calculate ([5393868](https://github.com/privacy-scaling-explorations/maci/commit/5393868efa270d9308e78c96e9bf6a7e8d63f3b6)), closes [#1066](https://github.com/privacy-scaling-explorations/maci/issues/1066) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** remove unnecessary messageAq from Poll ([d3930f7](https://github.com/privacy-scaling-explorations/maci/commit/d3930f706963747903305cce1ee5a716ea28c31d)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **optimisedmt:** remove dependency and implement locally ([c7d81e2](https://github.com/privacy-scaling-explorations/maci/commit/c7d81e20aaf6308c7d4e1efc09c497729f6a8f10)) +* **refactor verify.ts:** refactor verify cli command for Tally and Subsidy contracts ([dedfda6](https://github.com/privacy-scaling-explorations/maci/commit/dedfda6364d9a0ba26492eda6621a32c07fc0683)) +* **remove messageaqfactory:** remove messageAqFactory; remove redundant pollFactory dependency ([dcd1c67](https://github.com/privacy-scaling-explorations/maci/commit/dcd1c67f14f0cb92979d13e7887373ff6e354a6f)) +* **repo:** remove redundant code from certain packages ([d55497a](https://github.com/privacy-scaling-explorations/maci/commit/d55497a9805812b2d2472386caecf75995d6efcf)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **ceremony:** add circuit tests with ceremony params ([58611db](https://github.com/privacy-scaling-explorations/maci/commit/58611dbf62f2dc01cf978d6bf01cf15bdef77356)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **cli:** change maci-cli script run instructions ([c51c34d](https://github.com/privacy-scaling-explorations/maci/commit/c51c34dc915721770474ad3555853ce1264aea07)) +* **cli:** clarify cli commands ([3aa4f33](https://github.com/privacy-scaling-explorations/maci/commit/3aa4f33aa7f4558f16da65b5a3fb93b282bd4fe5)) +* **cli:** integrate linter ([49571a1](https://github.com/privacy-scaling-explorations/maci/commit/49571a1199a8a027c64a7c39bd21f46a3a268f43)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **cli:** prepare cli package for web apps ([f706d9a](https://github.com/privacy-scaling-explorations/maci/commit/f706d9aa5689f58e646650d92b188f27e5beb4d8)) +* **cli:** reorganize e2e tests and add more tests for cli commands ([6000227](https://github.com/privacy-scaling-explorations/maci/commit/6000227231bee3917686b64685c14ca329fcf38b)) +* **cli:** support install for web apps ([3166cdd](https://github.com/privacy-scaling-explorations/maci/commit/3166cdd249450c36f069e0d9703980902339eb54)) +* **cli:** unify publish arg type ([50635dc](https://github.com/privacy-scaling-explorations/maci/commit/50635dc429f8784dde3815d91384c3d67eae8f85)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **contracts:** enable linter ([5c92154](https://github.com/privacy-scaling-explorations/maci/commit/5c92154fc09f0c59ca5054229798f3c8ad7d134d)) +* **core:** add `CircuitInputs` type ([c4b72b0](https://github.com/privacy-scaling-explorations/maci/commit/c4b72b0f0b25a1bb147348a728a9550c8b6460a1)) +* **core:** add quiet flag to process messages to log errors ([8793a09](https://github.com/privacy-scaling-explorations/maci/commit/8793a09dd3c52021d467b27e1cb64c023faba317)), closes [#1135](https://github.com/privacy-scaling-explorations/maci/issues/1135) +* **core:** add Typedoc comments ([a8521ee](https://github.com/privacy-scaling-explorations/maci/commit/a8521eea97bca47298bc2c59ae1c31df9533258b)) +* **coverage:** setup coverage for TS packages ([f4e6964](https://github.com/privacy-scaling-explorations/maci/commit/f4e6964b3e268e4d3f2819b85e6abf3e34bcb10e)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump @commander-js/extra-typings from 11.1.0 to 12.0.0 ([8688daa](https://github.com/privacy-scaling-explorations/maci/commit/8688daadb2cd2f863bbee718e30cf8d9e8c9b110)) +* **deps:** bump commander from 11.1.0 to 12.0.0 ([72b1a2e](https://github.com/privacy-scaling-explorations/maci/commit/72b1a2e672d4808d3b2c7a3ad13e92b7db0811c8)) +* **deps:** bump dotenv from 16.3.1 to 16.3.2 ([845becc](https://github.com/privacy-scaling-explorations/maci/commit/845becc8508d841b01430eb56379f828687b840b)) +* **deps:** bump dotenv from 16.3.2 to 16.4.1 ([2430c50](https://github.com/privacy-scaling-explorations/maci/commit/2430c50ba5625f87f632f302c420a7fd10f5467a)) +* **deps:** bump dotenv from 16.4.1 to 16.4.2 ([8431e74](https://github.com/privacy-scaling-explorations/maci/commit/8431e74c22099dcd7201e7005dbc25bc03c9e65c)) +* **deps:** bump dotenv from 16.4.2 to 16.4.4 ([472c616](https://github.com/privacy-scaling-explorations/maci/commit/472c616570c427f508f3854e1cd357ceed4a8e1a)) +* **deps:** bump ethers from 6.10.0 to 6.11.0 ([815696d](https://github.com/privacy-scaling-explorations/maci/commit/815696de4268c41e466ab6794215807a38906938)) +* **deps:** bump ethers from 6.11.0 to 6.11.1 ([a01f434](https://github.com/privacy-scaling-explorations/maci/commit/a01f434451a377447052518236a23ad3c9051d17)) +* **deps:** bump ethers from 6.9.2 to 6.10.0 ([dd8b4a0](https://github.com/privacy-scaling-explorations/maci/commit/dd8b4a048c013f28be175cc0db17fe5fc45d5976)) +* **deps:** bump hardhat from 2.19.4 to 2.19.5 ([40ab10d](https://github.com/privacy-scaling-explorations/maci/commit/40ab10defff0a538aefa81d67fd6ce04b69f5eb6)) +* **deps:** bump hardhat from 2.19.5 to 2.20.1 ([68543a6](https://github.com/privacy-scaling-explorations/maci/commit/68543a6886b2836c42fd18b77f9e98f322fb971e)) +* **deps:** bump snarkjs from 0.7.2 to 0.7.3 ([cf95b6f](https://github.com/privacy-scaling-explorations/maci/commit/cf95b6ff6f66342e3b75dedd5c70d62f8f0816b1)) +* **deps:** remove circomlib and add big-integer ([50eff2f](https://github.com/privacy-scaling-explorations/maci/commit/50eff2f6a8e009c19eab50b3b3e15b779d63f8f3)) +* **key-change:** add tests and docs around key-change ([ce394e2](https://github.com/privacy-scaling-explorations/maci/commit/ce394e2d2bf3c8c6748cf8e8d1e401b8f3c924ee)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **maci-cli:** check hardhat config file ([3a6ac6b](https://github.com/privacy-scaling-explorations/maci/commit/3a6ac6b41b759edff67533c0b665777329d63735)) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* rebased with the dev branch ([8165968](https://github.com/privacy-scaling-explorations/maci/commit/8165968fb18aa599a30c2f4ba48553cf65a16980)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **topup:** implement test cases for the topup feature ([7775a8b](https://github.com/privacy-scaling-explorations/maci/commit/7775a8b3295f29b098446d3e78a4200c03c847dd)) +* update ptauFiles URLs ([b11b56a](https://github.com/privacy-scaling-explorations/maci/commit/b11b56ae09d78ef89443b094adad5b1916438ca1)) +* **website:** apply linter for website and remove unused packages ([1a3b343](https://github.com/privacy-scaling-explorations/maci/commit/1a3b343948f9f48ed4948a5ade63b4b55645f4ab)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Code Refactoring diff --git a/cli/package.json b/cli/package.json index fb0132c1a8..808073469e 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "maci-cli", - "version": "1.1.2", + "version": "1.2.0", "description": "CLI utilities for MACI", "main": "build/ts/index.js", "exports": { @@ -48,11 +48,11 @@ "dotenv": "^16.4.4", "ethers": "^6.11.1", "hardhat": "^2.20.1", - "maci-circuits": "^1.1.2", - "maci-contracts": "^1.1.2", - "maci-core": "^1.1.2", - "maci-crypto": "^1.1.2", - "maci-domainobjs": "^1.1.2", + "maci-circuits": "^1.2.0", + "maci-contracts": "^1.2.0", + "maci-core": "^1.2.0", + "maci-crypto": "^1.2.0", + "maci-domainobjs": "^1.2.0", "prompt": "^1.3.0" }, "devDependencies": { diff --git a/cli/tests/utils.ts b/cli/tests/utils.ts index 7a9caf9b20..707420f9a0 100644 --- a/cli/tests/utils.ts +++ b/cli/tests/utils.ts @@ -20,7 +20,7 @@ export const cleanVanilla = (): void => { /** * Test utility to clean up the proofs directory - * adn the subsidy.json file + * and the subsidy.json file */ export const cleanSubsidy = (): void => { cleanVanilla(); diff --git a/cli/ts/commands/airdrop.ts b/cli/ts/commands/airdrop.ts index a83062579f..67ce7d3e5c 100644 --- a/cli/ts/commands/airdrop.ts +++ b/cli/ts/commands/airdrop.ts @@ -4,7 +4,7 @@ import { type AirdropArgs, logError, logGreen, success, readContractAddress, con /** * Utility that can be used to get - * topup credits aidropped + * topup credits airdropped * to the coordinator * @param AirdropArgs - The arguments for the airdrop command */ @@ -23,7 +23,7 @@ export const airdrop = async ({ const topupCredit = readContractAddress("TopupCredit", network?.name); // we want to ensure that we have either the address stored - // or that it was passed as a paramter + // or that it was passed as a parameter if (!topupCredit && !contractAddress) { logError("Please provide an ERC20 contract address"); } diff --git a/cli/ts/commands/deployPoll.ts b/cli/ts/commands/deployPoll.ts index bb3158b029..bfbae295af 100644 --- a/cli/ts/commands/deployPoll.ts +++ b/cli/ts/commands/deployPoll.ts @@ -159,7 +159,7 @@ export const deployPoll = async ({ logGreen(quiet, info(`Subsidy contract: ${subsidyContractAddress}`)); storeContractAddress(`Subsidy-${pollId.toString()}`, subsidyContractAddress, network?.name); } - // store the addresss + // store the address storeContractAddress(`MessageProcessor-${pollId.toString()}`, messageProcessorContractAddress, network?.name); storeContractAddress(`Tally-${pollId.toString()}`, tallyContractAddress, network?.name); storeContractAddress(`Poll-${pollId.toString()}`, pollAddr, network?.name); diff --git a/cli/ts/utils/defaults.ts b/cli/ts/utils/defaults.ts index c2ee94404a..e61037ac52 100644 --- a/cli/ts/utils/defaults.ts +++ b/cli/ts/utils/defaults.ts @@ -6,7 +6,7 @@ export const DEFAULT_ETH_SK = "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5 export const DEFAULT_INITIAL_VOICE_CREDITS = 99; // the default signup gatekeeper data export const DEFAULT_SG_DATA = "0x0000000000000000000000000000000000000000000000000000000000000000"; -// the defualt initial voice credit proxy data +// the default initial voice credit proxy data export const DEFAULT_IVCP_DATA = "0x0000000000000000000000000000000000000000000000000000000000000000"; // the default number of operations to queue in the state root queue export const DEFAULT_SR_QUEUE_OPS = 4; diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index e82704847a..5311ea38a2 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -3,6 +3,132 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* add interfaces and factory contracts with Natspec ([579a53f](https://github.com/privacy-scaling-explorations/maci/commit/579a53f1f9a501e95fbfb064d39272c57a9e4f21)) +* **cli:** add get poll cli command ([e6e2dd3](https://github.com/privacy-scaling-explorations/maci/commit/e6e2dd3714ff4a5261a864f26aef5fb9e745ac22)) +* **cli:** improve cli integration ux ([7727ab1](https://github.com/privacy-scaling-explorations/maci/commit/7727ab1d99096b296d6c3f25956b0465d036aa4d)) +* **contracts:** made `nextPollId` public to support third-party apps more easily ([c5c6bdb](https://github.com/privacy-scaling-explorations/maci/commit/c5c6bdb3db3e4ce25d0de642e75278becc405d61)) +* **contracts:** return contract addresses when deploying the poll contract ([e94998c](https://github.com/privacy-scaling-explorations/maci/commit/e94998c12d8a5f2bde2fb54b4af384d42e35d646)) +* **eas-gatekeeper:** implement an eas gatekeeper for MACI ([8b25d94](https://github.com/privacy-scaling-explorations/maci/commit/8b25d94c7a99ab1b5e5e75062d782a6dae239b34)) +* optimize deployment and tally event ([185b407](https://github.com/privacy-scaling-explorations/maci/commit/185b407df6db0484824b99286a6b0e866a7345bf)) +* **poll:** add message batch submission ([005258b](https://github.com/privacy-scaling-explorations/maci/commit/005258bad7a87f52fe2d770c55b69e4f300bcca7)) +* **tally:** remove ballotsTallied event and add view function ([32f840e](https://github.com/privacy-scaling-explorations/maci/commit/32f840ec5e61bac8b0bc1d1711fb27fc5b9dbf22)) + + +### Bug Fixes + +* **address messageprocessor issues:** address and fixed PR reviews on MessageProcessor.sol ([6505fb2](https://github.com/privacy-scaling-explorations/maci/commit/6505fb2464866bf96c293dad2f3662638930cde8)) +* **address pr reviews:** address PR reviews issues for Tally.sol ([10f2c7f](https://github.com/privacy-scaling-explorations/maci/commit/10f2c7f486de115e3d2706de1a773a93854ca505)) +* **cli:** add auto mining option for hardhat ([e5ad345](https://github.com/privacy-scaling-explorations/maci/commit/e5ad3452b77be5007b0ddbe593606a7bcd2a9fc5)) +* **constraint updatesbcommitment:** add onlyOwner modifier to updateSbCommitment ([5b8ee10](https://github.com/privacy-scaling-explorations/maci/commit/5b8ee101f40ed02a79e4bf09a9eaf946b54a8ee2)) +* **contract unit test:** fixed unit test suites error caused by contracts refactor ([0dca2c0](https://github.com/privacy-scaling-explorations/maci/commit/0dca2c07a1fb0199128bf809d35a06f71da36b74)) +* **contracts:** enforce msgType = 1 for vote messages at the contract level ([c547e9c](https://github.com/privacy-scaling-explorations/maci/commit/c547e9c2f32414ab6ec3b1e714217850fd52e18b)) +* **contracts:** fix wrong tally processing check ([a90bcf8](https://github.com/privacy-scaling-explorations/maci/commit/a90bcf838a1236f212e9e22a725e3e605dbc707e)), closes [#1137](https://github.com/privacy-scaling-explorations/maci/issues/1137) +* **contracts:** prevent user DoS the stateAq tree merging ([d07d3bf](https://github.com/privacy-scaling-explorations/maci/commit/d07d3bf565df0a1882b7296ba58e494eb0092681)) +* **contracts:** save numSignups after merging maciStateAq inside the Poll contract ([4985b2d](https://github.com/privacy-scaling-explorations/maci/commit/4985b2d61655f3b802186fc03c2d85a658c0f0da)), closes [#1091](https://github.com/privacy-scaling-explorations/maci/issues/1091) +* **crypto:** get rid of potential prototype polution ([9b8a97c](https://github.com/privacy-scaling-explorations/maci/commit/9b8a97cc9661e0ee6f535cdcab19b4aa0fa98136)) +* **fetch:** fix bugs related to logs fetching ([7c7874e](https://github.com/privacy-scaling-explorations/maci/commit/7c7874e86ccfff35a45b33caa7587bd3c0b1cf01)), closes [#1043](https://github.com/privacy-scaling-explorations/maci/issues/1043) [#1044](https://github.com/privacy-scaling-explorations/maci/issues/1044) +* **fix subsidy.sol issues:** address PR on Subsidy.sol ([bb68116](https://github.com/privacy-scaling-explorations/maci/commit/bb6811667f912c9ab0b3af2af083a5421a0d832b)) +* **message-batch-index:** remove redundant check ([98c00a6](https://github.com/privacy-scaling-explorations/maci/commit/98c00a674133e020ea42ab3fee5d089a15d47920)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* return new poll addres ([acb38ba](https://github.com/privacy-scaling-explorations/maci/commit/acb38bafe3527ec5541e53c712981127246a007f)) +* **signups:** ensure we account for the blank state leaf ([b1c8c97](https://github.com/privacy-scaling-explorations/maci/commit/b1c8c9719da5d47b92408f1222399c9c4acf3df9)), closes [#947](https://github.com/privacy-scaling-explorations/maci/issues/947) + + +### Code Refactoring + +* **contracts:** add audit auggestions ([415c3da](https://github.com/privacy-scaling-explorations/maci/commit/415c3da5c65247b55b5078cc89c8f9605d8be77a)) +* **contracts:** add natspec across contracts and cleanup ([a6ad25e](https://github.com/privacy-scaling-explorations/maci/commit/a6ad25e3787fee837172b95ee706951806131bd4)) +* **contracts:** add public to Tally.isTallied ([0d28b7a](https://github.com/privacy-scaling-explorations/maci/commit/0d28b7a5fa22b6ea2f2b13de5e483f95f46c65be)) +* **contracts:** add virtual to functions which could be overridden ([aefe48a](https://github.com/privacy-scaling-explorations/maci/commit/aefe48abd34da1f64d3db9f25bb01ff3bbf08cc9)) +* **contracts:** cleanup unused scripts and organize ts code ([458bc6b](https://github.com/privacy-scaling-explorations/maci/commit/458bc6b09cbc8db652dbb72525e299a4c2631caf)) +* **contracts:** optimize code by using immutable variables are removing redundant code ([d39d384](https://github.com/privacy-scaling-explorations/maci/commit/d39d3844690749b396ba66226224789b19af522d)) +* **contracts:** optimize publishMessage by using calldata and removing arg change ([6f64471](https://github.com/privacy-scaling-explorations/maci/commit/6f64471e9f06b751297ea33d48d6f1e5b4a86fb9)) +* **contracts:** optimize utilities.padAndHashMessage ([0cc29ca](https://github.com/privacy-scaling-explorations/maci/commit/0cc29cabd6d2e82692dc996b0b3d71be28ad35b5)) +* **contracts:** refactor contracts code by removing dead code, and various optimizations ([7cbe5bd](https://github.com/privacy-scaling-explorations/maci/commit/7cbe5bd67dbfe98b46b485a75361a6cc3badb7ff)) +* **contracts:** refactoring deployment scripts ([eba33cf](https://github.com/privacy-scaling-explorations/maci/commit/eba33cfc822208d9a6ca1ad4e9d3442a8c613c4d)), closes [#555](https://github.com/privacy-scaling-explorations/maci/issues/555) +* **contracts:** remove maxValues and batchSizes from Maci.deployPoll() and instead calculate ([5393868](https://github.com/privacy-scaling-explorations/maci/commit/5393868efa270d9308e78c96e9bf6a7e8d63f3b6)), closes [#1066](https://github.com/privacy-scaling-explorations/maci/issues/1066) +* **contracts:** revisit functions visibility and inheritance ([f729336](https://github.com/privacy-scaling-explorations/maci/commit/f72933674f1253155887936cb40fe833ea219cf4)) +* **contracts:** smart contracts optimizations ([b10ff70](https://github.com/privacy-scaling-explorations/maci/commit/b10ff70a9f90e9e8d97497b7442d1416b06a09b9)) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** refactor the process message functions and general cleanup ([823cacd](https://github.com/privacy-scaling-explorations/maci/commit/823cacd8659281b8390b74c8d765b23ee7a83a80)) +* **core:** remove unnecessary messageAq from Poll ([d3930f7](https://github.com/privacy-scaling-explorations/maci/commit/d3930f706963747903305cce1ee5a716ea28c31d)) +* **core:** remove unnecessary stateAq from MaciState ([22a4f28](https://github.com/privacy-scaling-explorations/maci/commit/22a4f286010ff5add413eee88d933c0e74898346)) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **maci-core:** refactor directory structure for quick core component access ([3aeba77](https://github.com/privacy-scaling-explorations/maci/commit/3aeba77435fbd783e5cecf88a1f2c0d4c58c8022)) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **remove messageaqfactory:** remove messageAqFactory; remove redundant pollFactory dependency ([dcd1c67](https://github.com/privacy-scaling-explorations/maci/commit/dcd1c67f14f0cb92979d13e7887373ff6e354a6f)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **circuits:** refactor and add tests for the circom circuits ([4d6419b](https://github.com/privacy-scaling-explorations/maci/commit/4d6419b4962af6e94929721a3008406b6bc29c1e)) +* **cli:** integrate linter ([49571a1](https://github.com/privacy-scaling-explorations/maci/commit/49571a1199a8a027c64a7c39bd21f46a3a268f43)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **cli:** reorganize e2e tests and add more tests for cli commands ([6000227](https://github.com/privacy-scaling-explorations/maci/commit/6000227231bee3917686b64685c14ca329fcf38b)) +* **cli:** support install for web apps ([3166cdd](https://github.com/privacy-scaling-explorations/maci/commit/3166cdd249450c36f069e0d9703980902339eb54)) +* **contract:** add contract verification task ([ab4718f](https://github.com/privacy-scaling-explorations/maci/commit/ab4718f2084588ac443812ffb873d2cdcac0742b)) +* **contract:** add deploy script for eas gatekeeper ([65d883c](https://github.com/privacy-scaling-explorations/maci/commit/65d883c5686e8ba21c4858d298c08bf118ad91ad)) +* **contract:** add deploy tasks for maci ([8b58688](https://github.com/privacy-scaling-explorations/maci/commit/8b586889033c0703b6358ddda78753725b8d07c9)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **contract:** disable empty code blocks warnings ([f30bda2](https://github.com/privacy-scaling-explorations/maci/commit/f30bda2cd1cc58da5864f9954b177558e592e1f5)) +* **contracts:** add documentation for deployment workflow ([243690e](https://github.com/privacy-scaling-explorations/maci/commit/243690ea11fb91eb8bad3aea5539c1a19720e740)) +* **contracts:** add gas reporter to hardhat config ([fd00eb5](https://github.com/privacy-scaling-explorations/maci/commit/fd00eb5d073b12e3c8a6236d1629fe9ccc80f2e3)) +* **contracts:** add merge signups and messages task ([5ee0237](https://github.com/privacy-scaling-explorations/maci/commit/5ee023761f4c448f52a01007a1f2f84b74edd446)) +* **contracts:** add proof generation for task coordinator ([c145883](https://github.com/privacy-scaling-explorations/maci/commit/c145883ecc42b87170a401894b68cd2287d15832)) +* **contracts:** clarify EASGatekeeper description ([301a42b](https://github.com/privacy-scaling-explorations/maci/commit/301a42b9cf9921932b013f0c2882bce444e61113)) +* **contracts:** deploy poll ([f3ae8f8](https://github.com/privacy-scaling-explorations/maci/commit/f3ae8f8895c78e8e7f932c341a2063bad6f52f0e)) +* **contracts:** enable linter ([5c92154](https://github.com/privacy-scaling-explorations/maci/commit/5c92154fc09f0c59ca5054229798f3c8ad7d134d)) +* **contracts:** re-organize smart contract tests in separate files ([c7ee31e](https://github.com/privacy-scaling-explorations/maci/commit/c7ee31e0f2ef623e069cc5a5261ebcd40dbba4c6)) +* **contracts:** refactor and add unit tests to the current suite ([32c3485](https://github.com/privacy-scaling-explorations/maci/commit/32c348556e5bf7b0a586ed8925ef7037f6623af9)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump @types/snarkjs from 0.7.7 to 0.7.8 ([0d98828](https://github.com/privacy-scaling-explorations/maci/commit/0d988285b1694d57c40f815a1d1ec5f6a50e5296)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump dotenv from 16.3.2 to 16.4.1 ([2430c50](https://github.com/privacy-scaling-explorations/maci/commit/2430c50ba5625f87f632f302c420a7fd10f5467a)) +* **deps:** bump dotenv from 16.4.1 to 16.4.2 ([8431e74](https://github.com/privacy-scaling-explorations/maci/commit/8431e74c22099dcd7201e7005dbc25bc03c9e65c)) +* **deps:** bump dotenv from 16.4.2 to 16.4.4 ([472c616](https://github.com/privacy-scaling-explorations/maci/commit/472c616570c427f508f3854e1cd357ceed4a8e1a)) +* **deps:** bump ethers from 6.10.0 to 6.11.0 ([815696d](https://github.com/privacy-scaling-explorations/maci/commit/815696de4268c41e466ab6794215807a38906938)) +* **deps:** bump ethers from 6.11.0 to 6.11.1 ([a01f434](https://github.com/privacy-scaling-explorations/maci/commit/a01f434451a377447052518236a23ad3c9051d17)) +* **deps:** bump ethers from 6.9.2 to 6.10.0 ([dd8b4a0](https://github.com/privacy-scaling-explorations/maci/commit/dd8b4a048c013f28be175cc0db17fe5fc45d5976)) +* **deps:** bump hardhat from 2.19.4 to 2.19.5 ([40ab10d](https://github.com/privacy-scaling-explorations/maci/commit/40ab10defff0a538aefa81d67fd6ce04b69f5eb6)) +* **deps:** bump hardhat from 2.19.5 to 2.20.1 ([68543a6](https://github.com/privacy-scaling-explorations/maci/commit/68543a6886b2836c42fd18b77f9e98f322fb971e)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **maci:** added audit report and amended Contract's README ([0c6d28b](https://github.com/privacy-scaling-explorations/maci/commit/0c6d28b66091609a3cf62b1a0faa08e87b5c82aa)) +* **maci:** added README for the circuit package and fixed typo in contract's README ([4d0f74b](https://github.com/privacy-scaling-explorations/maci/commit/4d0f74b8480cd2d20e835d43b33c2aab6578d194)) +* **maci:** updated docs after review ([fd0da34](https://github.com/privacy-scaling-explorations/maci/commit/fd0da346406a5c2c6648bbff1b081863039bcf2b)), closes [#531](https://github.com/privacy-scaling-explorations/maci/issues/531) [#556](https://github.com/privacy-scaling-explorations/maci/issues/556) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publish:** fix publishing scripts to publish contracts with ceremony params ([f27af1c](https://github.com/privacy-scaling-explorations/maci/commit/f27af1cbea7070848686fdbebb234bce47a180c8)), closes [#973](https://github.com/privacy-scaling-explorations/maci/issues/973) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* rebased with the dev branch ([8165968](https://github.com/privacy-scaling-explorations/maci/commit/8165968fb18aa599a30c2f4ba48553cf65a16980)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **topup:** implement test cases for the topup feature ([7775a8b](https://github.com/privacy-scaling-explorations/maci/commit/7775a8b3295f29b098446d3e78a4200c03c847dd)) +* update docs ([d33e7e6](https://github.com/privacy-scaling-explorations/maci/commit/d33e7e6bc833907bec1d5575ec4f46656011028c)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Features diff --git a/contracts/contracts/Poll.sol b/contracts/contracts/Poll.sol index a6560f9da7..0adee8cb78 100644 --- a/contracts/contracts/Poll.sol +++ b/contracts/contracts/Poll.sol @@ -71,6 +71,7 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, EmptyBallotRoots, IPol error MaciPubKeyLargerThanSnarkFieldSize(); error StateAqAlreadyMerged(); error StateAqSubtreesNeedMerge(); + error InvalidBatchLength(); event PublishMessage(Message _message, PubKey _encPubKey); event TopupMessage(Message _message); @@ -197,6 +198,26 @@ contract Poll is Params, Utilities, SnarkCommon, Ownable, EmptyBallotRoots, IPol emit PublishMessage(_message, _encPubKey); } + /// @notice submit a message batch + /// @dev Can only be submitted before the voting deadline + /// @param _messages the messages + /// @param _encPubKeys the encrypted public keys + function publishMessageBatch(Message[] calldata _messages, PubKey[] calldata _encPubKeys) external { + if (_messages.length != _encPubKeys.length) { + revert InvalidBatchLength(); + } + + uint256 len = _messages.length; + for (uint256 i = 0; i < len; ) { + // an event will be published by this function already + publishMessage(_messages[i], _encPubKeys[i]); + + unchecked { + i++; + } + } + } + /// @inheritdoc IPoll function mergeMaciStateAqSubRoots(uint256 _numSrQueueOps, uint256 _pollId) public onlyOwner isAfterVotingDeadline { // This function cannot be called after the stateAq was merged diff --git a/contracts/contracts/trees/AccQueue.sol b/contracts/contracts/trees/AccQueue.sol index 462a176ec1..7e1f6fe2a9 100644 --- a/contracts/contracts/trees/AccQueue.sol +++ b/contracts/contracts/trees/AccQueue.sol @@ -285,7 +285,7 @@ abstract contract AccQueue is Ownable, Hasher { // There must be subtrees to merge if (numLeaves == 0) revert NothingToMerge(); - // Fill any empty leaves in the current subtree with zeros ony if the + // Fill any empty leaves in the current subtree with zeros only if the // current subtree is not full if (numLeaves % subTreeCapacity != 0) { fill(); diff --git a/contracts/package.json b/contracts/package.json index 6208fd2fca..2b28a8b214 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "maci-contracts", - "version": "1.1.2", + "version": "1.2.0", "description": "Solidity Smart Contracts for MACI (Minimal Anti-Collusion Infrastructure)", "main": "build/ts/index.js", "exports": { @@ -71,10 +71,10 @@ "circomlibjs": "^0.1.7", "ethers": "^6.11.1", "hardhat": "^2.20.1", - "maci-circuits": "^1.1.2", - "maci-core": "^1.1.2", - "maci-crypto": "^1.1.2", - "maci-domainobjs": "^1.1.2", + "maci-circuits": "^1.2.0", + "maci-core": "^1.2.0", + "maci-crypto": "^1.2.0", + "maci-domainobjs": "^1.2.0", "solidity-docgen": "^0.6.0-beta.36" }, "devDependencies": { diff --git a/contracts/tasks/deploy/index.ts b/contracts/tasks/deploy/index.ts index 71be91f7c5..63d76bd6d8 100644 --- a/contracts/tasks/deploy/index.ts +++ b/contracts/tasks/deploy/index.ts @@ -2,7 +2,7 @@ import fs from "fs"; import path from "path"; /** - * The same as individual imports but doesn't require to add new import line everytime + * The same as individual imports but doesn't require to add new import line every time */ ["maci", "poll"].forEach((folder) => { const tasksPath = path.resolve(__dirname, folder); diff --git a/contracts/tasks/helpers/types.ts b/contracts/tasks/helpers/types.ts index 9931cd0efd..66c1f117ce 100644 --- a/contracts/tasks/helpers/types.ts +++ b/contracts/tasks/helpers/types.ts @@ -532,7 +532,7 @@ export interface IVerifyFullArgs { } /** - * Interface that represents verification subtaks arguments + * Interface that represents verification subtask arguments * This is extracted from hardhat etherscan plugin */ export interface IVerificationSubtaskArgs { diff --git a/contracts/tests/AccQueue.test.ts b/contracts/tests/AccQueue.test.ts index 2fca1592c1..69d2ae673a 100644 --- a/contracts/tests/AccQueue.test.ts +++ b/contracts/tests/AccQueue.test.ts @@ -243,7 +243,7 @@ describe("AccQueues", () => { ); }); - it("Merging without enqueing new data should not change the root", async () => { + it("Merging without enqueuing new data should not change the root", async () => { const MAIN_DEPTH = 5; const r = await deployTestAccQueues("AccQueueBinary0", SUB_DEPTH, HASH_LENGTH, ZERO); diff --git a/contracts/tests/Poll.test.ts b/contracts/tests/Poll.test.ts index a7dc08d31d..a44a867c17 100644 --- a/contracts/tests/Poll.test.ts +++ b/contracts/tests/Poll.test.ts @@ -36,6 +36,8 @@ describe("Poll", () => { const maciState = new MaciState(STATE_TREE_DEPTH); + const keypair = new Keypair(); + describe("deployment", () => { before(async () => { signer = await getDefaultSigner(); @@ -175,8 +177,6 @@ describe("Poll", () => { describe("publishMessage", () => { it("should publish a message to the Poll contract", async () => { - const keypair = new Keypair(); - const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, 0n); const signature = command.sign(keypair.privKey); @@ -190,8 +190,6 @@ describe("Poll", () => { }); it("should emit an event when publishing a message", async () => { - const keypair = new Keypair(); - const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, 0n); const signature = command.sign(keypair.privKey); @@ -204,11 +202,45 @@ describe("Poll", () => { maciState.polls.get(pollId)?.publishMessage(message, keypair.pubKey); }); - it("shold not allow to publish a message after the voting period ends", async () => { + it("should allow to publish a message batch", async () => { + const messages: [Message, PubKey][] = []; + for (let i = 0; i < 2; i += 1) { + const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, BigInt(i)); + const signature = command.sign(keypair.privKey); + const sharedKey = Keypair.genEcdhSharedKey(keypair.privKey, coordinator.pubKey); + const message = command.encrypt(signature, sharedKey); + messages.push([message, keypair.pubKey]); + } + + const tx = await pollContract.publishMessageBatch( + messages.map(([m]) => m.asContractParam()), + messages.map(([, k]) => k.asContractParam()), + ); + const receipt = await tx.wait(); + expect(receipt?.status).to.eq(1); + + messages.forEach(([message, key]) => { + maciState.polls.get(pollId)?.publishMessage(message, key); + }); + }); + + it("should throw when the message batch has messages length != encPubKeys length", async () => { + const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, 0n); + const signature = command.sign(keypair.privKey); + const sharedKey = Keypair.genEcdhSharedKey(keypair.privKey, coordinator.pubKey); + const message = command.encrypt(signature, sharedKey); + await expect( + pollContract.publishMessageBatch( + [message.asContractParam(), message.asContractParam()], + [keypair.pubKey.asContractParam()], + ), + ).to.be.revertedWithCustomError(pollContract, "InvalidBatchLength"); + }); + + it("should not allow to publish a message after the voting period ends", async () => { const dd = await pollContract.getDeployTimeAndDuration(); await timeTravel(signer.provider as unknown as EthereumProvider, Number(dd[0]) + 1); - const keypair = new Keypair(); const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, 0n); const signature = command.sign(keypair.privKey); @@ -219,6 +251,18 @@ describe("Poll", () => { pollContract.publishMessage(message.asContractParam(), keypair.pubKey.asContractParam(), { gasLimit: 300000 }), ).to.be.revertedWithCustomError(pollContract, "VotingPeriodOver"); }); + + it("should not allow to publish a message batch after the voting period ends", async () => { + const command = new PCommand(1n, keypair.pubKey, 0n, 9n, 1n, pollId, 0n); + const signature = command.sign(keypair.privKey); + const sharedKey = Keypair.genEcdhSharedKey(keypair.privKey, coordinator.pubKey); + const message = command.encrypt(signature, sharedKey); + await expect( + pollContract.publishMessageBatch([message.asContractParam()], [keypair.pubKey.asContractParam()], { + gasLimit: 300000, + }), + ).to.be.revertedWithCustomError(pollContract, "VotingPeriodOver"); + }); }); describe("Merge messages", () => { diff --git a/contracts/ts/index.ts b/contracts/ts/index.ts index a3c29d9b13..17996666e6 100644 --- a/contracts/ts/index.ts +++ b/contracts/ts/index.ts @@ -4,6 +4,7 @@ export { deployVkRegistry, deployMaci, deployContract, + deployContractWithLinkedLibraries, deploySignupToken, deploySignupTokenGatekeeper, deployConstantInitialVoiceCreditProxy, diff --git a/contracts/ts/types.ts b/contracts/ts/types.ts index 4bf861b24c..b0fe921df3 100644 --- a/contracts/ts/types.ts +++ b/contracts/ts/types.ts @@ -86,7 +86,7 @@ export interface IDeployedTestContracts { } /** - * An interface that representes an action that should + * An interface that represents an action that should * be applied to a MaciState and its Polls within the * genMaciState function. */ diff --git a/contracts/ts/utils.ts b/contracts/ts/utils.ts index 75e5b49cf6..359c9b2a90 100644 --- a/contracts/ts/utils.ts +++ b/contracts/ts/utils.ts @@ -33,7 +33,7 @@ export const sleep = async (ms: number): Promise => { }; /** - * The comparision function for Actions based on block number and transaction + * The comparison function for Actions based on block number and transaction * index. * @param actions - the array of actions to sort * @returns the sorted array of actions diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 9709ae203c..067c358e78 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,6 +3,94 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* **qv:** add optional flag to use quadratic voting or not in MACI ([86ba854](https://github.com/privacy-scaling-explorations/maci/commit/86ba8548780049245482e5277cc47f4a8776e9e6)) +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) + + +### Bug Fixes + +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **circuits:** fix coordinator censoring by passing currentVoteWeight = 0 ([22e091d](https://github.com/privacy-scaling-explorations/maci/commit/22e091d2941b5e86ecd7df2f228bd0e10b6c4c47)) +* **contracts:** save numSignups after merging maciStateAq inside the Poll contract ([4985b2d](https://github.com/privacy-scaling-explorations/maci/commit/4985b2d61655f3b802186fc03c2d85a658c0f0da)), closes [#1091](https://github.com/privacy-scaling-explorations/maci/issues/1091) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* **publishing:** do not publish benchmarks folder ([f2fbc36](https://github.com/privacy-scaling-explorations/maci/commit/f2fbc368a8a9520288b365e6fdf04fd3fee9e685)) +* **signups:** ensure we account for the blank state leaf ([b1c8c97](https://github.com/privacy-scaling-explorations/maci/commit/b1c8c9719da5d47b92408f1222399c9c4acf3df9)), closes [#947](https://github.com/privacy-scaling-explorations/maci/issues/947) +* **topup:** check valid new state leaf balance ([ec12d2b](https://github.com/privacy-scaling-explorations/maci/commit/ec12d2b1ec31b0607f65be49a5679fcae5e3939d)) + + +### Code Refactoring + +* **contracts:** add natspec across contracts and cleanup ([a6ad25e](https://github.com/privacy-scaling-explorations/maci/commit/a6ad25e3787fee837172b95ee706951806131bd4)) +* **core:** cleanup the core package and ensure every function has a proper type ([f277e48](https://github.com/privacy-scaling-explorations/maci/commit/f277e48c040148f741e7a8cd8dbea9e6bf4ea1cc)) +* **core:** export `TestHarness` from core test utils ([f8d4ccb](https://github.com/privacy-scaling-explorations/maci/commit/f8d4ccb3b70c006bb4aa59d67e5528f7bbf91d8e)) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** refactor the process message functions and general cleanup ([823cacd](https://github.com/privacy-scaling-explorations/maci/commit/823cacd8659281b8390b74c8d765b23ee7a83a80)) +* **core:** remove redundant code which could slow down processing ([5a6fe98](https://github.com/privacy-scaling-explorations/maci/commit/5a6fe987a8e648abbcfd7ce2d768e216c19231a3)) +* **core:** remove unnecessary messageAq from Poll ([d3930f7](https://github.com/privacy-scaling-explorations/maci/commit/d3930f706963747903305cce1ee5a716ea28c31d)) +* **core:** remove unnecessary stateAq from MaciState ([22a4f28](https://github.com/privacy-scaling-explorations/maci/commit/22a4f286010ff5add413eee88d933c0e74898346)) +* **core:** update README.md ([11ba386](https://github.com/privacy-scaling-explorations/maci/commit/11ba386a37cc802c4fd6a3c243e493de8e04a339)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **maci-core:** refactor directory structure for quick core component access ([3aeba77](https://github.com/privacy-scaling-explorations/maci/commit/3aeba77435fbd783e5cecf88a1f2c0d4c58c8022)) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **optimisedmt:** remove dependency and implement locally ([c7d81e2](https://github.com/privacy-scaling-explorations/maci/commit/c7d81e20aaf6308c7d4e1efc09c497729f6a8f10)) +* **repo:** remove redundant code from certain packages ([d55497a](https://github.com/privacy-scaling-explorations/maci/commit/d55497a9805812b2d2472386caecf75995d6efcf)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **cli:** integrate linter ([49571a1](https://github.com/privacy-scaling-explorations/maci/commit/49571a1199a8a027c64a7c39bd21f46a3a268f43)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **core:** add `CircuitInputs` type ([c4b72b0](https://github.com/privacy-scaling-explorations/maci/commit/c4b72b0f0b25a1bb147348a728a9550c8b6460a1)) +* **core:** add quiet flag to process messages to log errors ([8793a09](https://github.com/privacy-scaling-explorations/maci/commit/8793a09dd3c52021d467b27e1cb64c023faba317)), closes [#1135](https://github.com/privacy-scaling-explorations/maci/issues/1135) +* **core:** add Typedoc comments ([a8521ee](https://github.com/privacy-scaling-explorations/maci/commit/a8521eea97bca47298bc2c59ae1c31df9533258b)) +* **core:** add unit tests for the process messages functions of the core package ([c78e1b4](https://github.com/privacy-scaling-explorations/maci/commit/c78e1b4c4a7acea9e18beef7291c8258b7b08c65)) +* **core:** integrate linter ([614e76b](https://github.com/privacy-scaling-explorations/maci/commit/614e76b1b1de5d2c9876b11f15439e92b86db8f6)) +* **core:** process messages test ([3db370e](https://github.com/privacy-scaling-explorations/maci/commit/3db370ef876213b1cefce39fb98b00640d9750e9)) +* **core:** publish a declaration file ([0b55568](https://github.com/privacy-scaling-explorations/maci/commit/0b55568ee41dc9191b342dab057feccd1745b5fd)) +* **core:** refactor and add tests for the core package ([4aedb83](https://github.com/privacy-scaling-explorations/maci/commit/4aedb83c917c0590f88a982a4b2eb910a2aab893)) +* **core:** remove unnecessary code ([5f6d6b5](https://github.com/privacy-scaling-explorations/maci/commit/5f6d6b507665c64a7f6b0c81b0fc2475bc073984)) +* **core:** replace repeated chaining call ([0588ef6](https://github.com/privacy-scaling-explorations/maci/commit/0588ef649420b850c9fe6f115dc5431016b741fb)) +* **coverage:** setup coverage for TS packages ([f4e6964](https://github.com/privacy-scaling-explorations/maci/commit/f4e6964b3e268e4d3f2819b85e6abf3e34bcb10e)) +* **crypto:** add type export for path elements ([35866fb](https://github.com/privacy-scaling-explorations/maci/commit/35866fb0f086b18835b74e5ecdb55aaceb3ef8db)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **domainobjs:** apply linter rules and fixes ([6649ca6](https://github.com/privacy-scaling-explorations/maci/commit/6649ca6d2afc83cfec60008fa6314add1cd837cd)) +* **intergationTests:** apply linter for intergration tests package ([ef75ec3](https://github.com/privacy-scaling-explorations/maci/commit/ef75ec37b2b4e000ad4b3fcdbdf85ba822690512)) +* **key-change:** add tests and docs around key-change ([ce394e2](https://github.com/privacy-scaling-explorations/maci/commit/ce394e2d2bf3c8c6748cf8e8d1e401b8f3c924ee)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **topup:** implement test cases for the topup feature ([7775a8b](https://github.com/privacy-scaling-explorations/maci/commit/7775a8b3295f29b098446d3e78a4200c03c847dd)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Miscellaneous diff --git a/core/package.json b/core/package.json index 1a24499a77..8d392fb878 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "maci-core", - "version": "1.1.2", + "version": "1.2.0", "description": "", "main": "build/ts/index.js", "types": "build/ts/index.d.ts", @@ -22,8 +22,8 @@ "typedoc": "typedoc --plugin typedoc-plugin-markdown --options ./typedoc.json" }, "dependencies": { - "maci-crypto": "^1.1.2", - "maci-domainobjs": "^1.1.2" + "maci-crypto": "^1.2.0", + "maci-domainobjs": "^1.2.0" }, "devDependencies": { "@types/chai": "^4.3.11", diff --git a/core/ts/Poll.ts b/core/ts/Poll.ts index a63aee8998..25217d9e5f 100644 --- a/core/ts/Poll.ts +++ b/core/ts/Poll.ts @@ -657,6 +657,14 @@ export class Poll implements IPoll { const newStateLeaf = this.stateLeaves[stateIndex].copy(); // update the voice credit balance newStateLeaf.voiceCreditBalance += amount; + + // we should not be in this state as it means we are dealing with very large numbers which will cause problems in the circuits + if (newStateLeaf.voiceCreditBalance > SNARK_FIELD_SIZE) { + throw new Error( + "State leaf voice credit balance exceeds SNARK_FIELD_SIZE. This should not be a state MACI should find itself in, as it will cause complications in the circuits. Rounds should not accept topups with large values.", + ); + } + // save it this.stateLeaves[stateIndex] = newStateLeaf; // update the state tree diff --git a/core/ts/__tests__/Poll.test.ts b/core/ts/__tests__/Poll.test.ts index 02908f50c2..629b4783b5 100644 --- a/core/ts/__tests__/Poll.test.ts +++ b/core/ts/__tests__/Poll.test.ts @@ -278,7 +278,7 @@ describe("Poll", function test() { poll.currentMessageBatchIndex = undefined; }); - it("shuold throw if the state has not been copied prior to calling processMessages", () => { + it("should throw if the state has not been copied prior to calling processMessages", () => { const tmpPoll = maciState.deployPoll( BigInt(Math.floor(Date.now() / 1000) + duration), maxValues, diff --git a/crypto/CHANGELOG.md b/crypto/CHANGELOG.md index 54bfe52f16..418029a311 100644 --- a/crypto/CHANGELOG.md +++ b/crypto/CHANGELOG.md @@ -3,6 +3,76 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) + + +### Bug Fixes + +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **cli:** remove files property from package.json ([5c544c6](https://github.com/privacy-scaling-explorations/maci/commit/5c544c62f071f7e9e2d613fe80c0bfda2a75e202)) +* **crypto:** get rid of potential prototype polution ([9b8a97c](https://github.com/privacy-scaling-explorations/maci/commit/9b8a97cc9661e0ee6f535cdcab19b4aa0fa98136)) +* **optimisedmt:** update d.ts file formatting and remove any types ([4fe4aea](https://github.com/privacy-scaling-explorations/maci/commit/4fe4aea403ece0418112defe2f9572939ee600cf)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* **publishing:** do not publish benchmarks folder ([f2fbc36](https://github.com/privacy-scaling-explorations/maci/commit/f2fbc368a8a9520288b365e6fdf04fd3fee9e685)) +* remove trailing chars ([3101a60](https://github.com/privacy-scaling-explorations/maci/commit/3101a6016ebda3385273b47b2de33f5fd9c1221f)) + + +### Code Refactoring + +* **crypto:** improve discoverability of the package by further separating classes and functions ([ed85bc5](https://github.com/privacy-scaling-explorations/maci/commit/ed85bc513336ac8e9d3dacbe98fd58fbaed31151)) +* **crypto:** modify genPrivKey to generate a random seed vs a babyjubjub compatible value ([0f1e9ba](https://github.com/privacy-scaling-explorations/maci/commit/0f1e9bad81a872e67a09e6912beb48784cc19a4b)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **optimisedmt:** remove dependency and implement locally ([c7d81e2](https://github.com/privacy-scaling-explorations/maci/commit/c7d81e20aaf6308c7d4e1efc09c497729f6a8f10)) +* **remove messageaqfactory:** remove messageAqFactory; remove redundant pollFactory dependency ([dcd1c67](https://github.com/privacy-scaling-explorations/maci/commit/dcd1c67f14f0cb92979d13e7887373ff6e354a6f)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **circuits:** refactor and add tests for the circom circuits ([4d6419b](https://github.com/privacy-scaling-explorations/maci/commit/4d6419b4962af6e94929721a3008406b6bc29c1e)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **coverage:** setup coverage for TS packages ([f4e6964](https://github.com/privacy-scaling-explorations/maci/commit/f4e6964b3e268e4d3f2819b85e6abf3e34bcb10e)) +* **crypto:** add type export for path elements ([35866fb](https://github.com/privacy-scaling-explorations/maci/commit/35866fb0f086b18835b74e5ecdb55aaceb3ef8db)) +* **crypto:** complete unit tests for the crypto package ([80bd832](https://github.com/privacy-scaling-explorations/maci/commit/80bd832e49613172ef2b3972986f6e85c768c963)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump @zk-kit/poseidon-cipher from 0.1.1 to 0.2.1 ([7fb1d67](https://github.com/privacy-scaling-explorations/maci/commit/7fb1d671d48d5dd364d39eff752ce0f2f9b67d26)) +* **deps:** bump ethers from 6.10.0 to 6.11.0 ([815696d](https://github.com/privacy-scaling-explorations/maci/commit/815696de4268c41e466ab6794215807a38906938)) +* **deps:** bump ethers from 6.11.0 to 6.11.1 ([a01f434](https://github.com/privacy-scaling-explorations/maci/commit/a01f434451a377447052518236a23ad3c9051d17)) +* **deps:** bump ethers from 6.9.2 to 6.10.0 ([dd8b4a0](https://github.com/privacy-scaling-explorations/maci/commit/dd8b4a048c013f28be175cc0db17fe5fc45d5976)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* rebased with the dev branch ([8165968](https://github.com/privacy-scaling-explorations/maci/commit/8165968fb18aa599a30c2f4ba48553cf65a16980)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Code Refactoring diff --git a/crypto/README.md b/crypto/README.md index 91fd971a84..90af7b8ee2 100644 --- a/crypto/README.md +++ b/crypto/README.md @@ -8,7 +8,7 @@ employs. ## AccQueue -AccQueue is an implementation of an Accumulator Queue. This is used to manage a queue of elements in merkle-tree like structure. This TypeScript class conforms with the smart contract impemented in _maci-contracts_ - AccQueue.sol. +AccQueue is an implementation of an Accumulator Queue. This is used to manage a queue of elements in merkle-tree like structure. This TypeScript class conforms with the smart contract implemented in _maci-contracts_ - AccQueue.sol. The main tree is divided into subtrees to allow for easier management. Each of the subtrees has its own root and leaves, with the depth being defined by the _subDepth_ property of the AccQueue class. When a new leaf is "enqued", this is actually added to the current subtree. If this is full, we calculate the root of the subtree and store it, while the new leaf is added to the next subtree. diff --git a/crypto/package.json b/crypto/package.json index f64f46511c..e67587c14e 100644 --- a/crypto/package.json +++ b/crypto/package.json @@ -1,6 +1,6 @@ { "name": "maci-crypto", - "version": "1.1.2", + "version": "1.2.0", "description": "A package containing cryptography utilities for MACI", "main": "build/ts/index.js", "files": [ diff --git a/crypto/ts/__tests__/Crypto.test.ts b/crypto/ts/__tests__/Crypto.test.ts index efaaee2d4c..81327db915 100644 --- a/crypto/ts/__tests__/Crypto.test.ts +++ b/crypto/ts/__tests__/Crypto.test.ts @@ -481,10 +481,6 @@ describe("Crypto", function test() { }); }); describe("genPrivKey", () => { - it("should generate a private key that is < SNARK_FIELD_SIZE", () => { - const sk = genPrivKey(); - expect(sk < SNARK_FIELD_SIZE).to.eq(true); - }); it("should generate a random private key", () => { const sk1 = genPrivKey(); const sk2 = genPrivKey(); @@ -538,9 +534,6 @@ describe("Crypto", function test() { expect(pk[0] < SNARK_FIELD_SIZE).to.eq(true); expect(pk[1] < SNARK_FIELD_SIZE).to.eq(true); }); - it("should throw when given a private key which is >= SNARK_FIELD_SIZE", () => { - expect(() => genPubKey(SNARK_FIELD_SIZE)).to.throw(); - }); }); describe("genKeypair", () => { it("should produce a public key which is < SNARK_FIELD_SIZE", () => { @@ -548,10 +541,6 @@ describe("Crypto", function test() { expect(pubKey[0] < SNARK_FIELD_SIZE).to.eq(true); expect(pubKey[1] < SNARK_FIELD_SIZE).to.eq(true); }); - it("should produce a private key which is < SNARK_FIELD_SIZE", () => { - const { privKey } = genKeypair(); - expect(BigInt(privKey) < SNARK_FIELD_SIZE).to.eq(true); - }); }); describe("genEcdhSharedKey", () => { it("should produce a shared key which is < SNARK_FIELD_SIZE", () => { diff --git a/crypto/ts/__tests__/IMT.test.ts b/crypto/ts/__tests__/IMT.test.ts index 89428f6ff8..00b1f3ed1b 100644 --- a/crypto/ts/__tests__/IMT.test.ts +++ b/crypto/ts/__tests__/IMT.test.ts @@ -53,7 +53,7 @@ describe("IMT comparison", () => { }); describe("genSubrootProof", () => { - it("should geneate a valid proof for a subtree", () => { + it("should generate a valid proof for a subtree", () => { const mt1 = new IncrementalQuinTree(5, 0n, 5, hash5); for (let i = 0; i < 100; i += 1) { diff --git a/crypto/ts/hashing.ts b/crypto/ts/hashing.ts index e695cf61e2..140a0453dd 100644 --- a/crypto/ts/hashing.ts +++ b/crypto/ts/hashing.ts @@ -59,7 +59,7 @@ export const poseidonT4 = (inputs: bigint[]): bigint => { /** * Hash up to 4 elements * @param inputs The elements to hash - * @retuns the hash of the elements + * @returns the hash of the elements */ export const poseidonT5 = (inputs: bigint[]): bigint => { assert(inputs.length === 4); diff --git a/crypto/ts/keys.ts b/crypto/ts/keys.ts index 6b7ffba220..7c6a867587 100644 --- a/crypto/ts/keys.ts +++ b/crypto/ts/keys.ts @@ -1,17 +1,16 @@ import { mulPointEscalar } from "@zk-kit/baby-jubjub"; import { derivePublicKey, deriveSecretScalar, packPublicKey, unpackPublicKey } from "@zk-kit/eddsa-poseidon"; -import assert from "assert"; +import { randomBytes } from "crypto"; import { genRandomBabyJubValue } from "./babyjub"; -import { SNARK_FIELD_SIZE } from "./constants"; import { EcdhSharedKey, Keypair, Point, PrivKey, PubKey } from "./types"; /** * Generate a private key - * @returns A BabyJub-compatible private key. + * @returns A random seed for a private key. */ -export const genPrivKey = (): bigint => genRandomBabyJubValue(); +export const genPrivKey = (): bigint => BigInt(`0x${randomBytes(32).toString("hex")}`); /** * Generate a random value @@ -50,9 +49,6 @@ export const unpackPubKey = (packed: bigint): PubKey => { * @returns A public key associated with the private key */ export const genPubKey = (privKey: PrivKey): PubKey => { - // Check whether privKey is a field element - assert(BigInt(privKey) < SNARK_FIELD_SIZE); - const key = derivePublicKey(privKey); return [BigInt(key[0]), BigInt(key[1])]; }; diff --git a/crypto/ts/quinTree.ts b/crypto/ts/quinTree.ts index 9004138e9d..e429453071 100644 --- a/crypto/ts/quinTree.ts +++ b/crypto/ts/quinTree.ts @@ -216,7 +216,7 @@ export class IncrementalQuinTree { /** * Verify a proof * @param proof The proof to verify - * @returns Wether the proof is valid + * @returns Whether the proof is valid */ verifyProof = (proof: IMerkleProof): boolean => { const { pathElements, leaf, root, pathIndices } = proof; diff --git a/domainobjs/CHANGELOG.md b/domainobjs/CHANGELOG.md index 11211dd00e..f39220868b 100644 --- a/domainobjs/CHANGELOG.md +++ b/domainobjs/CHANGELOG.md @@ -3,6 +3,64 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) + + +### Bug Fixes + +* **circuits:** enforce use of stateIndex from message ([510e6ee](https://github.com/privacy-scaling-explorations/maci/commit/510e6ee365958e8c7f72cfca6cea75d15a89d28b)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) + + +### Code Refactoring + +* **circuits:** fix ts types, improve docs ([a849486](https://github.com/privacy-scaling-explorations/maci/commit/a84948685d2e4be426cef50c5c608c107b5142b1)) +* **crypto:** modify genPrivKey to generate a random seed vs a babyjubjub compatible value ([0f1e9ba](https://github.com/privacy-scaling-explorations/maci/commit/0f1e9bad81a872e67a09e6912beb48784cc19a4b)) +* **crypto:** remove ffjavascript and implement utils functions locally ([0b2986f](https://github.com/privacy-scaling-explorations/maci/commit/0b2986fcaadbfce37ff9fc0007ddeae97573924e)), closes [#458](https://github.com/privacy-scaling-explorations/maci/issues/458) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **circuits:** refactor and add tests for the circom circuits ([4d6419b](https://github.com/privacy-scaling-explorations/maci/commit/4d6419b4962af6e94929721a3008406b6bc29c1e)) +* **cli:** optimize bundle size ([39268b2](https://github.com/privacy-scaling-explorations/maci/commit/39268b2ff8e0d27d062c6d3bc52a63ce8038ec5e)) +* **cli:** reorganize e2e tests and add more tests for cli commands ([6000227](https://github.com/privacy-scaling-explorations/maci/commit/6000227231bee3917686b64685c14ca329fcf38b)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **coverage:** setup coverage for TS packages ([f4e6964](https://github.com/privacy-scaling-explorations/maci/commit/f4e6964b3e268e4d3f2819b85e6abf3e34bcb10e)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **domainobjs:** apply linter rules and fixes ([6649ca6](https://github.com/privacy-scaling-explorations/maci/commit/6649ca6d2afc83cfec60008fa6314add1cd837cd)) +* **domainobjs:** implement unit tests for the domainobjs package ([c19d1d3](https://github.com/privacy-scaling-explorations/maci/commit/c19d1d3b6652d306e5ae7f4083eb20c4832c1233)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Miscellaneous diff --git a/domainobjs/package.json b/domainobjs/package.json index 60f3ce3593..991b3996fd 100644 --- a/domainobjs/package.json +++ b/domainobjs/package.json @@ -1,6 +1,6 @@ { "name": "maci-domainobjs", - "version": "1.1.2", + "version": "1.2.0", "description": "", "main": "build/ts/index.js", "files": [ @@ -25,7 +25,7 @@ "ts-mocha": "^10.0.0" }, "dependencies": { - "maci-crypto": "^1.1.2" + "maci-crypto": "^1.2.0" }, "nyc": { "reporter": [ diff --git a/domainobjs/ts/__tests__/privateKey.test.ts b/domainobjs/ts/__tests__/privateKey.test.ts index 5f905a1075..cff7f320fa 100644 --- a/domainobjs/ts/__tests__/privateKey.test.ts +++ b/domainobjs/ts/__tests__/privateKey.test.ts @@ -1,5 +1,5 @@ import { expect } from "chai"; -import { SNARK_FIELD_SIZE, genRandomBabyJubValue } from "maci-crypto"; +import { SNARK_FIELD_SIZE, genPrivKey } from "maci-crypto"; import { Keypair, PrivKey } from ".."; @@ -8,12 +8,12 @@ describe("privateKey", function test() { describe("constructor", () => { it("should create a private key", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); expect(k).to.not.eq(null); }); it("should create the same private key object for the same raw key", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k1 = new PrivKey(priv); const k2 = new PrivKey(priv); expect(k1.rawPrivKey.toString()).to.eq(k2.rawPrivKey.toString()); @@ -23,7 +23,7 @@ describe("privateKey", function test() { describe("serialization", () => { describe("serialize", () => { it("should serialize the private key", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const s = k.serialize(); expect(s.startsWith("macisk.")).to.eq(true); @@ -42,7 +42,7 @@ describe("privateKey", function test() { describe("deserialize", () => { it("should deserialize the private key", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const s = k.serialize(); const k2 = PrivKey.deserialize(s); @@ -52,7 +52,7 @@ describe("privateKey", function test() { describe("isValidSerializedPrivKey", () => { it("should return true for a valid serialized private key", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const s = k.serialize(); expect(PrivKey.isValidSerializedPrivKey(s)).to.eq(true); @@ -65,19 +65,19 @@ describe("privateKey", function test() { describe("toJSON", () => { it("should produce a JSON object", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const json = k.toJSON(); expect(json).to.not.eq(null); }); it("should produce a JSON object with the correct keys", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const json = k.toJSON(); expect(Object.keys(json)).to.deep.eq(["privKey"]); }); it("should preserve the data correctly", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const json = k.toJSON(); expect(k.serialize()).to.eq(json.privKey); @@ -86,7 +86,7 @@ describe("privateKey", function test() { describe("fromJSON", () => { it("should produce a PrivKey instance", () => { - const priv = genRandomBabyJubValue(); + const priv = genPrivKey(); const k = new PrivKey(priv); const json = k.toJSON(); const k2 = PrivKey.fromJSON(json); diff --git a/domainobjs/ts/__tests__/stateLeaf.test.ts b/domainobjs/ts/__tests__/stateLeaf.test.ts index 826b6e8250..6c8e2add74 100644 --- a/domainobjs/ts/__tests__/stateLeaf.test.ts +++ b/domainobjs/ts/__tests__/stateLeaf.test.ts @@ -86,7 +86,7 @@ describe("stateLeaf", () => { }); describe("toJSON", () => { - it("should produce an object with the correct properities", () => { + it("should produce an object with the correct properties", () => { const stateLeaf = new StateLeaf(pubKey, BigInt(123), BigInt(1231267)); const json = stateLeaf.toJSON(); diff --git a/domainobjs/ts/privateKey.ts b/domainobjs/ts/privateKey.ts index 1e6ea7a932..0c6ff4a3d1 100644 --- a/domainobjs/ts/privateKey.ts +++ b/domainobjs/ts/privateKey.ts @@ -1,4 +1,4 @@ -import { SNARK_FIELD_SIZE, formatPrivKeyForBabyJub, type PrivKey as RawPrivKey } from "maci-crypto"; +import { formatPrivKeyForBabyJub, type PrivKey as RawPrivKey } from "maci-crypto"; import type { IJsonPrivateKey } from "./types"; @@ -66,12 +66,7 @@ export class PrivKey { const correctPrefix = s.startsWith(SERIALIZED_PRIV_KEY_PREFIX); const x = s.slice(SERIALIZED_PRIV_KEY_PREFIX.length); - try { - const value = BigInt(`0x${x}`); - return correctPrefix && value < SNARK_FIELD_SIZE; - } catch { - return false; - } + return correctPrefix && x.length === 64; }; /** diff --git a/domainobjs/ts/publicKey.ts b/domainobjs/ts/publicKey.ts index 385894ed3f..1e609ce2ba 100644 --- a/domainobjs/ts/publicKey.ts +++ b/domainobjs/ts/publicKey.ts @@ -5,6 +5,7 @@ import assert from "assert"; import type { IJsonPublicKey, IG1ContractParams } from "./types"; export const SERIALIZED_PUB_KEY_PREFIX = "macipk."; + /** * @notice A class representing a public key * This is a MACI public key, which is not to be diff --git a/integrationTests/CHANGELOG.md b/integrationTests/CHANGELOG.md index 3ef8778e57..9cbf1ed427 100644 --- a/integrationTests/CHANGELOG.md +++ b/integrationTests/CHANGELOG.md @@ -3,6 +3,85 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* add interfaces and factory contracts with Natspec ([579a53f](https://github.com/privacy-scaling-explorations/maci/commit/579a53f1f9a501e95fbfb064d39272c57a9e4f21)) +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* **cli:** accept signer as parameter to cli commands ([b1802e7](https://github.com/privacy-scaling-explorations/maci/commit/b1802e79ac853aa796ba7078e994683b0db35061)) +* **cli:** improve cli integration ux ([7727ab1](https://github.com/privacy-scaling-explorations/maci/commit/7727ab1d99096b296d6c3f25956b0465d036aa4d)) +* optimize deployment and tally event ([185b407](https://github.com/privacy-scaling-explorations/maci/commit/185b407df6db0484824b99286a6b0e866a7345bf)) + + +### Bug Fixes + +* **fix integrationtests:** fix integrationTests caused by refactoring ([09ae37f](https://github.com/privacy-scaling-explorations/maci/commit/09ae37fd63db7ee75b977d33e67ded050ce7441d)) +* **integrationTests:** add auto mining option for hardhat ([fe336a2](https://github.com/privacy-scaling-explorations/maci/commit/fe336a269c62b3b8dc40b9c387ca1796759be49b)) +* **publish:** ensure we publish the correct files ([bc42724](https://github.com/privacy-scaling-explorations/maci/commit/bc42724b34cf0c047c5692fbf477ed013a102aee)) +* remove extra blank line ([41d0bb1](https://github.com/privacy-scaling-explorations/maci/commit/41d0bb198176047d699666cd427eae12d1eb1e75)) +* remove trailing chars ([3101a60](https://github.com/privacy-scaling-explorations/maci/commit/3101a6016ebda3385273b47b2de33f5fd9c1221f)) +* **tests:** remove wrong chai matcher from integrationTests ([33d1d4d](https://github.com/privacy-scaling-explorations/maci/commit/33d1d4d726594eed1a27f2ef851daf5f65a36c9e)) + + +### Code Refactoring + +* **cli:** use object args for cli commands ([41c4333](https://github.com/privacy-scaling-explorations/maci/commit/41c4333f8471b6a9ed616e5081dd99684b458b51)) +* **contracts:** refactor contracts code by removing dead code, and various optimizations ([7cbe5bd](https://github.com/privacy-scaling-explorations/maci/commit/7cbe5bd67dbfe98b46b485a75361a6cc3badb7ff)) +* **contracts:** remove maxValues and batchSizes from Maci.deployPoll() and instead calculate ([5393868](https://github.com/privacy-scaling-explorations/maci/commit/5393868efa270d9308e78c96e9bf6a7e8d63f3b6)), closes [#1066](https://github.com/privacy-scaling-explorations/maci/issues/1066) +* **core:** refactor the core package subsidy and tally functions ([0af7dd2](https://github.com/privacy-scaling-explorations/maci/commit/0af7dd2d448c4796c3872665d43654343f9fc3e3)) +* **core:** refactor the process message functions and general cleanup ([823cacd](https://github.com/privacy-scaling-explorations/maci/commit/823cacd8659281b8390b74c8d765b23ee7a83a80)) +* fix ESLint issues ([6c0ed97](https://github.com/privacy-scaling-explorations/maci/commit/6c0ed97c0976a81b5e5506699d550ec93a553cb8)) +* **nonqv:** optimize tally votes non qv circuit and contracts ([ea632a9](https://github.com/privacy-scaling-explorations/maci/commit/ea632a97862c4304c764f511ab480b3664224b5f)) +* **zk-kit-poseidon:** remove old circomlib dependencies in crypto ([0340f79](https://github.com/privacy-scaling-explorations/maci/commit/0340f7960a2214410d8885541ac542419a980a34)) + + +### Miscellaneous + +* add a badges to README.md ([888524b](https://github.com/privacy-scaling-explorations/maci/commit/888524baae82d56edbf0c794e587de174906c34c)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* apply prettier ([8b905c0](https://github.com/privacy-scaling-explorations/maci/commit/8b905c0948d4a1f950653c6812067ec98ebfcbc8)) +* bundle size optimizations ([18da49c](https://github.com/privacy-scaling-explorations/maci/commit/18da49c791e53350158659df8248d48af8e80f6d)) +* **changelog:** add CHANGELOG of v1.1.1 ([f0c315a](https://github.com/privacy-scaling-explorations/maci/commit/f0c315a4c1b86f88839f2dbe4c4b9f59193f7be4)) +* **cli:** integrate linter ([49571a1](https://github.com/privacy-scaling-explorations/maci/commit/49571a1199a8a027c64a7c39bd21f46a3a268f43)) +* **cli:** prepare cli package for web apps ([f706d9a](https://github.com/privacy-scaling-explorations/maci/commit/f706d9aa5689f58e646650d92b188f27e5beb4d8)) +* **cli:** reorganize e2e tests and add more tests for cli commands ([6000227](https://github.com/privacy-scaling-explorations/maci/commit/6000227231bee3917686b64685c14ca329fcf38b)) +* **cli:** support install for web apps ([3166cdd](https://github.com/privacy-scaling-explorations/maci/commit/3166cdd249450c36f069e0d9703980902339eb54)) +* **cli:** unify publish arg type ([50635dc](https://github.com/privacy-scaling-explorations/maci/commit/50635dc429f8784dde3815d91384c3d67eae8f85)) +* **contract:** add deploy tasks for maci ([8b58688](https://github.com/privacy-scaling-explorations/maci/commit/8b586889033c0703b6358ddda78753725b8d07c9)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @types/node from 18.19.6 to 20.10.8 ([6645120](https://github.com/privacy-scaling-explorations/maci/commit/664512038212d36d40799e8c4787847735bd7d82)) +* **deps-dev:** bump @types/node from 20.10.8 to 20.11.0 ([805d253](https://github.com/privacy-scaling-explorations/maci/commit/805d2536a54478c51403362419ecad0b6ab736a7)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump mocha from 10.2.0 to 10.3.0 ([2b76e04](https://github.com/privacy-scaling-explorations/maci/commit/2b76e0445f5da5864a335352f66eac33c070ab29)) +* **deps:** bump ethers from 6.10.0 to 6.11.0 ([815696d](https://github.com/privacy-scaling-explorations/maci/commit/815696de4268c41e466ab6794215807a38906938)) +* **deps:** bump ethers from 6.11.0 to 6.11.1 ([a01f434](https://github.com/privacy-scaling-explorations/maci/commit/a01f434451a377447052518236a23ad3c9051d17)) +* **deps:** bump ethers from 6.9.2 to 6.10.0 ([dd8b4a0](https://github.com/privacy-scaling-explorations/maci/commit/dd8b4a048c013f28be175cc0db17fe5fc45d5976)) +* **deps:** bump hardhat from 2.19.4 to 2.19.5 ([40ab10d](https://github.com/privacy-scaling-explorations/maci/commit/40ab10defff0a538aefa81d67fd6ce04b69f5eb6)) +* **deps:** bump hardhat from 2.19.5 to 2.20.1 ([68543a6](https://github.com/privacy-scaling-explorations/maci/commit/68543a6886b2836c42fd18b77f9e98f322fb971e)) +* **integration:** ensure integration tests are using the correct user keys ([5b6aa92](https://github.com/privacy-scaling-explorations/maci/commit/5b6aa9255907cd0e02f692ad7d8487f9bd9a70f3)) +* **intergationTests:** apply linter for intergration tests package ([ef75ec3](https://github.com/privacy-scaling-explorations/maci/commit/ef75ec37b2b4e000ad4b3fcdbdf85ba822690512)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* linter unification ([61a8bcd](https://github.com/privacy-scaling-explorations/maci/commit/61a8bcd915fd3e4b4da3c00d40704d892c02f51b)) +* **poll:** unify pollId type ([21d01ef](https://github.com/privacy-scaling-explorations/maci/commit/21d01efc565df74ea8b71dfeeead60be5a07db56)) +* **publishing:** remove bash script for empty ballot roots contract ([025287c](https://github.com/privacy-scaling-explorations/maci/commit/025287c778547e0acb1582532f3412e022cca6fa)) +* **release:** publish 1.1.2 ([10b3a85](https://github.com/privacy-scaling-explorations/maci/commit/10b3a85cc9b53c0fc1ccdf54221a48ec8d6efe0d)) +* remove `gitHead` field from package.json ([d38ba71](https://github.com/privacy-scaling-explorations/maci/commit/d38ba71301469f350b3d80eab5bf94e779dda9cc)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **testing:** revisit testing docs and add more in detail info ([183c1d8](https://github.com/privacy-scaling-explorations/maci/commit/183c1d8361bdf3a192a212ef610ae7855c96c587)) +* **website:** apply linter for website and remove unused packages ([1a3b343](https://github.com/privacy-scaling-explorations/maci/commit/1a3b343948f9f48ed4948a5ade63b4b55645f4ab)) + + + ## [1.1.2](https://github.com/gurrpi/maci/compare/v1.1.1...v1.1.2) (2023-01-19) ### Miscellaneous diff --git a/integrationTests/package.json b/integrationTests/package.json index 33e7e737d7..b914ec9677 100644 --- a/integrationTests/package.json +++ b/integrationTests/package.json @@ -1,6 +1,6 @@ { "name": "maci-integrationtests", - "version": "1.1.2", + "version": "1.2.0", "description": "", "main": "build/ts/index.js", "files": [ @@ -33,11 +33,11 @@ "dependencies": { "@nomicfoundation/hardhat-toolbox": "^4.0.0", "ethers": "^6.11.1", - "maci-circuits": "^1.1.2", - "maci-cli": "^1.1.2", - "maci-contracts": "^1.1.2", - "maci-core": "^1.1.2", - "maci-crypto": "^1.1.2", - "maci-domainobjs": "^1.1.2" + "maci-circuits": "^1.2.0", + "maci-cli": "^1.2.0", + "maci-contracts": "^1.2.0", + "maci-core": "^1.2.0", + "maci-crypto": "^1.2.0", + "maci-domainobjs": "^1.2.0" } } diff --git a/lerna.json b/lerna.json index 404e5d4792..7a03442d65 100644 --- a/lerna.json +++ b/lerna.json @@ -10,7 +10,7 @@ "website", "subgraph" ], - "version": "1.1.2", + "version": "1.2.0", "npmClient": "pnpm", "changelogPreset": { "name": "conventionalcommits", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 100469196f..57e69be9ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,13 +102,13 @@ importers: specifier: ^2.0.5 version: 2.0.5 maci-core: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../core maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto maci-domainobjs: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../domainobjs snarkjs: specifier: ^0.7.3 @@ -166,19 +166,19 @@ importers: specifier: ^2.20.1 version: 2.20.1(ts-node@10.9.2)(typescript@5.3.3) maci-circuits: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../circuits maci-contracts: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../contracts maci-core: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../core maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto maci-domainobjs: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../domainobjs prompt: specifier: ^1.3.0 @@ -242,16 +242,16 @@ importers: specifier: ^2.20.1 version: 2.20.1(ts-node@10.9.2)(typescript@5.3.3) maci-circuits: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../circuits maci-core: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../core maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto maci-domainobjs: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../domainobjs solidity-docgen: specifier: ^0.6.0-beta.36 @@ -300,10 +300,10 @@ importers: core: dependencies: maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto maci-domainobjs: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../domainobjs devDependencies: '@types/chai': @@ -383,7 +383,7 @@ importers: domainobjs: dependencies: maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto devDependencies: '@types/chai': @@ -417,22 +417,22 @@ importers: specifier: ^6.11.1 version: 6.11.1 maci-circuits: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../circuits maci-cli: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../cli maci-contracts: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../contracts maci-core: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../core maci-crypto: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../crypto maci-domainobjs: - specifier: ^1.1.2 + specifier: ^1.2.0 version: link:../domainobjs devDependencies: '@types/chai': diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md new file mode 100644 index 0000000000..42859da88a --- /dev/null +++ b/website/CHANGELOG.md @@ -0,0 +1,140 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.2.0](https://github.com/privacy-scaling-explorations/maci/compare/v1.1.1...v1.2.0) (2024-02-23) + + +### Features + +* add favicon ([4baefd6](https://github.com/privacy-scaling-explorations/maci/commit/4baefd6f4c5ebda3168dd3a2565535fd878a85f1)) +* add hero image opacity ([4408bc0](https://github.com/privacy-scaling-explorations/maci/commit/4408bc072817b15d046a75670f3d90173bbd69cc)) +* add homepage metadata ([be1ae0d](https://github.com/privacy-scaling-explorations/maci/commit/be1ae0d38627cbe0c88785355b901578d2b8e58d)) +* add info disclaimer to roadmap ([dc1f210](https://github.com/privacy-scaling-explorations/maci/commit/dc1f2104ef011b81b4583a904fd98550e594f515)) +* add info disclaimer to spec ([6a7bdeb](https://github.com/privacy-scaling-explorations/maci/commit/6a7bdeb3b2982d13fb3b0022afea9dfaec0ed920)) +* add roadmap webpage ([c849237](https://github.com/privacy-scaling-explorations/maci/commit/c84923751f2b9a1ff6adb1bfc0dc23d7a5bb6aa4)) +* add tech stack page [[#851](https://github.com/privacy-scaling-explorations/maci/issues/851)] ([d27b229](https://github.com/privacy-scaling-explorations/maci/commit/d27b229e2a644bc90c0500fde9a586e565c1a079)) +* add tech stack page [[#851](https://github.com/privacy-scaling-explorations/maci/issues/851)] ([c581be9](https://github.com/privacy-scaling-explorations/maci/commit/c581be961d10c65b0722650fec1b782e473243e8)) +* add versioning info [Fixes [#807](https://github.com/privacy-scaling-explorations/maci/issues/807)] ([518ffe8](https://github.com/privacy-scaling-explorations/maci/commit/518ffe8225387843c3cba3e23b35b3fc8f83e38f)) +* build typedoc for website ([bd75ea4](https://github.com/privacy-scaling-explorations/maci/commit/bd75ea4a8aa7346ac2fcd5797527923c2038f66c)) +* **circuits:** remove zkey-manager in favour of circomkit ([d79e9c0](https://github.com/privacy-scaling-explorations/maci/commit/d79e9c0ee18df27c3bd3e5e49924db21303d1c45)) +* **cli:** add seed param for generate keypair command ([29d7b20](https://github.com/privacy-scaling-explorations/maci/commit/29d7b2057741012811622c30f91cda74cf4906eb)) +* **cli:** improve cli integration ux ([7727ab1](https://github.com/privacy-scaling-explorations/maci/commit/7727ab1d99096b296d6c3f25956b0465d036aa4d)) +* make image zoomable by adding package ([ee34a25](https://github.com/privacy-scaling-explorations/maci/commit/ee34a253521efe79f308456080fcbbf79e7484ab)) +* optimize deployment and tally event ([185b407](https://github.com/privacy-scaling-explorations/maci/commit/185b407df6db0484824b99286a6b0e866a7345bf)) +* specify we use SemVer ([078ccf6](https://github.com/privacy-scaling-explorations/maci/commit/078ccf6fd02671527593ea43efb4f9960eead755)) +* update features on homepage ([9e930a8](https://github.com/privacy-scaling-explorations/maci/commit/9e930a840209986ea76ac8f4bcfc0bf335707975)) +* update fonts ([2d8efdb](https://github.com/privacy-scaling-explorations/maci/commit/2d8efdbcb823b122a17ef5e9c750370c03c12236)) +* update meta image ([bd4a330](https://github.com/privacy-scaling-explorations/maci/commit/bd4a3308b2601f61fdb5f5de8f57865293df4077)) +* update sidebar ([6206a1b](https://github.com/privacy-scaling-explorations/maci/commit/6206a1b8849108d78997e00b01c6e7f11efce124)) +* update ui ([6571b1e](https://github.com/privacy-scaling-explorations/maci/commit/6571b1e08b389aec92411da13269b23a0dc3b67b)) +* update ui ([f62398e](https://github.com/privacy-scaling-explorations/maci/commit/f62398e0b9a35aa6e2f4ea198c21e7383d5675cc)) + + +### Bug Fixes + +* **cli:** add a check that the subsidy verifying key was set correctly on chain ([6bda14d](https://github.com/privacy-scaling-explorations/maci/commit/6bda14dd7021846a639ce8cffef3a863eda2b447)), closes [#446](https://github.com/privacy-scaling-explorations/maci/issues/446) +* dark mode search result ([632b465](https://github.com/privacy-scaling-explorations/maci/commit/632b46587a2973b6898bc720af836e4777a1a0f0)) +* footer link hover ([5fef6b3](https://github.com/privacy-scaling-explorations/maci/commit/5fef6b30199f6b47ca2fa72c5b052d13bdbc4ac7)) +* header for Pre-Compiled Artifacts for testing ([967a8e0](https://github.com/privacy-scaling-explorations/maci/commit/967a8e056f4248ddf25da782318b13d7a618d0d4)) +* homepage header ([cde43cf](https://github.com/privacy-scaling-explorations/maci/commit/cde43cfc4460d01371a3637e58f5a96b27f99bb6)) +* internal doc links ([c906a94](https://github.com/privacy-scaling-explorations/maci/commit/c906a94b5e201e6102795c0881058f74699cc629)) +* re-add blog image ([7822c9c](https://github.com/privacy-scaling-explorations/maci/commit/7822c9c2298edc9dbe97084bf182a9d12aaaf868)) +* remove HackMD TOC ([7554524](https://github.com/privacy-scaling-explorations/maci/commit/755452414b85c78ff52e5b2ea3b14123a5748602)) +* remove trailing chars ([3101a60](https://github.com/privacy-scaling-explorations/maci/commit/3101a6016ebda3385273b47b2de33f5fd9c1221f)) +* remove trailing chars ([101fdaf](https://github.com/privacy-scaling-explorations/maci/commit/101fdafe3c094b3615b651b8ff33337f338d2178)) +* **topup:** check valid new state leaf balance ([ec12d2b](https://github.com/privacy-scaling-explorations/maci/commit/ec12d2b1ec31b0607f65be49a5679fcae5e3939d)) +* update broken links ([4f689d5](https://github.com/privacy-scaling-explorations/maci/commit/4f689d581fd5e3aa120adb327706a0a0d27ec996)) +* update GH repo links to v1.1.1 tag ([8474267](https://github.com/privacy-scaling-explorations/maci/commit/847426712b202839762061fff2beabcdfc314119)) +* update to singular "in detail" ([d352781](https://github.com/privacy-scaling-explorations/maci/commit/d352781fa6dbc117dbc036720fa536fc7247a93c)) + + +### Code Refactoring + +* **circuits:** fix ts types, improve docs ([a849486](https://github.com/privacy-scaling-explorations/maci/commit/a84948685d2e4be426cef50c5c608c107b5142b1)) +* **contracts:** add natspec across contracts and cleanup ([a6ad25e](https://github.com/privacy-scaling-explorations/maci/commit/a6ad25e3787fee837172b95ee706951806131bd4)) +* **contracts:** optimize code by using immutable variables are removing redundant code ([d39d384](https://github.com/privacy-scaling-explorations/maci/commit/d39d3844690749b396ba66226224789b19af522d)) +* **contracts:** refactor contracts code by removing dead code, and various optimizations ([7cbe5bd](https://github.com/privacy-scaling-explorations/maci/commit/7cbe5bd67dbfe98b46b485a75361a6cc3badb7ff)) + + +### Miscellaneous + +* add contributing docs ([d5ca0cd](https://github.com/privacy-scaling-explorations/maci/commit/d5ca0cd81c88607779f7ed73f07087a71e1a4de5)) +* add description to updateMentionFiles function, add typedoc/ in website/.gitignore ([1f7a509](https://github.com/privacy-scaling-explorations/maci/commit/1f7a509d85dc44f1fad0c7a96e37001143d75899)) +* add maci 1.0 spec ([87aa8f8](https://github.com/privacy-scaling-explorations/maci/commit/87aa8f80061fec243bccf83299db1b45dc22219b)) +* add programming language links ([7e850a0](https://github.com/privacy-scaling-explorations/maci/commit/7e850a00ace0be010f8206574c3feb7372fb689b)) +* add roadmap blog post ([3a0c732](https://github.com/privacy-scaling-explorations/maci/commit/3a0c7321ed4d884f28354ba248fff6933e0e94b0)) +* add types check ([69f038f](https://github.com/privacy-scaling-explorations/maci/commit/69f038f55e6c740d43b8b5376db999bcf92de845)) +* **blog-post:** fixed header in v1.0 release post ([06590ca](https://github.com/privacy-scaling-explorations/maci/commit/06590ca5dd80e9336a60bd65092db84020950230)) +* bump docusaurus packages ([00f5e38](https://github.com/privacy-scaling-explorations/maci/commit/00f5e38d892f6323edb3df6c430438763252a11c)) +* bump homepage copy font size ([4692832](https://github.com/privacy-scaling-explorations/maci/commit/4692832ff1d3cf8ae33b87116bb156a471b22fd8)) +* bump position of troublshooting page ([04440d7](https://github.com/privacy-scaling-explorations/maci/commit/04440d77847e9c0d44d66e122b894759621ef08c)) +* **circuits:** fix wrong circuit param description ([0ede225](https://github.com/privacy-scaling-explorations/maci/commit/0ede2250defefeb7064e944ba691c5cf8913f175)) +* clean up README ([e323734](https://github.com/privacy-scaling-explorations/maci/commit/e323734a168270f3dcb7ec3e0019cc75f5ef62ae)) +* **cli:** change maci-cli script run instructions ([c51c34d](https://github.com/privacy-scaling-explorations/maci/commit/c51c34dc915721770474ad3555853ce1264aea07)) +* **cli:** clarify cli commands ([3aa4f33](https://github.com/privacy-scaling-explorations/maci/commit/3aa4f33aa7f4558f16da65b5a3fb93b282bd4fe5)) +* **cli:** update cli docs to reflect latest changes ([ca1a1eb](https://github.com/privacy-scaling-explorations/maci/commit/ca1a1eb86464fcc76fdaa9811070277a91748704)) +* comment out new font-family ([d0624ef](https://github.com/privacy-scaling-explorations/maci/commit/d0624ef27cf9eb636e8dd08ac121dd9acb531af5)) +* **contract:** apply linter for deploy scripts and contracts ([9af9c04](https://github.com/privacy-scaling-explorations/maci/commit/9af9c0497a2491eaf89fbff475cf0f60bc04f59c)) +* **contract:** improve the content of the index.md file used as TOC for NatSpec docs ([017e1f8](https://github.com/privacy-scaling-explorations/maci/commit/017e1f8ee5cee77b77f269ace4e176322c329b7d)) +* cut down /roadmap length ([5815208](https://github.com/privacy-scaling-explorations/maci/commit/5815208158143b42ba2083786cfdad5502cd80b2)) +* **dependencies:** update project dependencies and remove redundant ones ([4c5ac27](https://github.com/privacy-scaling-explorations/maci/commit/4c5ac27767492c9867a6e2ab2acd6b10fe132847)) +* **deps-dev:** bump @docusaurus/module-type-aliases ([ee4314d](https://github.com/privacy-scaling-explorations/maci/commit/ee4314d224cabdf620e2dd2e9d6deeae867e12f9)) +* **deps-dev:** bump @docusaurus/module-type-aliases ([64aaad6](https://github.com/privacy-scaling-explorations/maci/commit/64aaad6734e3e235b84a66ca15bfee0d917e12ae)) +* **deps-dev:** bump @docusaurus/tsconfig from 3.1.0 to 3.1.1 ([1d86718](https://github.com/privacy-scaling-explorations/maci/commit/1d867180f7a461a024458da43f0bf11df70a706c)) +* **deps-dev:** bump @docusaurus/types from 3.0.0 to 3.1.0 ([2de823f](https://github.com/privacy-scaling-explorations/maci/commit/2de823fd5f480a4f0cbf7028ffd19b59cc007ade)) +* **deps-dev:** bump @types/node from 20.11.0 to 20.11.2 ([45839e8](https://github.com/privacy-scaling-explorations/maci/commit/45839e8c2668ec56ea06221758605f88029ea8a1)) +* **deps-dev:** bump @types/node from 20.11.10 to 20.11.16 ([8144919](https://github.com/privacy-scaling-explorations/maci/commit/8144919939f7d9a841eb6fce7182628cedbf8746)) +* **deps-dev:** bump @types/node from 20.11.16 to 20.11.17 ([44de5db](https://github.com/privacy-scaling-explorations/maci/commit/44de5db0c25a5fdfd5c13c397f49edb7185bf1f5)) +* **deps-dev:** bump @types/node from 20.11.17 to 20.11.19 ([8d86b32](https://github.com/privacy-scaling-explorations/maci/commit/8d86b32ef70b89f4239aad3903fd36937cf6a90f)) +* **deps-dev:** bump @types/node from 20.11.2 to 20.11.5 ([7698ede](https://github.com/privacy-scaling-explorations/maci/commit/7698edef2b95bc017e54c1fc0d796ccc9da3de85)) +* **deps-dev:** bump @types/node from 20.11.5 to 20.11.10 ([a2c445a](https://github.com/privacy-scaling-explorations/maci/commit/a2c445a295e792e421f6c1537b2b21f8a7648683)) +* **deps-dev:** bump lerna from 6.6.2 to 8.0.2 ([4b150ad](https://github.com/privacy-scaling-explorations/maci/commit/4b150ade7c4fbaf88eb0e1f629cec6749377706d)) +* **deps-dev:** bump typescript from 5.2.2 to 5.3.3 ([4ec399d](https://github.com/privacy-scaling-explorations/maci/commit/4ec399dd6e984c12ebd24d0b20c14c1104872500)) +* **deps:** bump @docusaurus/preset-classic from 3.1.0 to 3.1.1 ([35e1954](https://github.com/privacy-scaling-explorations/maci/commit/35e1954b810e4185d2f370b51efed4273ee7811b)) +* **deps:** bump @docusaurus/theme-classic from 3.0.0 to 3.1.0 ([9ff0c26](https://github.com/privacy-scaling-explorations/maci/commit/9ff0c26904ede3dfea76652d7072369e583d5175)) +* **deps:** bump @docusaurus/theme-classic from 3.1.0 to 3.1.1 ([049bb10](https://github.com/privacy-scaling-explorations/maci/commit/049bb103a0f2cc288dbff29ccf64768dedb7705a)) +* **deps:** bump @easyops-cn/docusaurus-search-local ([ae6cd48](https://github.com/privacy-scaling-explorations/maci/commit/ae6cd489d55634b8415ade080ec73abbc9d747a1)) +* **deps:** bump @mdx-js/react from 3.0.0 to 3.0.1 ([69990ab](https://github.com/privacy-scaling-explorations/maci/commit/69990abe87f21f85d643fa7bf649a1486903928c)) +* **deps:** bump clsx from 1.2.1 to 2.1.0 ([6e625b3](https://github.com/privacy-scaling-explorations/maci/commit/6e625b3c67a1899d73aa5dc23a3b4d8d0e91f316)) +* **deps:** bump docusaurus-plugin-image-zoom from 1.0.1 to 2.0.0 ([2fa993c](https://github.com/privacy-scaling-explorations/maci/commit/2fa993c86a56cd97b8700fc8c6aca3a20598cfb0)) +* enable codeql and workflows cleanup ([37a735c](https://github.com/privacy-scaling-explorations/maci/commit/37a735c349eeb1f7fc13fd8930041967a4813b11)) +* fix grammar ([075ce47](https://github.com/privacy-scaling-explorations/maci/commit/075ce47011209271cf9ab4b64ec2ba36409ec26a)) +* fix typo ([60f66ad](https://github.com/privacy-scaling-explorations/maci/commit/60f66ad70f698ebe3ce18e7907889929076fbbc2)) +* fix typos and remove redundant introductions ([99d1e91](https://github.com/privacy-scaling-explorations/maci/commit/99d1e9174d38192f8b525fd0aeae1f87a72de560)) +* fix word repetition ([92d7174](https://github.com/privacy-scaling-explorations/maci/commit/92d717496bc94d23d1d631e637a7fff1756d2352)) +* **integration:** clarify integraration docs ([09edffd](https://github.com/privacy-scaling-explorations/maci/commit/09edffd7e6c2f58c1242dd92fb0bbd681444b937)) +* keep footer links consistent on hover ([35da4c9](https://github.com/privacy-scaling-explorations/maci/commit/35da4c941d17a4c53f51e3ebac862785a0279c6c)) +* **key-change:** add tests and docs around key-change ([ce394e2](https://github.com/privacy-scaling-explorations/maci/commit/ce394e2d2bf3c8c6748cf8e8d1e401b8f3c924ee)) +* linter ([42ea4f0](https://github.com/privacy-scaling-explorations/maci/commit/42ea4f0ae8b342f6bd5ca5ac86f1bdd143978324)) +* minor updates to roadmap page ([6a8ada8](https://github.com/privacy-scaling-explorations/maci/commit/6a8ada85a2a9486926bd8dbbb56e33f476b5d8de)) +* **non-qv:** update docs to reflect the integration of non-quadratic voting ([35ff781](https://github.com/privacy-scaling-explorations/maci/commit/35ff7818dc62152a0b2d7449bebc8990dae7f0d4)) +* remove 2023 section ([38a9507](https://github.com/privacy-scaling-explorations/maci/commit/38a9507500a4d9e6e9d72c01e734136053b1880c)) +* remove placeholder post ([71fd332](https://github.com/privacy-scaling-explorations/maci/commit/71fd332e5844797feda1ed734273cfa4a5fbd4d2)) +* remove QFI ([db1d931](https://github.com/privacy-scaling-explorations/maci/commit/db1d931062bd1ce5305eeb850608533565bcad7c)) +* remove resource requirements ([62f9b89](https://github.com/privacy-scaling-explorations/maci/commit/62f9b89c772e1f46e53f271b8a36e92f54d92014)) +* remove TOC line ([83d8d56](https://github.com/privacy-scaling-explorations/maci/commit/83d8d56d712864d62afe3cc93b964f52398e7f7e)) +* rename file to testing-in-detail ([cf7fdf9](https://github.com/privacy-scaling-explorations/maci/commit/cf7fdf9d528358ebceb50fce0281f1b4d1bd4fa5)) +* rename page to "Overview" ([5c98942](https://github.com/privacy-scaling-explorations/maci/commit/5c989424842fcabd5d3ae54ce0d4a3035a63789d)) +* **repo:** rebase master into dev and amend CI ([0d7b99c](https://github.com/privacy-scaling-explorations/maci/commit/0d7b99c00cde64a7f49b92fcd3b9e3ff1320e29b)) +* run prettier ([d09cd0e](https://github.com/privacy-scaling-explorations/maci/commit/d09cd0e01ac747245307ceec5343d9ed30d7a6f0)) +* run prettier fix after bumping version ([e1f85a5](https://github.com/privacy-scaling-explorations/maci/commit/e1f85a53bbb72696b6998af5406748fd18df4701)) +* **testing:** revisit testing docs and add more in detail info ([183c1d8](https://github.com/privacy-scaling-explorations/maci/commit/183c1d8361bdf3a192a212ef610ae7855c96c587)) +* tweak secure feature copy ([e259bef](https://github.com/privacy-scaling-explorations/maci/commit/e259befbbbd75296b4800bea85fd789659347e29)) +* update /release page to /versioning ([7e662fc](https://github.com/privacy-scaling-explorations/maci/commit/7e662fc843b6fd6beacd3af4e27e90010c797b83)) +* update blog slugs to kebab case ([afa6329](https://github.com/privacy-scaling-explorations/maci/commit/afa632940b8504ab8a42da3f852a19789522c8d6)) +* update blog slugs to kebab case ([ad914a1](https://github.com/privacy-scaling-explorations/maci/commit/ad914a124d02d08a1d8e7ba86d3b4b192824c0ad)) +* update docs ([d33e7e6](https://github.com/privacy-scaling-explorations/maci/commit/d33e7e6bc833907bec1d5575ec4f46656011028c)) +* update headers for testing page ([dd99e55](https://github.com/privacy-scaling-explorations/maci/commit/dd99e55dcdacfb4b69c21b938736897bd8e9cc3e)) +* update homepage copy ([2f2439b](https://github.com/privacy-scaling-explorations/maci/commit/2f2439baa7087add03b28b37bf0ca18091395b38)) +* update into page ([38752b9](https://github.com/privacy-scaling-explorations/maci/commit/38752b991415da12043d2c4140838b8abf8d88f4)) +* update missing docusaurus deps ([a3a1fbf](https://github.com/privacy-scaling-explorations/maci/commit/a3a1fbfab0c9d410e8d13f64bce3dec820c6a406)) +* update overview page ([f1682b2](https://github.com/privacy-scaling-explorations/maci/commit/f1682b2a0abc50941fceb5af6df64de221fb156a)) +* update QF site links ([6120d89](https://github.com/privacy-scaling-explorations/maci/commit/6120d89e94bbea732e306aacac972d9e2907e77d)) +* update sidebar_position of docs ([93a6faf](https://github.com/privacy-scaling-explorations/maci/commit/93a6fafdd7e483937a55d16e6cc99dd6e8aae4a2)) +* update sidebar_position of docs ([63be592](https://github.com/privacy-scaling-explorations/maci/commit/63be5928ee47dc53af9326516deabb5d8639d905)) +* update testing header ([688225c](https://github.com/privacy-scaling-explorations/maci/commit/688225c0a5d783fa8b585578e4ca0662e4ad1bd1)) +* update the favicon file ([1056fe7](https://github.com/privacy-scaling-explorations/maci/commit/1056fe74f7dd265e7125c8031897980b83148816)) +* **website/versioned_docs/version-v1.x:** typo fix ([#893](https://github.com/privacy-scaling-explorations/maci/issues/893)) ([c90466c](https://github.com/privacy-scaling-explorations/maci/commit/c90466c1cac756fc3aa711874cd7d63d1b8ada73)) +* **website:** apply linter for website and remove unused packages ([1a3b343](https://github.com/privacy-scaling-explorations/maci/commit/1a3b343948f9f48ed4948a5ade63b4b55645f4ab)) diff --git a/website/blog/2021-10-12-maci-v1.md b/website/blog/2021-10-12-maci-v1.md index 92e6a41083..4c896e91f6 100644 --- a/website/blog/2021-10-12-maci-v1.md +++ b/website/blog/2021-10-12-maci-v1.md @@ -47,7 +47,7 @@ Finally, in early 2021 we were very fortunate to bring on Cory Dickson to the te It is very difficult for naive voting systems, particularly those which are integrated into smart contract platforms, to prevent collusion. For instance, if a simple Ethereum transaction represents a vote, a briber can easily examine its calldata, tell how its sender voted, and reward or punish them accordingly. -More broadly, collusion resistance is particulary important for cryptoeconomic systems. Vitalik Buterin describes the motivations behind MACI in On Collusion. He argues that systems that use cryptoeconomic incentive mechanisms to align participants’ behaviour can be vulnerable to collusion attacks, such as bribery. In another post, he elaborates: +More broadly, collusion resistance is particularly important for cryptoeconomic systems. Vitalik Buterin describes the motivations behind MACI in On Collusion. He argues that systems that use cryptoeconomic incentive mechanisms to align participants’ behaviour can be vulnerable to collusion attacks, such as bribery. In another post, he elaborates: if you can prove how you voted, selling your vote becomes very easy. Provability of votes would also enable forms of coercion where the coercer demands to see some kind of proof of voting for their preferred candidate. @@ -61,7 +61,7 @@ Finally, MACI is important because as crypto communities are increasingly adopti ## What’s new? -In this release, we rearchitected MACI’s smart contracts to allow for greater flexiblity and separation of concerns. In particular, we support multiple polls within a single instance of MACI. This allows the coordinator to run and tally many elections either subsequently or concurrently. +In this release, we rearchitected MACI’s smart contracts to allow for greater flexibility and separation of concerns. In particular, we support multiple polls within a single instance of MACI. This allows the coordinator to run and tally many elections either subsequently or concurrently. We’ve kept the ability for developers to provide their own set of logic to gate-keep signups. For instance, application developers can write custom logic that only allows addresses which own a certain token to sign up once to MACI in order to participate in polls. diff --git a/website/blog/2023-01-18-maci-v1.1.1.md b/website/blog/2023-01-18-maci-v1.1.1.md index f4c4035e21..06a444adf8 100644 --- a/website/blog/2023-01-18-maci-v1.1.1.md +++ b/website/blog/2023-01-18-maci-v1.1.1.md @@ -58,7 +58,7 @@ All of these issues have been successfully resolved, on top of fixing minor issu ### Top Up Credit -Rather than requring a user to sign up multiple times, it is now possible to top up voice credits by sending a top up message on the Poll contract. Withdrawals are not enabled as this would allow a malicious user to bribe others offline to transfer their keys. +Rather than requiring a user to sign up multiple times, it is now possible to top up voice credits by sending a top up message on the Poll contract. Withdrawals are not enabled as this would allow a malicious user to bribe others offline to transfer their keys. Now, the Poll contract will hold all the funds deposited from users for the current poll. At the end of a poll, the coordinator can transfer the funds to a hardcoded address which can be used to fund public goods. @@ -74,7 +74,7 @@ Pairwise subsidy is a new way to reduce collusion in quadratic funding applicati In this [post](https://ethresear.ch/t/pairwise-coordination-subsidies-a-new-quadratic-funding-design/5553), Vitalik introduced this kind of collusion and also proposed a protocol to penalize this behavior. As a generalized solution, the more correlation between contributions, the smaller subsidy should be allocated to this project, as this reduces the risk of collusion between contributors. It should be noted that this solution assumes that an identity system is in place to prevent the same entity from registering with two different identities. -Please refer to this [post](https://hackmd.io/@chaosma/H1_9xmT2K) for a more detailed explaination of the implementation. +Please refer to this [post](https://hackmd.io/@chaosma/H1_9xmT2K) for a more detailed explanation of the implementation. Finally, please note that currently it is not possible to generate the `zkeys` for the subsidy circuit with with the `vote options` parameter larger than $5^2$. This issue is documented [here](https://github.com/privacy-scaling-explorations/maci/issues/584) and the team will focus on finding a solution to be able to support larger vote options. @@ -82,7 +82,7 @@ Finally, please note that currently it is not possible to generate the `zkeys` f MACI now includes a sample [coordinator service](https://github.com/privacy-scaling-explorations/maci/tree/v1.1.1/server). -There are two roles in the cordinator service: admin (i.e. MACI coordinator) and user (i.e. a voter). The admin's responsibility is to ensure that the code remains updated and that the backend services are live. The user can then simply send HTTP requests to the backend server to interact with MACI, for instance, by signing up and publishing a message on chain. +There are two roles in the coordinator service: admin (i.e. MACI coordinator) and user (i.e. a voter). The admin's responsibility is to ensure that the code remains updated and that the backend services are live. The user can then simply send HTTP requests to the backend server to interact with MACI, for instance, by signing up and publishing a message on chain. The coordinator service has been wrapped into two docker instances: one for the backend server to accept user requests; one for the Mongodb service to store all necessary information on the current state such as smart contract addresses, zero knowledge proof keys and so on. diff --git a/website/package.json b/website/package.json index 96682cb25d..217469c505 100644 --- a/website/package.json +++ b/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "0.0.0", + "version": "1.2.0", "private": true, "scripts": { "setup-typedoc": "ts-node ./src/scripts/setupTypedoc.ts", diff --git a/website/src/components/HomepageFeatures/index.tsx b/website/src/components/HomepageFeatures/index.tsx index a006a0d40d..3689eb21ec 100644 --- a/website/src/components/HomepageFeatures/index.tsx +++ b/website/src/components/HomepageFeatures/index.tsx @@ -25,8 +25,8 @@ const FeatureList: FeatureItem[] = [ imgDark: boxDarkImage as string, description: ( <> - MACI was designed to be a secure voting system. It is built using smart contracts on the Ethereum blockchain, - which ensures votes cannot be faked, censored, or tampered with. + Our Ethereum smart contracts enforce correct execution. Votes cannot be faked, censored, double-counted, or + tampered with. ), }, @@ -36,8 +36,8 @@ const FeatureList: FeatureItem[] = [ imgDark: chainDarkImage as string, description: ( <> - With MACI, votes are encrypted before submitting them on-chain to ensure that your privacy is preserved when - participating in a vote. + Votes are encrypted before submitting them on-chain to ensure individual privacy is preserved throughout the + voting process. ), }, @@ -47,8 +47,8 @@ const FeatureList: FeatureItem[] = [ imgDark: chartDarkImage as string, description: ( <> - MACI is powered by zk-SNARKs, a cutting edge cryptographic technology that ensures votes are counted correctly - without revealing the individual votes. + Vote tallying happens off-chain but ZK-proofs are submitted and verified on-chain, which guarantees votes are + counted correctly without revealing the individual votes. ), }, diff --git a/website/src/components/HomepageFeatures/styles.module.css b/website/src/components/HomepageFeatures/styles.module.css index 75ac46e089..880fdda7f9 100644 --- a/website/src/components/HomepageFeatures/styles.module.css +++ b/website/src/components/HomepageFeatures/styles.module.css @@ -3,6 +3,7 @@ align-items: center; padding: 2rem 0; width: 100%; + font-size: 1.1rem; } .featureImg { diff --git a/website/src/pages/index.module.css b/website/src/pages/index.module.css index 9c8445a9d3..037695e49a 100644 --- a/website/src/pages/index.module.css +++ b/website/src/pages/index.module.css @@ -46,6 +46,7 @@ align-items: center; padding: 4rem; width: 100%; + font-size: 1.1rem; } .blue { diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 4907e53977..031bafc3b6 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -41,12 +41,13 @@ const Home = (): JSX.Element => {

Minimal Anti-Collusion Infrastructure (MACI) is a private, on-chain, voting system.

- MACI is a protocol designed to provide a highly secure e-voting solution. It enables organizations to - conduct on-chain voting processes with a significantly reduced risk of cheating, such as bribery or - collusion. MACI uses zero-knowledge proofs to implement a receipt-free voting scheme, making it - coordinator to verify how a specific user voted. This ensures the correct execution of votes and allows - anyone to verify the results. It is particularly beneficial for governance and funding events, where its - anti-collusion mechanisms help ensure fair and transparent outcomes. + MACI is our attempt to build the most secure e-voting solution available. It enables on-chain voting + processes with significantly reduced risk of cheating, like bribery or collusion, through the use of + Ethereum smart contracts, encryption, and zero-knowledge proofs. Together these technologies provide a set + of guarantees including censorship resistance, correct execution, privacy, and a receipt-free voting + scheme, which ensures results are transparent but makes it impossible for outsiders to verify how any + specific user voted. We believe MACI is most beneficial for governance and funding events, when the stakes + are high and anti-collusion mechanisms are critical to help ensure fair and transparent outcomes.

diff --git a/website/src/scripts/setupTypedoc.ts b/website/src/scripts/setupTypedoc.ts index 059d01937e..6f08d8c35d 100644 --- a/website/src/scripts/setupTypedoc.ts +++ b/website/src/scripts/setupTypedoc.ts @@ -6,7 +6,7 @@ import { copyDirectory, fitFormat, generateSidebarString, insertIndexPage } from const TYPEDOC_DIR = path.resolve(__dirname, "../../typedoc"); /** - * A function that remove the auto-genrated navigator + * A function that remove the auto-generated navigator * and the title at the top of the page, * meanwhile adding sidebar configurations above the content. * @param file - the file being updated diff --git a/website/static/audit_reports/20240223_PSE_Audit_audit_report.pdf b/website/static/audit_reports/20240223_PSE_Audit_audit_report.pdf new file mode 100644 index 0000000000..8b17a5ba7c Binary files /dev/null and b/website/static/audit_reports/20240223_PSE_Audit_audit_report.pdf differ diff --git a/website/versioned_docs/version-v0.x/introduction.md b/website/versioned_docs/version-v0.x/introduction.md index b7420863c2..2bc8536038 100644 --- a/website/versioned_docs/version-v0.x/introduction.md +++ b/website/versioned_docs/version-v0.x/introduction.md @@ -31,7 +31,7 @@ Even if Alice reveals the cleartext of her vote to Bob, she just needs to not sh ## Technical process -Refer to the [Glossary](#Glossary) for defintions of terms. +Refer to the [Glossary](#Glossary) for definitions of terms. 1. The coordinator deploys the MACI contract to an Ethereum blockchain and starts the sign-up period. The same transaction that deploys the contract also stores the value of an empty vote option tree. 2. To sign up, each user creates an EdDSA keypair and invokes the contract's `signUp()` function. Alternatively, there is a mechanism where some contract function checks if the user owns a particular ERC721 token and adds them to the whitelist. It in turn generates a new leaf to the state tree and updates the state tree root. @@ -48,7 +48,7 @@ Refer to the [Glossary](#Glossary) for defintions of terms. - Otherwise, the user should use the most current public key they have registered. - - Submit the the message, as well as the epheremal public key in the clear to the contract using its `publishMessage()` function, which hashes the command and inserts it into the message tree. + - Submit the the message, as well as the ephemeral public key in the clear to the contract using its `publishMessage()` function, which hashes the command and inserts it into the message tree. 5. The coordinator processes all the commands after the voting period ends. diff --git a/website/versioned_docs/version-v1.x/audit.md b/website/versioned_docs/version-v1.x/audit.md index 0051fc9688..bdfa114350 100644 --- a/website/versioned_docs/version-v1.x/audit.md +++ b/website/versioned_docs/version-v1.x/audit.md @@ -1,112 +1,23 @@ --- title: MACI Security Audits -description: In the summer of 2022, MACI v1 was audited by HashCloak. The audit covered both the zk-SNARK circuits and the Solidity smart contracts. -sidebar_label: Security Assessments +description: Overview of MACI audit history with references to audit reports. +sidebar_label: Security audits sidebar_position: 12 --- -# Security Audits +# MACI Security Audits -## Links +## Full reports +- Audit by PSE Audit 2024/02 [report](/audit_reports/20240223_PSE_Audit_audit_report.pdf) - Audit by HashCloak 2022/09 [report](/audit_reports/202220930_Hashcloak_audit_report.pdf) - Audit by HashCloak 2021/09 [report](/audit_reports/20210922_Hashcloak_audit_report.pdf) -## HashCloak audit 2022 - -In the summer of 2022, MACI v1 was audited by HashCloak. The audit covered both the zk-SNARK circuits and the Solidity smart contracts. - -This audit revealed a number of high severity issues which have been remediated by the MACI development team. We will be looking at those in details in the following sections. - -## Data is not fully verified during a state update - -This issue could have allowed a malicious coordinator to change the MACI state arbitrarily, for instance by tampering with the voice credits and the voting public key of any user. - -In more details, the `processMessages.circom` circuit, did not fully verify that after a state update, the new state was the result of executing an arbitrary number of user messages on the previous state. `topupStateLeaves` and `topupStateLeavesPathElements` were never verified against the current state, and `topupStateIndexes` and `topupAmounts` were not verified against the message root. - -This was rectified with commit [6df6a4054da926b07f35c5befab4f1f8af33dcc6](https://github.com/privacy-scaling-explorations/maci/pull/522/commits/6df6a4054da926b07f35c5befab4f1f8af33dcc6) - -## Token for top-up is a free resource - -The provided `TopupCredit.sol` contract implemented unprotected `airdrop` and `airdropTo` functions, which could have allowed anyone to receive unlimited voice credits. While this contract was provided as a template, the issue has been rectified by adding the `onlyOwner` modifier to these two functions. - -```javascript -function airdropTo(address account, uint256 amount) public onlyOwner { - require(amount < MAXIMUM_AIRDROP_AMOUNT); - _mint(account, amount); -} - -function airdrop(uint256 amount) public onlyOwner { - require(amount < MAXIMUM_AIRDROP_AMOUNT, "amount exceed maximum limit"); - _mint(msg.sender, amount); -} -``` - -## Integer overflow problem and improper bit length restriction - -This issue within the `float.circom` circuit could have resulted in an overflow on the `IntegerDivision` template. This stemmed from the lack of validation of input size, as well as not preventing a division by zero. Furthemore, it was pointed out that using assert in circuits did not contribute to constraints verification, and could have been bypassed by a malicious coordinator. - -The issue was rectified with commit [efd4617724e956d2566062c6fe882e1d45cba7c4](https://github.com/privacy-scaling-explorations/maci/pull/523/commits/efd4617724e956d2566062c6fe882e1d45cba7c4) - -## MessageQueue in PollFactory is uninitialized - -MACI uses a message queue (a quinary merkle tree) to store all the messages to be processed for a single poll. When deploying a new poll, a corresponding message queue contract is deployed as well, however this was never initialized with a zero value. - -Should the queue never be initialized with the zero value, a malicious user could submit a message to initialize the queue with a value they know how to decrypt, which however would take a very long time to generate a proof for. This could result in a denial of service attack against the coordinator. - -The code was fixed by enqueuing a message containing the zero value `NOTHING_UP_MY_SLEEVE` which is the result of: - -`keccak256("Maci") % p` +## PSE audit 2024 -Translated into code, an `init` function was included in the Poll contract, with the following enqueuing of the placeholder leaf: +In February 2024 the PSE Audit team audited the MACI codebase with a focus on the smart contracts, TypeScript core, and Circom circuits Three critical bugs were found: two within the Circom circuits and one in the smart contracts. All three of these have been fixed. -```javascript -// init messageAq here by inserting placeholderLeaf -uint256[2] memory dat; -dat[0] = NOTHING_UP_MY_SLEEVE; -dat[1] = 0; -(Message memory _message, PubKey memory _padKey, uint256 placeholderLeaf) = padAndHashMessage(dat, 1); -extContracts.messageAq.enqueue(placeholderLeaf); -``` - -## Additional issues and improvements - -The rest of the issues were either low risk, informational or general optimizations. - -As an example, there were certain functions which did not enforce the checks-effets-interaction pattern, which could potentially have led to reentrancy attacks. While most of these have been fully remediated, the `deployPoll` function within MACI is not currently enforcing the pattern when deploying a new poll contract using the `PollFactory` factory contract. - -```javascript -function deployPoll( - uint256 _duration, - MaxValues memory _maxValues, - TreeDepths memory _treeDepths, - PubKey memory _coordinatorPubKey -) public afterInit { - uint256 pollId = nextPollId; - - [..snip] - - Poll p = pollFactory.deploy( - _duration, - _maxValues, - _treeDepths, - batchSizes, - _coordinatorPubKey, - vkRegistry, - this, - topupCredit, - owner() - ); - - polls[pollId] = p; - - emit DeployPoll(pollId, address(p), _coordinatorPubKey); -} -``` - -As seen above, an external call is made, before updating the state with the new poll. The issue is tracked [here](https://github.com/privacy-scaling-explorations/maci/pull/522#discussion_r981863147) and only left open as the code does not enforce best practices, however it does not pose any immediate risk. - -The rest of the issues were successfully fixed and reflected in the v1.1.1. For the full report, please refer to the `audit` folder inside the root of the repository. +Please see the [PSE Audit report](/audit_reports/20240223_PSE_Audit_audit_report.pdf) for details. ## Veridise disclosure 2023 @@ -116,8 +27,6 @@ Out of five issues disclosed, only three were relevant and have been since fixed We would like to thank you the Veridise team for their effort in keeping open source projects safe. -> Please note that at this time the fixed code is only present in the dev branch. This will be merged to the main branch in the next minor update. - ### Issue 1 **Description** @@ -225,3 +134,27 @@ for (var i = 0; i < levels; i++) { sum.nums[i] <== out[i] * (BASE ** i); } ``` + +## HashCloak audit 2022 + +In the summer of 2022, MACI v1 was audited by HashCloak. The audit covered both the zk-SNARK circuits and the Solidity smart contracts. + +This audit revealed a number of high severity issues which have been remediated by the MACI development team. All issues were successfully fixed and reflected in MACI v1.1.1. + +Please see the [HashCloak report](/audit_reports/202220930_Hashcloak_audit_report.pdf) for details. + +## HashCloak audit 2021 + +From July 5th, 2021 to August 2nd, 2021, the Ethereum Foundation’s Applied ZKPs team engaged HashCloak for an audit of the MACI protocol. The audit was conducted with 3 auditors over 15 person weeks. + +The following packages were in scope: + +- Circuits +- Contracts +- Core +- Crypto +- Domainobjs + +From August 18, 2021 to September 22, 2021, Hashcloak assisted the MACI team in resolving the issues. + +Please see the [HashCloak report](/audit_reports/20210922_Hashcloak_audit_report.pdf) for details. diff --git a/website/versioned_docs/version-v1.x/contracts.md b/website/versioned_docs/version-v1.x/contracts.md index 365475abd0..c4b35a27b4 100644 --- a/website/versioned_docs/version-v1.x/contracts.md +++ b/website/versioned_docs/version-v1.x/contracts.md @@ -338,7 +338,7 @@ struct MaxValues { } ``` -These are stored separately to avoid a stack overlow error during compilation of the contracts using them. +These are stored separately to avoid a stack overflow error during compilation of the contracts using them. ## AccQueue diff --git a/website/versioned_docs/version-v1.x/key-change.md b/website/versioned_docs/version-v1.x/key-change.md index b5aec91393..4a81356454 100644 --- a/website/versioned_docs/version-v1.x/key-change.md +++ b/website/versioned_docs/version-v1.x/key-change.md @@ -9,11 +9,11 @@ sidebar_position: 16 MACI's voters are identified by their MACI public key. Together with their private key, they can sign and submit messages to live Polls. -As MACI's main property is to provide collusion resistence in digital voting applications, it is important to have a mechanism for a user to change their voting key, should this become compromised, or they wish to revoke past actions. +As MACI's main property is to provide collusion resistance in digital voting applications, it is important to have a mechanism for a user to change their voting key, should this become compromised, or they wish to revoke past actions. ## How MACI messages are processed -In order to understand how key changing currenctly works in MACI, we need to understand how messages are processed. +In order to understand how key changing currently works in MACI, we need to understand how messages are processed. After a poll ends, the coordinator processes messages off chain in reverse order. To improve efficiency, messages are processed in batches, and correctness is proved for each batch using a zk-SNARK circuit. diff --git a/website/versioned_docs/version-v1.x/overview.md b/website/versioned_docs/version-v1.x/overview.md index 3f9f9ed0cc..8307ecad9c 100644 --- a/website/versioned_docs/version-v1.x/overview.md +++ b/website/versioned_docs/version-v1.x/overview.md @@ -15,7 +15,7 @@ The MACI codebase consists of three subsystems in different programming language ## Circuits -MACI has multiple zk-SNARK circuits that ensure all off-chain computation is completed correctly. The circuits enforce that message processing and vote tallying were correctly executed by the coordinator. +MACI has multiple circuits that ensure all off-chain computation is completed correctly. The circuits are used to generate zero-knowledge proofs (zk-SNARKs) that the votes were counted correctly. Specifically, they enforce that message processing and vote tallying were correctly executed by the coordinator. The proofs can then be verified through a verifier smart contract on-chain. The circuits for these zero-knowledge proofs are written in [Circom](https://iden3.io/circom). @@ -26,7 +26,7 @@ The MACI circuits are released through the [`@maci-circuits`](https://www.npmjs. ## Smart contracts -The MACI smart contracts handle the management and on-chain voting aspects of the system. They provide the functionality to sign up voters, deploy polls, and they store on-chain data from transactions, such as the encrypted votes of a poll. They also verify proofs of the zk-SNARK circuits. +The MACI smart contracts handle the on-chain aspects - both the functionality and the storage - of the voting system. They provide the functionality to deploy polls, register voters, and accept votes. They also store and manage the on-chain data from transactions, such as the encrypted votes of a poll. Finally, they verify proofs of the zk-SNARK circuits, so that everyone can validate the voting results. The MACI smart contracts are written in [Solidity](https://soliditylang.org/). @@ -36,7 +36,7 @@ Contracts are released through the [`@maci-contracts`](https://www.npmjs.com/pac ## TypeScript libraries -The TypeScript libraries manage the business logic between the smart contracts and the circuit code. They provide a variety of functionality, such as encryption tools, utilities, and a CLI for interacting with MACI (such as vote tallying & proof-generation). +The TypeScript libraries manage the business logic between the smart contracts and the circuit code. They provide a variety of functionality, such as encryption tools, utilities, and a CLI for interacting with MACI (for actions like signing up, voting, tallying votes & generating proofs). The MACI [TypeScript](https://www.typescriptlang.org/) libraries are released through the following NPM packages: diff --git a/website/versioned_docs/version-v1.x/spec.md b/website/versioned_docs/version-v1.x/spec.md index d2b77a327e..c65fbb6ec2 100644 --- a/website/versioned_docs/version-v1.x/spec.md +++ b/website/versioned_docs/version-v1.x/spec.md @@ -108,7 +108,7 @@ The algorithm to do so is as such: #### 1.4. Public key generation -A public key is a point on the Baby Jubjub curve. It is determistically derived from a private key $s$, the procedure to do so is almost identical to [RFC8032](https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5). +A public key is a point on the Baby Jubjub curve. It is deterministically derived from a private key $s$, the procedure to do so is almost identical to [RFC8032](https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5). 1. Format the private key [1.3] 2. Multiply $G$ by 8 and multiply the resulting point by the formatted private key to derive the public key $A$: @@ -246,7 +246,7 @@ Effectively, four out of five times it is invoked, an enqueue operation _may or ##### 1.10.2. Merging subroots -Before computing the main Merkle root, it is necessary to compute the `smallSRTroot` (the smallest subroot tree root). This is the Merkle root of a tree which is small enough to fit all the subroots, it uses a similar mechanisim to enqueuing leaves [1.10.2]. +Before computing the main Merkle root, it is necessary to compute the `smallSRTroot` (the smallest subroot tree root). This is the Merkle root of a tree which is small enough to fit all the subroots, it uses a similar mechanism to enqueuing leaves [1.10.2]. The `AccQueue.sol` contract provides the `mergeSubRoots(uint256 _numSrQueueOps)` function which allows the coordinator to specify the number of queue operations to execute. The entire tree may be merged in a single transaction, or it may not. Multiple calls to `mergeSubRoots` may be required due to the block gas limit. @@ -274,7 +274,7 @@ A verifying key is used to validate a zk-SNARK proof. Each unique permutation of ### 2.2. Private key -A private key $k$ represents a particpant's ability to broadcast or decrypt messages under an unique identity and generation of a shared key [1.9], it translates to a scalar point on the Baby Jubjub ellpitical curve. To avoid confusion with Ethereum's ECDSA encryption, MACI requires serialisation bound with the prefix `macisk.` +A private key $k$ represents a participant's ability to broadcast or decrypt messages under an unique identity and generation of a shared key [1.9], it translates to a scalar point on the Baby Jubjub elliptical curve. To avoid confusion with Ethereum's ECDSA encryption, MACI requires serialisation bound with the prefix `macisk.` #### 2.2.1. Serialisation @@ -298,7 +298,7 @@ A public key $p$ represents a users identity derived from $k$ and therefore is a #### 2.3.1. Serialisation -To get a serialised public key from public key coordinates, the variable $u$ is defined as public key's y-cordinate, a 32 bit buffer $v$ is created and iterated over each uninitialised byte to: +To get a serialised public key from public key coordinates, the variable $u$ is defined as public key's y-coordinate, a 32 bit buffer $v$ is created and iterated over each uninitialised byte to: 1. assign the result of a bitwise [`AND (&)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_AND) operation between values $u$ and $255$ to byte $n$ 2. shift $u$ right by 8 bits ([`>>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Right_shift)) @@ -312,7 +312,7 @@ To reverse the effects of serialisation and return the unpacked public key, we m 1. shift $u$ left by the result of $8$ multiplied by $n$ bits ([`<<`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Left_shift)) 2. assign $y$ the result of addition between $y$ and $u$ -The result $y$ is the public key's y-cordinate, to then compute the x-cordinate we must look at the equation for the twisted Edwards elliptic curve (as defined in [`EIP-2494`](https://eips.ethereum.org/EIPS/eip-2494)): +The result $y$ is the public key's y-coordinate, to then compute the x-coordinate we must look at the equation for the twisted Edwards elliptic curve (as defined in [`EIP-2494`](https://eips.ethereum.org/EIPS/eip-2494)): $ax^2 + y^2 = 1 + dx^2y^2$ @@ -328,16 +328,16 @@ A keypair is a private key and its corresponding public key. A command represents an action that a user may take. Such as casting a vote in a poll or changing their public key if bribed. It is made up of the following parameters: -| Symbol | Name | Size | Description | -| ------------ | ----------------------- | ---- | -------------------------------------------------------------------------------------------------- | -| $cm_i$ | State index | 50 | State leaf index where the signing key is located | -| $cm_{p_{x}}$ | Public key x-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's x-coordinate | -| $cm_{p_{y}}$ | Public key y-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's y-coordinate | -| $cm_{i_{v}}$ | Vote option index | 50 | Option state leaf index of preference to assign the vote for | -| $cm_w$ | Voting weight | 50 | Voice credit balance allocation, this is an arbitary value dependent on a user's available credits | -| $cm_n$ | Nonce | 50 | State leaf's index of actions committed plus one | -| $cm_{id}$ | Poll id | 50 | The poll's identifier to cast in regard to | -| $cm_s$ | Salt | 253 | An entropy value to inhibit brute force attacks | +| Symbol | Name | Size | Description | +| ------------ | ----------------------- | ---- | --------------------------------------------------------------------------------------------------- | +| $cm_i$ | State index | 50 | State leaf index where the signing key is located | +| $cm_{p_{x}}$ | Public key x-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's x-coordinate | +| $cm_{p_{y}}$ | Public key y-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's y-coordinate | +| $cm_{i_{v}}$ | Vote option index | 50 | Option state leaf index of preference to assign the vote for | +| $cm_w$ | Voting weight | 50 | Voice credit balance allocation, this is an arbitrary value dependent on a user's available credits | +| $cm_n$ | Nonce | 50 | State leaf's index of actions committed plus one | +| $cm_{id}$ | Poll id | 50 | The poll's identifier to cast in regard to | +| $cm_s$ | Salt | 253 | An entropy value to inhibit brute force attacks | The parameters; $cm_i$, $cm_{i_{v}}$, $cm_n$, $cm_w$ and $cm_{id}$ are packed into a singular 250 bit value $p$, defined as the sum of bitwise right shifts from 0 to 250, incrementing by 50 for each parameter. This reduces gas expenditures when generating a $\mathsf{poseidon_{4}}$ hash of a command $h_{cm}$, expressed as: @@ -369,7 +369,7 @@ To decrypt a message using $k_s$ is expressed as $[p, R8[0], R8[1], cm_s]$ = $\mathsf{poseidonDecrypt}(M, k_s[0], k_s[1], cm_n, 7)$ -To unpack $p$ to it's original five parameters, it must be seperated into 50 bit values from the parent 250 bit value. To extract 50 bits at byte $n$, we: +To unpack $p$ to it's original five parameters, it must be separated into 50 bit values from the parent 250 bit value. To extract 50 bits at byte $n$, we: 1. initialise 50 bits 2. shift left by $n$ bits @@ -454,7 +454,7 @@ MACI provides collusion-resistance assuming that: That said, even if the coordinator is dishonest, they can neither tamper nor censor with its execution. -In MACI, the contents of a vote can only be decrypted by the coordinator. Moreover, the validity of a vote cannot be proven, as participants can revoke past actions through key-changes. Therefore, inhibiting the adversary in validating the fufilliment of such agreements. +In MACI, the contents of a vote can only be decrypted by the coordinator. Moreover, the validity of a vote cannot be proven, as participants can revoke past actions through key-changes. Therefore, inhibiting the adversary in validating the fulfillment of such agreements. To clarify how this works, consider the following situation between Alice and Eve involving a vote option A: @@ -463,7 +463,7 @@ To clarify how this works, consider the following situation between Alice and Ev 3. Alice casts a message for option A, in which she simultaneously: - Votes in opposition of A - Changes her keypair through submitting a new public key -4. Eve is uncertain whether Alice has voted for her preference due to the secrecy of the message, regardless she assumes confirmation upon recieving the transaction hash +4. Eve is uncertain whether Alice has voted for her preference due to the secrecy of the message, regardless she assumes confirmation upon receiving the transaction hash 5. Alice broadcasts a message from the new keypair registered in step 3 and casts a vote in support of poll A in turn, voiding her initial vote in opposition Eve is doubtful whether her request was actually satisfied and is unaware to Alice casting a new vote to void the first, she decides not compensate Alice because of the uncertainty surrounding her compliance. @@ -499,7 +499,7 @@ Each leaf within the ballot trees stores a participants vote within a poll, it s #### The message tree (per poll) -Each leaf within the message tree correlates to a command cast from participants within a poll, it too like the state tree has a default nothing-up-my-sleeve value at leaf zero. Except it is a Keccak256 hash of the string `"Maci"` moduluo the SNARK field size $p$ [1.1]. +Each leaf within the message tree correlates to a command cast from participants within a poll, it too like the state tree has a default nothing-up-my-sleeve value at leaf zero. Except it is a Keccak256 hash of the string `"Maci"` modulo the SNARK field size $p$ [1.1]. ### 3.7. System flow @@ -509,7 +509,7 @@ Registration is initiated through fulfilling the requirements specified in the g #### When a user publishes a message -Publishing messages requires users to encrypt a command using a shared key generated using ECDH [1.10] and submiting the ciphertext through the `publishMessage()` function. The message is then queued for processing by the co-ordinator once published. +Publishing messages requires users to encrypt a command using a shared key generated using ECDH [1.10] and submitting the ciphertext through the `publishMessage()` function. The message is then queued for processing by the co-ordinator once published. #### When the coordinator merges the state queue @@ -517,7 +517,7 @@ To subsidise gas costs for users, registration does not require the state root t Which first requires the merging of subroots [1.10.1], this creates the shortest possible tree that contains all the state leaves. Which may or may not require multiple transactions (in the form of batches) due to the restriction of the block gas limit. Once all the subroots have been computed they are merged [1.10.2] to compute the state root at its full depth. -After merging, the state-ballot commitment hash `currentSbCommitment` is initialised, which is a $\mathsf{poseidon_{3}}$ represenation of the state's Merkle root, the ballot's Merkle root and a salt. At initialisation the Merkle roots are equal to the trees at full depth. +After merging, the state-ballot commitment hash `currentSbCommitment` is initialised, which is a $\mathsf{poseidon_{3}}$ representation of the state's Merkle root, the ballot's Merkle root and a salt. At initialisation the Merkle roots are equal to the trees at full depth. #### When the coordinator merges the message queue @@ -525,7 +525,7 @@ The process of merging queues are the same in both the message and state trees. #### When the coordinator processes the messages -As large zk-SNARK circuits take up a lot of disk space and require a large amount of resources to compile, it is not feasible to prove the correctness of message processing for all messages in a single proof. Rather, we process messages in batches. With each batch of messages at a particular index, the coordinator proves, using a zk-SNARK proof, intermediate `currentSbCommitment` values for subroots at a relative depth. The authencity of this statement is confirmed using the registry's processing verifying key. The outcome of processing all batches, which must occur in consecutive order, is the same as if all the messages were processed in one go. +As large zk-SNARK circuits take up a lot of disk space and require a large amount of resources to compile, it is not feasible to prove the correctness of message processing for all messages in a single proof. Rather, we process messages in batches. With each batch of messages at a particular index, the coordinator proves, using a zk-SNARK proof, intermediate `currentSbCommitment` values for subroots at a relative depth. The authenticity of this statement is confirmed using the registry's processing verifying key. The outcome of processing all batches, which must occur in consecutive order, is the same as if all the messages were processed in one go. #### When the coordinator tallies the votes @@ -609,7 +609,7 @@ The integration tests and shell scripts in the `cli` directory provide examples | `isTallyVkSet(uint256 _sig)` | Non-applicable | Query whether a signature valid for tallying votes | | `genProcessVkSig(uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize)` | Non-applicable | Generate a signature (used for verifying key mapping lookups) for message processing by compressing parameters into a singular value | | `genTallyVkSig(uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth)` | Non-appicable | Generate a signature (used for verifying key mapping lookups) for vote tallying by compressing parameters into a singular value | -| `setVerifyingKeys( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, VerifyingKey memory _processVk, VerifyingKey memory _tallyVk)` | Coordinator only | Intialise verifying keys for processing and tallying to the contract alongside specifying each tree depth | +| `setVerifyingKeys( uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize, VerifyingKey memory _processVk, VerifyingKey memory _tallyVk)` | Coordinator only | Initialise verifying keys for processing and tallying to the contract alongside specifying each tree depth | | `hasProcessVk(uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize)` | Non-applicable | Query whether the signature of the parameters is valid for message processing | | `getProcessVkBySig(uint256 _sig)` | Non-applicable | Query a processing verifying key by providing a valid signature | | `getProcessVk(uint256 _stateTreeDepth, uint256 _messageTreeDepth, uint256 _voteOptionTreeDepth, uint256 _messageBatchSize)` | Non-applicable | Query a processing verifying key by providing parameters to generate a valid signature | diff --git a/website/versioned_docs/version-v1.x/testing-in-detail.md b/website/versioned_docs/version-v1.x/testing-in-detail.md index 42e18d1587..ff79c54791 100644 --- a/website/versioned_docs/version-v1.x/testing-in-detail.md +++ b/website/versioned_docs/version-v1.x/testing-in-detail.md @@ -90,7 +90,7 @@ Let's look at the fields in detail: - `expectedTotalSpentVoiceCredits`: the expected total spent voice credits - `subsidy`: an object that contains the subsidy details. If you do not provide any subsidy details, the default will be used: `enabled = false`, `expectedSubsidy = []`. If you do provide subsidy details, you must provide both fields. -As an example, let's try to implement a test given the following criterias: +As an example, let's try to implement a test given the following criteria: 1. We want 10 users to signup 2. We want each user to publish a different vote @@ -179,7 +179,7 @@ The core package contains a number of tests that are used to verify that the cor These tests interact with the crypto and dombinobjs packages, where mock data comes from. Their main goal is to ensure that the core functions work as expected, and that the state is as expected after a series of operations. -Currently, there is a blend of e2e and unit tests, where e2e tests are used to verify that the entire MACI local processing works as expcted (users signup, publish votes, messages are processed and finally these votes are tallied). Unit tests on the other hand are used to verify that the core functions work as expected, such as `processMessage` and `tallyVotes`. You will find them in separate files, with e2e being [here](https://github.com/privacy-scaling-explorations/maci/blob/dev/core/ts/__tests__/e2e.test.ts) and unit tests in the other files. +Currently, there is a blend of e2e and unit tests, where e2e tests are used to verify that the entire MACI local processing works as expected (users signup, publish votes, messages are processed and finally these votes are tallied). Unit tests on the other hand are used to verify that the core functions work as expected, such as `processMessage` and `tallyVotes`. You will find them in separate files, with e2e being [here](https://github.com/privacy-scaling-explorations/maci/blob/dev/core/ts/__tests__/e2e.test.ts) and unit tests in the other files. ### Domainobjs/Crypto tests diff --git a/website/versioned_docs/version-v1.x/topup.md b/website/versioned_docs/version-v1.x/topup.md new file mode 100644 index 0000000000..f5e27f1678 --- /dev/null +++ b/website/versioned_docs/version-v1.x/topup.md @@ -0,0 +1,43 @@ +--- +title: MACI Topup +description: How the Topup feature works +sidebar_label: Topup +sidebar_position: 19 +--- + +# Topup + +MACI v1.1.1 introduced the topup feature. This was developed by [chaosma](https://github.com/chaosma): you can find more information on their [post](https://hackmd.io/@chaosma/rkyPfI7Iq) and the original idea post [here](https://hackmd.io/@ef-zkp/rk6uaQBrI). + +In a nutshell, this feature was added to support some application like quadratic funding, where once a user uses all of their voice credits when voting, they would need to signup again to be able to vote again. This is not ideal, and thus with this feature, a user can topup their voice credits, and continue to vote for a poll/quadratic funding round. + +## How topup messages are processed + +Topup messages are submitted on chain using the same smart contract used for voting, [`Poll`](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/Poll.sol). With the current design, a TopUpCredit token smart contract is required. In this implementation of MACI, there is an example token, which is an ERC20 contract with 1 decimal, of which the coordinator (or MACI's operator) has ownership of. This privileged figure can mint tokens to users (at their discretion) and users will need to deposit such tokens to the Poll contract in order to topup their voice credits. + +:::info +MACI is not concerned with the way of distributing such tokens. The operators of the MACI instance should implement their own way of distributing such tokens, as well as withdrawing them from the Poll contract. For instance, if the operator chooses to use a token with a monetary value, the Poll balance could be withdrawn and sent to fund public goods. +::: + +To submit a topup message, a user will then need to call the TopUpCredit token approve function and approve the Poll contract to spend their tokens. Then, they will need to call the `topup` function in the Poll contract, passing the amount of tokens they want to topup and their state index. + +## Considerations + +### Voice credits + +:::danger +As a MACI operator, you should be aware that voice credits should ideally be small values (< 2 \*\* 32) to avoid overflows or issues in the circuits operations. It is recommended to use a factor to scale down voice credits in the smart contract. +::: + +### Reverse processing + +As with normal vote messages (or key changes), topup messages are processed in [reverse order](https://maci.pse.dev/docs/key-change/#why-are-messages-processed-in-reverse-order), you should be aware that as a user, you will first need to spend your voice credits, then topup. + +Here is an [extract from Chao's post](https://hackmd.io/@chaosma/rkyPfI7Iq#Remarks): + +> With above design, the order of vote type and topup type message matters. MACI process the message queue in reverse order. Suppose the initial > credit balance for any user is 100. Consider the following two scenarios in message queue: +> +> **Case 1** > [topup(balance=350), vote(weight=20,nonce=2), vote(weight=9,nonce=1)] +> +> **case 2** > [vote(weight=20,nonce=2), topup(balance=350), vote(weight=9,nonce=1)] +> The first case, the topup message is processed at last, so the vote(weight=20,nonce=2) will fail because 20 \* 20 > 100. vote(weight=9,nonce=1) is the final result. In the second case, the topup message is processed before the second vote, so vote(weight=20,nonce=2) will invalidate the first vote and become the final result.