From e36be3e094f070c99996fa1020149f32fab7bbe7 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 12:40:25 +0100 Subject: [PATCH 01/14] ci: remove rust installation from contract tests --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1dc7849f3..681e8c2779 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,15 +200,6 @@ jobs: - name: 'Check out the repo' uses: 'actions/checkout@v4' - - name: Cache Rust dependencies - uses: ./.github/actions/cache-dependencies - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - target: wasm32-unknown-unknown - - name: pnpm-setup uses: pnpm/action-setup@v4 From 19afaa0c1bb0a3c7e667e434272eb02ae99304ed Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:04:52 +0100 Subject: [PATCH 02/14] ci: remove solc installation from build_enclave_cli --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 681e8c2779..09ac13a56e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -388,12 +388,6 @@ jobs: with: toolchain: ${{ env.RUST_TOOLCHAIN }} - - name: Install solc - run: | - sudo add-apt-repository ppa:ethereum/ethereum \ - && sudo apt-get update -y \ - && sudo apt-get install -y solc - - name: Build enclave CLI run: cargo install --locked --path crates/cli --bin enclave From d8a4a6a0c3247fbdf05196fb67525970188defb4 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:11:18 +0100 Subject: [PATCH 03/14] revert: add solc installation back to build_enclave_cli --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09ac13a56e..681e8c2779 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -388,6 +388,12 @@ jobs: with: toolchain: ${{ env.RUST_TOOLCHAIN }} + - name: Install solc + run: | + sudo add-apt-repository ppa:ethereum/ethereum \ + && sudo apt-get update -y \ + && sudo apt-get install -y solc + - name: Build enclave CLI run: cargo install --locked --path crates/cli --bin enclave From 8bd81da3072f298c3032aebf0184535145abcda9 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:14:30 +0100 Subject: [PATCH 04/14] ci: use NOIR_TOOLCHAIN environment variable --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 681e8c2779..151b134749 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ env: CIPHERNODE_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/ciphernode NODE_VERSION: 22 RUST_TOOLCHAIN: 1.86.0 + NOIR_TOOLCHAIN: v1.0.0-beta.15 HARDHAT_VAR_MNEMONIC: 'test test test test test test test test test test test junk' HARDHAT_VAR_INFURA_API_KEY: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' @@ -276,7 +277,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: - toolchain: v1.0.0-beta.15 + toolchain: ${{ env.NOIR_TOOLCHAIN }} - name: Install solc run: | @@ -429,7 +430,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: - toolchain: v1.0.0-beta.15 + toolchain: ${{ env.NOIR_TOOLCHAIN }} - name: Setup pnpm uses: pnpm/action-setup@v4 @@ -513,7 +514,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: - toolchain: v1.0.0-beta.15 + toolchain: ${{ env.NOIR_TOOLCHAIN }} - name: Install yq run: | @@ -563,7 +564,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: - toolchain: v1.0.0-beta.15 + toolchain: ${{ env.NOIR_TOOLCHAIN }} - name: Check formatting working-directory: ./circuits From 09548739c329580539e7681df8bf5634ef0e4fdb Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:26:49 +0100 Subject: [PATCH 05/14] ci: remove unnecessary builds in crisp workflows --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 151b134749..0f44b97ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -444,14 +444,11 @@ jobs: - name: Install dependencies working-directory: . - run: | - pnpm --version && pnpm install --frozen-lockfile && pnpm build:ts + run: pnpm install --frozen-lockfile - - name: Install solc - run: | - sudo add-apt-repository ppa:ethereum/ethereum \ - && sudo apt-get update -y \ - && sudo apt-get install -y solc + - name: Compile contracts + working-directory: . + run: pnpm evm:build - name: Run Rust tests working-directory: ./examples/CRISP @@ -522,8 +519,11 @@ jobs: - name: Install dependencies working-directory: . - run: | - pnpm --version && pnpm install --frozen-lockfile && pnpm build:ts + run: pnpm install --frozen-lockfile + + - name: Compile contracts + working-directory: . + run: pnpm evm:build - name: Install Playwright browsers working-directory: ./examples/CRISP From 8c1f7d77282738fdd63ab9cab97dcee20f42d845 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:31:55 +0100 Subject: [PATCH 06/14] revert: add solc installation back to crisp workflow --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f44b97ead..d4705ea400 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -446,10 +446,16 @@ jobs: working-directory: . run: pnpm install --frozen-lockfile - - name: Compile contracts + - name: Compile Enclave contracts working-directory: . run: pnpm evm:build + - name: Install solc + run: | + sudo add-apt-repository ppa:ethereum/ethereum \ + && sudo apt-get update -y \ + && sudo apt-get install -y solc + - name: Run Rust tests working-directory: ./examples/CRISP run: 'cargo test' @@ -521,7 +527,7 @@ jobs: working-directory: . run: pnpm install --frozen-lockfile - - name: Compile contracts + - name: Compile Enclave contracts working-directory: . run: pnpm evm:build From 1c8a7c66f70fcc4c08f9799a1b13885302da0d4c Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 13:42:22 +0100 Subject: [PATCH 07/14] ci: remove foundry installation from crisp workflow --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4705ea400..af21c60631 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -504,10 +504,6 @@ jobs: cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml - # We must install foundry in order to be able to test anvil - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Install solc run: | sudo add-apt-repository ppa:ethereum/ethereum \ From d98bc34860c8d920064ccb1ce98786133ece79de Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 15:09:44 +0100 Subject: [PATCH 08/14] ci: add crisp sdk artifacts to ci workflow --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++++++++-- examples/CRISP/scripts/test_e2e.sh | 2 +- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af21c60631..15962da08f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -408,6 +408,7 @@ jobs: # CRISP Unit Tests (Rust, JavaScript, Noir, Solidity) crisp_unit: runs-on: ubuntu-latest + needs: [build_crisp_sdk] steps: - uses: actions/checkout@v4 with: @@ -460,6 +461,12 @@ jobs: working-directory: ./examples/CRISP run: 'cargo test' + - name: Download Crisp SDK artifacts + uses: actions/download-artifact@v4 + with: + name: crisp-sdk-artifacts + path: ./ + - name: Run Noir tests working-directory: ./examples/CRISP run: 'pnpm test:circuits' @@ -470,12 +477,11 @@ jobs: - name: Run Solidity tests working-directory: ./examples/CRISP - run: 'pnpm build:sdk && pnpm test:contracts' + run: 'pnpm test:contracts' crisp_e2e: runs-on: ubuntu-latest - needs: [build_enclave_cli] - + needs: [build_enclave_cli, build_crisp_sdk] steps: - uses: actions/checkout@v4 with: @@ -527,6 +533,29 @@ jobs: working-directory: . run: pnpm evm:build + - name: Compile Crisp contracts + working-directory: ./examples/CRISP + run: pnpm compile:contracts + + - name: Copy environment variables + working-directory: ./examples/CRISP + run: | + cp server/.env.example server/.env + cp client/.env.example client/.env + cp .env.example .env + + - name: Build Crisp server and client + working-directory: ./examples/CRISP/server + run: | + cargo build --locked --bin cli + cargo build --locked --bin server + + - name: Download Crisp SDK artifacts + uses: actions/download-artifact@v4 + with: + name: crisp-sdk-artifacts + path: ./ + - name: Install Playwright browsers working-directory: ./examples/CRISP run: pnpm exec playwright install chromium @@ -668,6 +697,45 @@ jobs: retention-days: 1 if-no-files-found: warn + build_crisp_sdk: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'pnpm' + cache-dependency-path: pnpm-lock.yaml + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + targets: wasm32-unknown-unknown + + - name: Install node dependencies + run: pnpm install --frozen-lockfile + + - name: Build the sdk + working-directory: ./examples/CRISP + run: pnpm crisp:build + + - name: Upload SDK artifacts + uses: actions/upload-artifact@v4 + with: + name: crisp-sdk-artifacts + path: | + examples/CRISP/packages/crisp-sdk/dist + examples/CRISP/packages/crisp-zk-inputs/dist + examples/CRISP/circuits/target + retention-days: 1 + if-no-files-found: warn + template_integration: runs-on: ubuntu-latest needs: [build_enclave_cli, build_e3_support_dev, build_sdk] diff --git a/examples/CRISP/scripts/test_e2e.sh b/examples/CRISP/scripts/test_e2e.sh index 0927f8aee5..45f783683a 100755 --- a/examples/CRISP/scripts/test_e2e.sh +++ b/examples/CRISP/scripts/test_e2e.sh @@ -14,5 +14,5 @@ else fi echo "TEST E2E SCRIPT STARTING..." -pnpm concurrently -krs first "./scripts/setup.sh && ./scripts/dev.sh" "wait-on tcp:3000 && sleep 20 && ${PLAYWRIGHT_CMD} && sleep 3" +pnpm concurrently -krs first ./scripts/dev.sh "wait-on tcp:3000 && sleep 20 && ${PLAYWRIGHT_CMD} && sleep 3" \ No newline at end of file From 225c9940fe2de826f35ec687227ab8137ee1e364 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 15:11:52 +0100 Subject: [PATCH 09/14] ci: update crisp sdk build command --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15962da08f..097631fb06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -723,7 +723,7 @@ jobs: - name: Build the sdk working-directory: ./examples/CRISP - run: pnpm crisp:build + run: pnpm build:sdk - name: Upload SDK artifacts uses: actions/upload-artifact@v4 From cfeed9cf47b87f5355ee343e02b1e230cb4fa8d2 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 15:16:54 +0100 Subject: [PATCH 10/14] ci: add nargo installation to crisp sdk build workflow --- .github/workflows/ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 097631fb06..5b820f26b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -425,9 +425,6 @@ jobs: with: toolchain: ${{ env.RUST_TOOLCHAIN }} - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: @@ -516,11 +513,6 @@ jobs: && sudo apt-get update -y \ && sudo apt-get install -y solc - - name: Install Nargo - uses: noir-lang/noirup@v0.1.4 - with: - toolchain: ${{ env.NOIR_TOOLCHAIN }} - - name: Install yq run: | sudo wget -qO- https://github.com/mikefarah/yq/releases/download/v4.45.1/yq_linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin --transform='s|yq_linux_amd64|yq|' --no-same-owner @@ -712,6 +704,11 @@ jobs: cache: 'pnpm' cache-dependency-path: pnpm-lock.yaml + - name: Install Nargo + uses: noir-lang/noirup@v0.1.4 + with: + toolchain: ${{ env.NOIR_TOOLCHAIN }} + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: From 5633f25fe408e2f0a2b3fd8df450b0a35f1fae15 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 15:28:57 +0100 Subject: [PATCH 11/14] revert: add foundry to crisp_unit workflow --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b820f26b9..1742ce4e87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -425,6 +425,9 @@ jobs: with: toolchain: ${{ env.RUST_TOOLCHAIN }} + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: From 2bf2cab3c266b29b51bc140567f0234879bfc7d7 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 15:50:27 +0100 Subject: [PATCH 12/14] ci: update crisp sdk artifacts path in ci workflow --- .github/workflows/ci.yml | 11 +++++------ examples/CRISP/packages/crisp-sdk/package.json | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1742ce4e87..47bdbf3aaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -405,7 +405,6 @@ jobs: path: ~/.cargo/bin/enclave retention-days: 1 - # CRISP Unit Tests (Rust, JavaScript, Noir, Solidity) crisp_unit: runs-on: ubuntu-latest needs: [build_crisp_sdk] @@ -465,7 +464,7 @@ jobs: uses: actions/download-artifact@v4 with: name: crisp-sdk-artifacts - path: ./ + path: ./examples/CRISP - name: Run Noir tests working-directory: ./examples/CRISP @@ -549,7 +548,7 @@ jobs: uses: actions/download-artifact@v4 with: name: crisp-sdk-artifacts - path: ./ + path: ./examples/CRISP - name: Install Playwright browsers working-directory: ./examples/CRISP @@ -730,9 +729,9 @@ jobs: with: name: crisp-sdk-artifacts path: | - examples/CRISP/packages/crisp-sdk/dist - examples/CRISP/packages/crisp-zk-inputs/dist - examples/CRISP/circuits/target + packages/crisp-sdk/dist + packages/crisp-zk-inputs/dist + circuits/target retention-days: 1 if-no-files-found: warn diff --git a/examples/CRISP/packages/crisp-sdk/package.json b/examples/CRISP/packages/crisp-sdk/package.json index b6b7d4d682..2cd4228bbb 100644 --- a/examples/CRISP/packages/crisp-sdk/package.json +++ b/examples/CRISP/packages/crisp-sdk/package.json @@ -24,7 +24,7 @@ "compile:circuit": "cd ../../circuits && nargo compile", "build:wasm": "pnpm -C ../crisp-zk-inputs build", "build": "pnpm build:wasm && pnpm compile:circuit && tsup", - "test": "pnpm build:wasm && pnpm compile:circuit && vitest --run" + "test": "vitest --run" }, "publishConfig": { "access": "public" From 29ca7cef78e51c93594e0e13a834961c9b313133 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 18:20:38 +0100 Subject: [PATCH 13/14] ci: update crisp sdk artifacts path --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47bdbf3aaa..5510a4396e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -729,9 +729,9 @@ jobs: with: name: crisp-sdk-artifacts path: | - packages/crisp-sdk/dist - packages/crisp-zk-inputs/dist - circuits/target + examples/CRISP/packages/crisp-sdk/dist + examples/CRISP/packages/crisp-zk-inputs/dist + examples/CRISP/circuits/target retention-days: 1 if-no-files-found: warn From 189372c3b0091c10e9b2f1d3e91152de6b0cd7cd Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 16 Dec 2025 18:36:21 +0100 Subject: [PATCH 14/14] ci: update crisp-e2e workflow naming --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5510a4396e..6f17d2a886 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -538,7 +538,7 @@ jobs: cp client/.env.example client/.env cp .env.example .env - - name: Build Crisp server and client + - name: Build Crisp server and CLI binaries working-directory: ./examples/CRISP/server run: | cargo build --locked --bin cli