diff --git a/.github/workflows/build-circuits.yml b/.github/workflows/build-circuits.yml index a58169e..bdb8a73 100644 --- a/.github/workflows/build-circuits.yml +++ b/.github/workflows/build-circuits.yml @@ -3,11 +3,11 @@ name: Build Circuits on: push: tags: - - "circom_circuits-v*.*.*" + - "v*.*.*" workflow_dispatch: inputs: tag: - description: "Tag to release. Must follow the format of 'circom_circuits-vX.Y.Z'." + description: "Tag to release. Must follow the format of 'vX.Y.Z'." required: true jobs: @@ -23,13 +23,13 @@ jobs: env: # Use the tag name if it is available, otherwise use the input version. # If neither is available, default to the commit hash. - TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || '' }} + TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || 'v0.0.0' }} run: | if [ -z "$TAG" ]; then echo "Could not determine tag." exit 1 - elif [[ ! "$TAG" =~ ^circom_circuits-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "TAG must follow the format of 'circom_circuits-vX.Y.Z'. Value: '$VERSION'." + elif [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "TAG must follow the format of 'vX.Y.Z'. Value: '$VERSION'." exit 2 fi @@ -71,7 +71,7 @@ jobs: run: git submodule update --init --recursive - name: Setup Dependencies - working-directory: circom_circuits/rapidsnark + working-directory: rapidsnark run: sudo apt update -y - name: Install Dependencies [Prover] @@ -81,10 +81,10 @@ jobs: run: sudo apt install nlohmann-json3-dev - name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Linux Makefile - run: cp .github/resources/prover/Makefile circom_circuits/rapidsnark/Makefile + run: cp .github/resources/prover/Makefile rapidsnark/Makefile - name: Compile Prover and Verifier - working-directory: circom_circuits/rapidsnark + working-directory: rapidsnark run: | ./build_gmp.sh host make host_linux_x86_64_static @@ -93,7 +93,7 @@ jobs: env: BINARY_NAME: prover BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package + RAPIDSNARK_DIR: rapidsnark/package run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -106,7 +106,7 @@ jobs: env: BINARY_NAME: verifier BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package + RAPIDSNARK_DIR: rapidsnark/package run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -132,7 +132,7 @@ jobs: with: circuit-name-display: "PoL" circuit-name-binary: "pol" - circuit-path: "circom_circuits/Mantle/pol.circom" + circuit-path: "mantle/pol.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -142,7 +142,7 @@ jobs: with: circuit-name-display: "PoQ" circuit-name-binary: "poq" - circuit-path: "circom_circuits/Blend/poq.circom" + circuit-path: "blend/poq.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -152,7 +152,7 @@ jobs: with: circuit-name-display: "ZKSign" circuit-name-binary: "zksign" - circuit-path: "circom_circuits/Mantle/signature.circom" + circuit-path: "mantle/signature.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -162,7 +162,7 @@ jobs: with: circuit-name-display: "PoC" circuit-name-binary: "poc" - circuit-path: "circom_circuits/Mantle/poc.circom" + circuit-path: "mantle/poc.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -228,11 +228,11 @@ jobs: - name: Replace Prover Makefile # TODO: Make a fork generate the appropriate Windows Makefile shell: msys2 {0} - run: cp .github/resources/prover/Makefile circom_circuits/rapidsnark/Makefile + run: cp .github/resources/prover/Makefile rapidsnark/Makefile - name: Replace Prover CMakeLists shell: msys2 {0} - run: cp .github/resources/prover/${{ env.OS }}.src-CMakeLists.txt circom_circuits/rapidsnark/src/CMakeLists.txt + run: cp .github/resources/prover/${{ env.OS }}.src-CMakeLists.txt rapidsnark/src/CMakeLists.txt - name: Patch Windows mman shell: msys2 {0} @@ -244,11 +244,11 @@ jobs: - name: Replace build_gmp shell: msys2 {0} - run: cp .github/resources/prover/${{ env.OS }}.build_gmp.sh circom_circuits/rapidsnark/build_gmp.sh + run: cp .github/resources/prover/${{ env.OS }}.build_gmp.sh rapidsnark/build_gmp.sh - name: Compile Prover and Verifier shell: msys2 {0} - working-directory: circom_circuits/rapidsnark + working-directory: rapidsnark run: | ./build_gmp.sh host make host_windows_x86_64_static @@ -258,7 +258,7 @@ jobs: env: BINARY_NAME: prover BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package + RAPIDSNARK_DIR: rapidsnark/package run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -272,7 +272,7 @@ jobs: env: BINARY_NAME: verifier BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package + RAPIDSNARK_DIR: rapidsnark/package run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -298,7 +298,7 @@ jobs: with: circuit-name-display: "PoL" circuit-name-binary: "pol" - circuit-path: "circom_circuits/Mantle/pol.circom" + circuit-path: "mantle/pol.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -308,7 +308,7 @@ jobs: with: circuit-name-display: "PoQ" circuit-name-binary: "poq" - circuit-path: "circom_circuits/Blend/poq.circom" + circuit-path: "blend/poq.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -318,7 +318,7 @@ jobs: with: circuit-name-display: "ZKSign" circuit-name-binary: "zksign" - circuit-path: "circom_circuits/Mantle/signature.circom" + circuit-path: "mantle/signature.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -328,7 +328,7 @@ jobs: with: circuit-name-display: "PoC" circuit-name-binary: "poc" - circuit-path: "circom_circuits/Mantle/poc.circom" + circuit-path: "mantle/poc.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -373,7 +373,7 @@ jobs: run: brew install nasm m4 - name: Compile Prover and Verifier - working-directory: circom_circuits/rapidsnark + working-directory: rapidsnark run: | ./build_gmp.sh macos_arm64 make macos_arm64 @@ -382,7 +382,7 @@ jobs: env: BINARY_NAME: prover BUNDLE_NAME: prover-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package_macos_arm64 + RAPIDSNARK_DIR: rapidsnark/package_macos_arm64 run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -395,7 +395,7 @@ jobs: env: BINARY_NAME: verifier BUNDLE_NAME: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }} - RAPIDSNARK_DIR: circom_circuits/rapidsnark/package_macos_arm64 + RAPIDSNARK_DIR: rapidsnark/package_macos_arm64 run: | BUNDLE_DIR="${BUNDLE_NAME}/${BINARY_NAME}" mkdir -p "$BUNDLE_DIR" @@ -421,7 +421,7 @@ jobs: with: circuit-name-display: "PoL" circuit-name-binary: "pol" - circuit-path: "circom_circuits/Mantle/pol.circom" + circuit-path: "mantle/pol.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -431,7 +431,7 @@ jobs: with: circuit-name-display: "PoQ" circuit-name-binary: "poq" - circuit-path: "circom_circuits/Blend/poq.circom" + circuit-path: "blend/poq.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -441,7 +441,7 @@ jobs: with: circuit-name-display: "ZKSign" circuit-name-binary: "zksign" - circuit-path: "circom_circuits/Mantle/signature.circom" + circuit-path: "mantle/signature.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} @@ -451,7 +451,7 @@ jobs: with: circuit-name-display: "PoC" circuit-name-binary: "poc" - circuit-path: "circom_circuits/Mantle/poc.circom" + circuit-path: "mantle/poc.circom" version: ${{ env.VERSION }} os: ${{ env.OS }} arch: ${{ env.ARCH }} diff --git a/.gitmodules b/.gitmodules index bd9bd13..b12f621 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "circomlib"] - path = circom_circuits/circomlib + path = circomlib url = https://github.com/iden3/circomlib.git [submodule "rapidsnark"] - path = circom_circuits/rapidsnark - url = https://github.com/iden3/rapidsnark + path = rapidsnark + url = https://github.com/iden3/rapidsnark.git diff --git a/blend/poq.circom b/blend/poq.circom index 86c82c0..158f4c5 100644 --- a/blend/poq.circom +++ b/blend/poq.circom @@ -5,7 +5,7 @@ include "../hash_bn/poseidon2_hash.circom"; include "../misc/constants.circom"; // defines NOMOS_KDF, SELECTION_RANDOMNESS, PROOF_NULLIFIER include "../misc/comparator.circom"; include "../circomlib/circuits/bitify.circom"; -include "../Mantle/pol_lib.circom"; // defines proof_of_leadership +include "../mantle/pol_lib.circom"; // defines proof_of_leadership include "../ledger/notes.circom"; /** diff --git a/circomlib b/circomlib new file mode 160000 index 0000000..35e54ea --- /dev/null +++ b/circomlib @@ -0,0 +1 @@ +Subproject commit 35e54ea21da3e8762557234298dbb553c175ea8d diff --git a/rapidsnark b/rapidsnark new file mode 160000 index 0000000..9983837 --- /dev/null +++ b/rapidsnark @@ -0,0 +1 @@ +Subproject commit 998383787ee86bcb6bfb8741e9a638d203c08eae