Skip to content

Commit

Permalink
chore: update lerna version
Browse files Browse the repository at this point in the history
- [x] Use root node_modules
- [x] Update docs
- [x] Compatibility fixes
  • Loading branch information
0xmad committed Jan 11, 2024
1 parent 0689040 commit 7dcf456
Show file tree
Hide file tree
Showing 42 changed files with 31,920 additions and 10,465 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# Global:

* @ctrlc03 @kittybest @0xmad @samajammin
* @ctrlc03 @kittybest @0xmad @samajammin @crisgarner
2 changes: 1 addition & 1 deletion .github/scripts/website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

# install maci dependencies, bootstrap monorepo and build packages
npm install && npm run bootstrap && npm run build
npm install && npm run build

# run typedoc
npm run typedoc
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: ${{ matrix.command }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/circuit-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- name: Build maci-circuits package
run: |
npm install
npm run bootstrap
npm run build
- name: Download circom Binary v2.1.6
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ jobs:
- name: Install
run: |
npm install
npm run bootstrap
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
1 change: 0 additions & 1 deletion .github/workflows/contracts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: Test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/core-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: Test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/crypto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: Test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/domainobjs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: Test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Initialize Project
run: |
npm install
npm run bootstrap
npm run build
- name: Publish Project
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly-ceremony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- name: Initialize Project
run: |
npm install
npm run bootstrap
npm run build
- name: Run hardhat fork
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- name: Initialize Project
run: |
npm install
npm run bootstrap
npm run build
- name: Run hardhat fork
Expand Down Expand Up @@ -101,7 +100,6 @@ jobs:
- name: Build
run: |
npm install
npm run bootstrap
npm run build
- name: Test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
run: |
git config --global url."https://github.com/".insteadOf git://github.com/
npm install
npm run bootstrap
npm run build
- name: Publish NPM
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- name: Initialize Project
run: |
npm install
npm run bootstrap
npm run build
- name: Run hardhat fork
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

npm i && npm run bootstrap && npm run build
npm i && npm run build

4 changes: 2 additions & 2 deletions circuits/circom/ecdh.circom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/bitify.circom";
include "../node_modules/circomlib/circuits/escalarmulany.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/escalarmulany.circom";

template Ecdh() {
// Note: the private key needs to be hashed and pruned first
Expand Down
6 changes: 3 additions & 3 deletions circuits/circom/float.circom
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/bitify.circom";
include "../node_modules/circomlib/circuits/comparators.circom";
include "../node_modules/circomlib/circuits/mux1.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/comparators.circom";
include "../../node_modules/circomlib/circuits/mux1.circom";

template msb(n) {
// require in < 2**n
Expand Down
4 changes: 2 additions & 2 deletions circuits/circom/hasherSha256.circom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/sha256/sha256.circom";
include "../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/sha256/sha256.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";

template Sha256HashLeftRight() {
signal input left;
Expand Down
4 changes: 2 additions & 2 deletions circuits/circom/messageToCommand.circom
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pragma circom 2.0.0;
include "./ecdh.circom";
include "./unpackElement.circom";
include "../node_modules/circomlib/circuits/bitify.circom";
include "../node_modules/circomlib/circuits/poseidon.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/poseidon.circom";

// template that converts a MACI message
// to a command (decrypts it)
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/poseidon/poseidonHashT3.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../../node_modules/circomlib/circuits/poseidon.circom";
include "../../../node_modules/circomlib/circuits/poseidon.circom";

template PoseidonHashT3() {
var nInputs = 2;
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/poseidon/poseidonHashT4.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../../node_modules/circomlib/circuits/poseidon.circom";
include "../../../node_modules/circomlib/circuits/poseidon.circom";

template PoseidonHashT4() {
var nInputs = 3;
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/poseidon/poseidonHashT5.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../../node_modules/circomlib/circuits/poseidon.circom";
include "../../../node_modules/circomlib/circuits/poseidon.circom";

template PoseidonHashT5() {
var nInputs = 4;
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/poseidon/poseidonHashT6.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../../node_modules/circomlib/circuits/poseidon.circom";
include "../../../node_modules/circomlib/circuits/poseidon.circom";

template PoseidonHashT6() {
var nInputs = 5;
Expand Down
4 changes: 2 additions & 2 deletions circuits/circom/privToPubKey.circom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/bitify.circom";
include "../node_modules/circomlib/circuits/escalarmulfix.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/escalarmulfix.circom";

// convert a private key to a public key
// @note the basepoint is the base point of the baby jubjub curve
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/processMessages.circom
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include "./messageToCommand.circom";
include "./privToPubKey.circom";
include "./stateLeafAndBallotTransformer.circom";
include "./trees/incrementalQuinTree.circom";
include "../node_modules/circomlib/circuits/mux1.circom";
include "../../node_modules/circomlib/circuits/mux1.circom";
include "./utils.circom";

// Proves the correctness of processing a batch of messages.
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/stateLeafAndBallotTransformer.circom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma circom 2.0.0;
include "./messageValidator.circom";
include "../node_modules/circomlib/circuits/mux1.circom";
include "../../node_modules/circomlib/circuits/mux1.circom";

// Apply a command to a state leaf and ballot.
template StateLeafAndBallotTransformer() {
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/subsidy.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/comparators.circom";
include "../../node_modules/circomlib/circuits/comparators.circom";
include "./trees/incrementalQuinTree.circom";
include "./trees/calculateTotal.circom";
include "./trees/checkRoot.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/tallyVotes.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/comparators.circom";
include "../../node_modules/circomlib/circuits/comparators.circom";
include "./trees/incrementalQuinTree.circom";
include "./trees/calculateTotal.circom";
include "./trees/checkRoot.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/trees/incrementalMerkleTree.circom
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma circom 2.0.0;
// https://github.com/peppersec/tornado-mixer/blob/master/circuits/merkleTree.circom
// https://github.com/semaphore-protocol/semaphore/blob/audited/circuits/circom/semaphore-base.circom

include "../../node_modules/circomlib/circuits/mux1.circom";
include "../../../node_modules/circomlib/circuits/mux1.circom";
include "../hasherPoseidon.circom";

template MerkleTreeInclusionProof(n_levels) {
Expand Down
4 changes: 2 additions & 2 deletions circuits/circom/trees/incrementalQuinTree.circom
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma circom 2.0.0;
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/mux1.circom";
include "../../../node_modules/circomlib/circuits/bitify.circom";
include "../../../node_modules/circomlib/circuits/mux1.circom";
include "../hasherPoseidon.circom";
include "./calculateTotal.circom";
include "./checkRoot.circom";
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/unpackElement.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";

// Converts a field element (253 bits) to n 50-bit output elements
// where n <= 5 and n > 1
Expand Down
2 changes: 1 addition & 1 deletion circuits/circom/utils.circom
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";

// the implicit assumption of LessThan is both inputs are at most n bits
// so we need add range check for both inputs
Expand Down
12 changes: 6 additions & 6 deletions circuits/circom/verifySignature.circom
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pragma circom 2.0.0;
include "../node_modules/circomlib/circuits/compconstant.circom";
include "../node_modules/circomlib/circuits/comparators.circom";
include "../node_modules/circomlib/circuits/pointbits.circom";
include "../../node_modules/circomlib/circuits/compconstant.circom";
include "../../node_modules/circomlib/circuits/comparators.circom";
include "../../node_modules/circomlib/circuits/pointbits.circom";
include "./poseidon/poseidonHashT6.circom";
include "../node_modules/circomlib/circuits/bitify.circom";
include "../node_modules/circomlib/circuits/escalarmulany.circom";
include "../node_modules/circomlib/circuits/escalarmulfix.circom";
include "../../node_modules/circomlib/circuits/bitify.circom";
include "../../node_modules/circomlib/circuits/escalarmulany.circom";
include "../../node_modules/circomlib/circuits/escalarmulfix.circom";
include "./hasherPoseidon.circom";

template EdDSAPoseidonVerifier_patched() {
Expand Down
2 changes: 1 addition & 1 deletion cli/zkeys.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ out: "./zkeys"

# Make sure that these paths are correct
circomPath: "../../.local/bin/circom"
snarkjsPath: "./node_modules/snarkjs/build/cli.cjs"
snarkjsPath: "../node_modules/snarkjs/build/cli.cjs"

circuits:
- template: "../circuits/circom/processMessages.circom"
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ RUN cd ~ \
&& cd maci \
&& git checkout ${BRANCH_NAME} \
&& npm i
RUN cd ~/maci && npm run bootstrap
RUN cd ~/maci && npm run build
RUN cd ~/maci/contracts && npm run compileSol

Expand Down
2 changes: 0 additions & 2 deletions docker/LightDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN cd $V1_REPO \
&& git checkout $BRANCH_V1 \
&& git fetch && git reset --hard origin/$BRANCH_V1 \
&& npm i
RUN cd $V1_REPO && npm run bootstrap
RUN cd $V1_REPO && npm run build
RUN cd $V1_REPO/contracts && npm run compileSol

Expand All @@ -21,7 +20,6 @@ RUN cd $V0_REPO \
&& git checkout $BRANCH_V0 \
&& git fetch && git reset --hard origin/$BRANCH_V0 \
&& npm i
RUN cd $V0_REPO && npm run bootstrap
RUN cd $V0_REPO && npm run build
RUN cd $V0_REPO/circuits && ./scripts/buildBatchUpdateStateTreeSnark.sh && ./scripts/buildQuadVoteTallySnark.sh
RUN cd $V0_REPO/contracts && npm run compileSol
Expand Down
4 changes: 2 additions & 2 deletions integrationTests/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const config: HardhatUserConfig = {
},
},
paths: {
sources: "./node_modules/maci-contracts/contracts",
artifacts: "./node_modules/maci-contracts/artifacts",
sources: "../node_modules/maci-contracts/contracts",
artifacts: "../node_modules/maci-contracts/artifacts",
},
};

Expand Down
Loading

0 comments on commit 7dcf456

Please sign in to comment.