From e3ac7b6905e96ba33190c700ff5b23753f246936 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 17:33:34 -0300 Subject: [PATCH 01/30] fix: add integration-tests cache key --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1064cc54c0..257b38ec6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,7 +133,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-integration-tests prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: Start test node @@ -243,7 +243,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-integration-tests prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: Start test node @@ -283,7 +283,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-integration-tests prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: Start test node From c33a6255dc17d280907233d51eaaa0f1e28d761c Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 18:34:18 -0300 Subject: [PATCH 02/30] feat: improve caching --- .github/workflows/build.yml | 4 +-- .github/workflows/lint.yml | 18 ++++++------- .github/workflows/test.yml | 42 +++++++++++++++++++++++------- scripts/start-binary-bg.sh | 17 +++++++++--- scripts/start-note-transport-bg.sh | 12 ++++++--- 5 files changed, 65 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9008231450..d71049229a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build @@ -51,7 +51,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build-wasm + shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cdf5c6110b..e9d03ecdfe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -88,7 +88,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy @@ -107,7 +107,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build-wasm + shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy-wasm @@ -122,12 +122,12 @@ jobs: run: | rustup update --no-self-update nightly rustup +nightly component add rustfmt - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 + - name: Install Node.js + uses: actions/setup-node@v4 with: - shared-key: rust-build - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + node-version: "20" + cache: yarn + cache-dependency-path: yarn.lock - name: Install prettier run: yarn install - name: make - format-check @@ -153,7 +153,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build-wasm + shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install dependencies @@ -181,7 +181,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - doc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 257b38ec6c..8e225edf4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - uses: taiki-e/install-action@v2 @@ -50,7 +50,7 @@ jobs: - uses: actions/checkout@v6 - uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build + shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install rust @@ -73,6 +73,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: yarn + cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Run unit tests @@ -93,6 +95,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: yarn + cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Install Playwright browsers @@ -115,6 +119,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: yarn + cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Build React SDK @@ -133,9 +139,19 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-integration-tests + shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} + - name: Restore node-builder binary + uses: actions/cache@v4 + with: + path: target/release/node-builder + key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} + - name: Restore note-transport binary + uses: actions/cache@v4 + with: + path: target/note-transport/release/miden-note-transport + key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background - name: Start note transport @@ -164,7 +180,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-build-wasm + shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} @@ -172,6 +188,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: yarn + cache-dependency-path: crates/web-client/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh crates/web-client @@ -240,12 +258,11 @@ jobs: node-version: "20" - name: Configure setuid sandbox run: . ./scripts/configure-sandbox.sh - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 + - name: Restore node-builder binary + uses: actions/cache@v4 with: - shared-key: rust-integration-tests - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + path: target/release/node-builder + key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background - name: Run web client tests @@ -283,9 +300,14 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-integration-tests + shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} + - name: Restore node-builder binary + uses: actions/cache@v4 + with: + path: target/release/node-builder + key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background - name: Start prover diff --git a/scripts/start-binary-bg.sh b/scripts/start-binary-bg.sh index d9cc144f60..bfd097561f 100755 --- a/scripts/start-binary-bg.sh +++ b/scripts/start-binary-bg.sh @@ -9,12 +9,21 @@ fi; PACKAGE_NAME="$1" -if ! cargo build --release --package "$PACKAGE_NAME" --locked; then - echo "Failed to build $PACKAGE_NAME" - exit 1 +# Resolve the workspace target directory (handles being called from subcrates) +TARGET_DIR=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4) +TARGET_DIR="${TARGET_DIR:-target}" +BINARY_PATH="$TARGET_DIR/release/$PACKAGE_NAME" + +if [ -x "$BINARY_PATH" ]; then + echo "$PACKAGE_NAME binary found, skipping build" +else + if ! cargo build --release --package "$PACKAGE_NAME" --locked; then + echo "Failed to build $PACKAGE_NAME" + exit 1 + fi; fi; -RUST_LOG=none cargo run --release --package "$PACKAGE_NAME" --locked & echo $! > .$PACKAGE_NAME.pid; +RUST_LOG=none "$BINARY_PATH" & echo $! > .$PACKAGE_NAME.pid; sleep 4; if ! ps -p $(cat .$PACKAGE_NAME.pid) > /dev/null; then echo "Failed to start $PACKAGE_NAME"; diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index 8d87cfc667..68c4e979e3 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -33,11 +33,17 @@ else git -C "$TRANSPORT_DIR" reset --hard "origin/$BRANCH" fi -echo "Building note transport service..." -( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) +BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport" + +if [ -x "$BINARY_PATH" ]; then + echo "Note transport binary found, skipping build" +else + echo "Building note transport service..." + ( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) +fi echo "Starting note transport service in background..." -( cd "$TRANSPORT_DIR" && RUST_LOG=info CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" $RUN_CMD ) & echo $! > "$PID_FILE" +RUST_LOG=info "$BINARY_PATH" & echo $! > "$PID_FILE" sleep 4 From 4e008071f3292224dcd2d851ad980a0e39bcef67 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 18:35:28 -0300 Subject: [PATCH 03/30] test: cmoment out save-if --- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 8 ++++---- .github/workflows/test.yml | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71049229a..77ae96c8fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - build run: make build build-wasm: @@ -53,6 +53,6 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - build-wasm run: make build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e9d03ecdfe..d7b8705411 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -90,7 +90,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - clippy run: make clippy @@ -109,7 +109,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - clippy-wasm run: make clippy-wasm @@ -155,7 +155,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: Install dependencies working-directory: crates/web-client run: yarn install --frozen-lockfile @@ -183,6 +183,6 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - doc run: make doc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e225edf4f..40624a208a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - uses: taiki-e/install-action@v2 with: tool: nextest@0.9.122 @@ -52,7 +52,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: Install rust run: rustup update --no-self-update - name: Run doc-tests @@ -141,7 +141,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: Restore node-builder binary uses: actions/cache@v4 with: @@ -182,7 +182,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: Install Node.js uses: actions/setup-node@v4 @@ -302,7 +302,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: Restore node-builder binary uses: actions/cache@v4 with: From 80ed7c476e08804c44fb753787b7523084435e45 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 18:41:15 -0300 Subject: [PATCH 04/30] fix: remove yarn cache --- .github/workflows/lint.yml | 10 ---------- .github/workflows/test.yml | 8 -------- .github/workflows/wallet-pages.yml | 5 ----- 3 files changed, 23 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d7b8705411..1da294e540 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -122,12 +122,6 @@ jobs: run: | rustup update --no-self-update nightly rustup +nightly component add rustfmt - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: yarn - cache-dependency-path: yarn.lock - name: Install prettier run: yarn install - name: make - format-check @@ -142,10 +136,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - cache: yarn - cache-dependency-path: | - crates/web-client/yarn.lock - crates/idxdb-store/src/yarn.lock - name: Install Rust with wasm target run: | rustup update --no-self-update diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40624a208a..83798d6c85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,8 +73,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: yarn - cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Run unit tests @@ -95,8 +93,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: yarn - cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Install Playwright browsers @@ -119,8 +115,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: yarn - cache-dependency-path: packages/react-sdk/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh packages/react-sdk - name: Build React SDK @@ -188,8 +182,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: yarn - cache-dependency-path: crates/web-client/yarn.lock - name: Install dependencies run: ./scripts/retry-yarn-install.sh crates/web-client diff --git a/.github/workflows/wallet-pages.yml b/.github/workflows/wallet-pages.yml index 0fb269b829..bfdb70cd6a 100644 --- a/.github/workflows/wallet-pages.yml +++ b/.github/workflows/wallet-pages.yml @@ -17,11 +17,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: yarn - cache-dependency-path: | - yarn.lock - packages/react-sdk/yarn.lock - packages/react-sdk/examples/wallet/yarn.lock - name: Install root dependencies run: yarn install --frozen-lockfile - name: Build react sdk From 77462773ab1f07638f26b827d7a546c2a630d31e Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 18:48:46 -0300 Subject: [PATCH 05/30] feat: note transport cache --- .github/workflows/test.yml | 6 +++++- scripts/start-note-transport-bg.sh | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83798d6c85..fb03041a19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,8 +144,12 @@ jobs: - name: Restore note-transport binary uses: actions/cache@v4 with: - path: target/note-transport/release/miden-note-transport + path: | + target/note-transport/release/miden-note-transport + target/note-transport/.build-hash key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-note-transport- - name: Start test node run: make start-node-background - name: Start note transport diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index 68c4e979e3..f7cbd9952e 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -13,7 +13,6 @@ BRANCH=${TRANSPORT_BRANCH:-main} TRANSPORT_DIR=${TRANSPORT_DIR:-.tmp/miden-note-transport} REPO_URL=${REPO_URL:-https://github.com/0xMiden/miden-note-transport} -RUN_CMD=${TRANSPORT_RUN_CMD:-cargo run --release --locked} # Shared target directory (important for CI speed: ends up under repo `target/` which is cached) TRANSPORT_CARGO_TARGET_DIR=${TRANSPORT_CARGO_TARGET_DIR:-"$REPO_ROOT/target/note-transport"} @@ -34,12 +33,15 @@ else fi BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport" +BUILD_HASH_FILE="$TRANSPORT_CARGO_TARGET_DIR/.build-hash" +CURRENT_HASH=$(git -C "$TRANSPORT_DIR" rev-parse HEAD) -if [ -x "$BINARY_PATH" ]; then - echo "Note transport binary found, skipping build" +if [ -x "$BINARY_PATH" ] && [ -f "$BUILD_HASH_FILE" ] && [ "$(cat "$BUILD_HASH_FILE")" = "$CURRENT_HASH" ]; then + echo "Note transport binary found (built from $CURRENT_HASH), skipping build" else - echo "Building note transport service..." + echo "Building note transport service (commit $CURRENT_HASH)..." ( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) + echo "$CURRENT_HASH" > "$BUILD_HASH_FILE" fi echo "Starting note transport service in background..." From 182f4fa98c1751ca82f7ee35661db0015eee6ee2 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 23 Feb 2026 19:07:24 -0300 Subject: [PATCH 06/30] fix: node builder binary name --- .github/workflows/test.yml | 6 +++--- Makefile | 2 +- scripts/start-binary-bg.sh | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb03041a19..200b8146ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,7 +139,7 @@ jobs: - name: Restore node-builder binary uses: actions/cache@v4 with: - path: target/release/node-builder + path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Restore note-transport binary uses: actions/cache@v4 @@ -257,7 +257,7 @@ jobs: - name: Restore node-builder binary uses: actions/cache@v4 with: - path: target/release/node-builder + path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background @@ -302,7 +302,7 @@ jobs: - name: Restore node-builder binary uses: actions/cache@v4 with: - path: target/release/node-builder + path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background diff --git a/Makefile b/Makefile index 39ffd480ac..af5b4a1567 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ start-node: ## Start the testing node server .PHONY: start-node-background start-node-background: ## Start the testing node server in background - ./scripts/start-binary-bg.sh node-builder + ./scripts/start-binary-bg.sh node-builder testing-node-builder .PHONY: stop-node stop-node: ## Stop the testing node server diff --git a/scripts/start-binary-bg.sh b/scripts/start-binary-bg.sh index bfd097561f..1d40ed4cf2 100755 --- a/scripts/start-binary-bg.sh +++ b/scripts/start-binary-bg.sh @@ -3,16 +3,17 @@ # Starts the binary in the background and checks that it has not exited if [ -z "$1" ]; then - echo "Usage: $0 " + echo "Usage: $0 [binary-name]" exit 1 fi; PACKAGE_NAME="$1" +BINARY_NAME="${2:-$PACKAGE_NAME}" # Resolve the workspace target directory (handles being called from subcrates) TARGET_DIR=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4) TARGET_DIR="${TARGET_DIR:-target}" -BINARY_PATH="$TARGET_DIR/release/$PACKAGE_NAME" +BINARY_PATH="$TARGET_DIR/release/$BINARY_NAME" if [ -x "$BINARY_PATH" ]; then echo "$PACKAGE_NAME binary found, skipping build" From 5ffbed4d4e241c36bdf4acbe35c1e3374ba03eb9 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 00:38:32 -0300 Subject: [PATCH 07/30] fix: note-transport cache --- .github/workflows/test.yml | 2 +- scripts/start-note-transport-bg.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 200b8146ab..4aa1dc8409 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -145,7 +145,7 @@ jobs: uses: actions/cache@v4 with: path: | - target/note-transport/release/miden-note-transport + target/note-transport/release/miden-note-transport-node-bin target/note-transport/.build-hash key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} restore-keys: | diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index f7cbd9952e..e093e5bb0b 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -32,7 +32,7 @@ else git -C "$TRANSPORT_DIR" reset --hard "origin/$BRANCH" fi -BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport" +BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport-node-bin" BUILD_HASH_FILE="$TRANSPORT_CARGO_TARGET_DIR/.build-hash" CURRENT_HASH=$(git -C "$TRANSPORT_DIR" rev-parse HEAD) From edc6fa9fb0ea8a877e586d3170226d8728fedb5c Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 10:24:27 -0300 Subject: [PATCH 08/30] test CI From 8b06ba0e51f46fba1b30a75d82a00f8511f2d4df Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 10:31:36 -0300 Subject: [PATCH 09/30] add cache key nightly --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1da294e540..8221ef2805 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -171,7 +171,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-release + shared-key: rust-nightly-release prefix-key: ${{ env.RUST_CACHE_KEY }} # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing - name: make - doc From b4217796b70b588be49da830ea260e92867a0968 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 14:34:51 -0300 Subject: [PATCH 10/30] feat: restore yarn cache --- .github/workflows/lint.yml | 4 ++++ .github/workflows/wallet-pages.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8221ef2805..ce10fd92bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -136,6 +136,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 + cache: yarn + cache-dependency-path: | + crates/web-client/yarn.lock + crates/idxdb-store/src/yarn.lock - name: Install Rust with wasm target run: | rustup update --no-self-update diff --git a/.github/workflows/wallet-pages.yml b/.github/workflows/wallet-pages.yml index bfdb70cd6a..c67424769c 100644 --- a/.github/workflows/wallet-pages.yml +++ b/.github/workflows/wallet-pages.yml @@ -17,6 +17,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" + cache: yarn + cache-dependency-path: | + packages/react-sdk/yarn.lock + packages/react-sdk/examples/wallet/yarn.lock - name: Install root dependencies run: yarn install --frozen-lockfile - name: Build react sdk From d53f60115db996dc5c0e90ed2ddbca5ba59af289 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 15:26:18 -0300 Subject: [PATCH 11/30] feat: uncomment save-if --- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 8 ++++---- .github/workflows/test.yml | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77ae96c8fd..d71049229a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build run: make build build-wasm: @@ -53,6 +53,6 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build-wasm run: make build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ce10fd92bc..913b686a01 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -90,7 +90,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy run: make clippy @@ -109,7 +109,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy-wasm run: make clippy-wasm @@ -149,7 +149,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install dependencies working-directory: crates/web-client run: yarn install --frozen-lockfile @@ -177,6 +177,6 @@ jobs: with: shared-key: rust-nightly-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - doc run: make doc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4aa1dc8409..5cce7aa429 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - uses: taiki-e/install-action@v2 with: tool: nextest@0.9.122 @@ -52,7 +52,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install rust run: rustup update --no-self-update - name: Run doc-tests @@ -135,7 +135,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Restore node-builder binary uses: actions/cache@v4 with: @@ -180,7 +180,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install Node.js uses: actions/setup-node@v4 @@ -298,7 +298,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # save-if: ${{ github.ref == 'refs/heads/next' }} # TODO: uncomment after testing + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Restore node-builder binary uses: actions/cache@v4 with: From 10877044c4107fcb6094301d67cdecb25ff537f7 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 15:34:01 -0300 Subject: [PATCH 12/30] chore: simplify note-transport cache --- .github/workflows/test.yml | 6 +----- scripts/start-note-transport-bg.sh | 9 +++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5cce7aa429..db3688ddad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,12 +144,8 @@ jobs: - name: Restore note-transport binary uses: actions/cache@v4 with: - path: | - target/note-transport/release/miden-note-transport-node-bin - target/note-transport/.build-hash + path: target/note-transport/release/miden-note-transport-node-bin key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-note-transport- - name: Start test node run: make start-node-background - name: Start note transport diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index e093e5bb0b..944ac7459f 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -33,15 +33,12 @@ else fi BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport-node-bin" -BUILD_HASH_FILE="$TRANSPORT_CARGO_TARGET_DIR/.build-hash" -CURRENT_HASH=$(git -C "$TRANSPORT_DIR" rev-parse HEAD) -if [ -x "$BINARY_PATH" ] && [ -f "$BUILD_HASH_FILE" ] && [ "$(cat "$BUILD_HASH_FILE")" = "$CURRENT_HASH" ]; then - echo "Note transport binary found (built from $CURRENT_HASH), skipping build" +if [ -x "$BINARY_PATH" ]; then + echo "Note transport binary found, skipping build" else - echo "Building note transport service (commit $CURRENT_HASH)..." + echo "Building note transport service..." ( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) - echo "$CURRENT_HASH" > "$BUILD_HASH_FILE" fi echo "Starting note transport service in background..." From f64aac10826bc3996b1dad06248736dbef4d50fa Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 16:20:01 -0300 Subject: [PATCH 13/30] chore: simplify start binary script --- Makefile | 2 +- scripts/start-binary-bg.sh | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index af5b4a1567..0c058d1e04 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ start-node: ## Start the testing node server .PHONY: start-node-background start-node-background: ## Start the testing node server in background - ./scripts/start-binary-bg.sh node-builder testing-node-builder + ./scripts/start-binary-bg.sh testing-node-builder .PHONY: stop-node stop-node: ## Stop the testing node server diff --git a/scripts/start-binary-bg.sh b/scripts/start-binary-bg.sh index 1d40ed4cf2..8fc02dd943 100755 --- a/scripts/start-binary-bg.sh +++ b/scripts/start-binary-bg.sh @@ -3,12 +3,11 @@ # Starts the binary in the background and checks that it has not exited if [ -z "$1" ]; then - echo "Usage: $0 [binary-name]" + echo "Usage: $0 " exit 1 fi; -PACKAGE_NAME="$1" -BINARY_NAME="${2:-$PACKAGE_NAME}" +BINARY_NAME="$1" # Resolve the workspace target directory (handles being called from subcrates) TARGET_DIR=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4) @@ -16,19 +15,19 @@ TARGET_DIR="${TARGET_DIR:-target}" BINARY_PATH="$TARGET_DIR/release/$BINARY_NAME" if [ -x "$BINARY_PATH" ]; then - echo "$PACKAGE_NAME binary found, skipping build" + echo "$BINARY_NAME binary found, skipping build" else - if ! cargo build --release --package "$PACKAGE_NAME" --locked; then - echo "Failed to build $PACKAGE_NAME" + if ! cargo build --release --bin "$BINARY_NAME" --locked; then + echo "Failed to build $BINARY_NAME" exit 1 fi; fi; -RUST_LOG=none "$BINARY_PATH" & echo $! > .$PACKAGE_NAME.pid; +RUST_LOG=none "$BINARY_PATH" & echo $! > .$BINARY_NAME.pid; sleep 4; -if ! ps -p $(cat .$PACKAGE_NAME.pid) > /dev/null; then - echo "Failed to start $PACKAGE_NAME"; - rm -f .$PACKAGE_NAME.pid; +if ! ps -p $(cat .$BINARY_NAME.pid) > /dev/null; then + echo "Failed to start $BINARY_NAME"; + rm -f .$BINARY_NAME.pid; exit 1; fi; -rm -f .$PACKAGE_NAME.pid +rm -f .$BINARY_NAME.pid From bfd157758d878970f4096dfdd5c4c81ed17ec06b Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Tue, 24 Feb 2026 17:22:59 -0300 Subject: [PATCH 14/30] review: add separate cache for prover binary --- .github/workflows/test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db3688ddad..8c54939fd5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -289,17 +289,16 @@ jobs: - name: Configure setuid sandbox run: . ./scripts/configure-sandbox.sh - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-release - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} - name: Restore node-builder binary uses: actions/cache@v4 with: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} + - name: Restore prover binary + uses: actions/cache@v4 + with: + path: target/release/testing-remote-prover + key: ${{ runner.os }}-prover-${{ hashFiles('Cargo.lock') }} - name: Start test node run: make start-node-background - name: Start prover From 91c0c2566db9fa98b198667309a805049be40908 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 01:59:07 -0300 Subject: [PATCH 15/30] chore: build node and note-transport once on miss --- .github/workflows/lint.yml | 4 +- .github/workflows/test.yml | 63 ++++++++++++++++++++++++------ Makefile | 2 +- scripts/start-binary-bg.sh | 29 +++++--------- scripts/start-note-transport-bg.sh | 13 ++---- 5 files changed, 69 insertions(+), 42 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 913b686a01..bca9659ac0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -109,7 +109,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - name: make - clippy-wasm run: make clippy-wasm @@ -149,7 +149,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - name: Install dependencies working-directory: crates/web-client run: yarn install --frozen-lockfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c54939fd5..4fbd535a1c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - uses: taiki-e/install-action@v2 with: tool: nextest@0.9.122 @@ -52,7 +52,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - name: Install rust run: rustup update --no-self-update - name: Run doc-tests @@ -120,9 +120,46 @@ jobs: - name: Build React SDK run: cd ./packages/react-sdk && yarn build + build-node-builder: + name: Build node-builder + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + - name: Install Rust + run: rustup update --no-self-update + - name: Restore node-builder binary + id: cache-node-builder + uses: actions/cache@v4 + with: + path: target/release/testing-node-builder + key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} + - name: Build node-builder + if: steps.cache-node-builder.outputs.cache-hit != 'true' + run: cargo build --release --package node-builder --locked + + build-note-transport: + name: Build note-transport + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + - name: Install Rust + run: rustup update --no-self-update + - name: Restore note-transport binary + id: cache-note-transport + uses: actions/cache@v4 + with: + path: target/note-transport/release/miden-note-transport-node-bin + key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} + - name: Build note-transport + if: steps.cache-note-transport.outputs.cache-hit != 'true' + run: | + git clone --depth=1 -b main https://github.com/0xMiden/miden-note-transport .tmp/miden-note-transport + cd .tmp/miden-note-transport && CARGO_TARGET_DIR="$GITHUB_WORKSPACE/target/note-transport" cargo build --release --locked + integration-tests: name: Run integration tests runs-on: ubuntu-24.04 + needs: [build-node-builder, build-note-transport] steps: - uses: actions/checkout@v6 - name: Install Rust @@ -135,14 +172,14 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - name: Restore node-builder binary - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Restore note-transport binary - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: target/note-transport/release/miden-note-transport-node-bin key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} @@ -176,7 +213,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + save-if: false - name: Install Node.js uses: actions/setup-node@v4 @@ -201,7 +238,7 @@ jobs: uses: actions/cache/restore@v4 with: path: ./crates/web-client/dist - key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock', './crates/web-client/src/**/*.ts', './crates/web-client/pkg/**/*.wasm') }} + key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock', './crates/web-client/src/**/*.ts', './crates/web-client/src/**/*.rs', 'Cargo.lock') }} restore-keys: ${{ runner.os }}-dist- - name: Build project @@ -226,7 +263,7 @@ jobs: integration-tests-web-client: name: Run integration tests for web client runs-on: ubuntu-24.04 - needs: [ build-web-client-dist-folder ] + needs: [build-web-client-dist-folder, build-node-builder] strategy: matrix: shard_index: [1, 2, 3, 4, 5, 6] @@ -251,7 +288,7 @@ jobs: - name: Configure setuid sandbox run: . ./scripts/configure-sandbox.sh - name: Restore node-builder binary - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} @@ -269,7 +306,7 @@ jobs: integration-tests-remote-prover-web-client: name: Run integration tests for remote prover runs-on: ubuntu-24.04 - needs: [ build-web-client-dist-folder ] + needs: [build-web-client-dist-folder, build-node-builder] steps: - uses: actions/checkout@v6 - name: Install Rust @@ -290,15 +327,19 @@ jobs: - name: Configure setuid sandbox run: . ./scripts/configure-sandbox.sh - name: Restore node-builder binary - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Restore prover binary + id: cache-prover uses: actions/cache@v4 with: path: target/release/testing-remote-prover key: ${{ runner.os }}-prover-${{ hashFiles('Cargo.lock') }} + - name: Build prover + if: steps.cache-prover.outputs.cache-hit != 'true' + run: cargo build --release --package testing-remote-prover --locked - name: Start test node run: make start-node-background - name: Start prover diff --git a/Makefile b/Makefile index 0c058d1e04..39ffd480ac 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ start-node: ## Start the testing node server .PHONY: start-node-background start-node-background: ## Start the testing node server in background - ./scripts/start-binary-bg.sh testing-node-builder + ./scripts/start-binary-bg.sh node-builder .PHONY: stop-node stop-node: ## Stop the testing node server diff --git a/scripts/start-binary-bg.sh b/scripts/start-binary-bg.sh index 8fc02dd943..d9cc144f60 100755 --- a/scripts/start-binary-bg.sh +++ b/scripts/start-binary-bg.sh @@ -3,31 +3,22 @@ # Starts the binary in the background and checks that it has not exited if [ -z "$1" ]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi; -BINARY_NAME="$1" +PACKAGE_NAME="$1" -# Resolve the workspace target directory (handles being called from subcrates) -TARGET_DIR=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | grep -o '"target_directory":"[^"]*"' | head -1 | cut -d'"' -f4) -TARGET_DIR="${TARGET_DIR:-target}" -BINARY_PATH="$TARGET_DIR/release/$BINARY_NAME" - -if [ -x "$BINARY_PATH" ]; then - echo "$BINARY_NAME binary found, skipping build" -else - if ! cargo build --release --bin "$BINARY_NAME" --locked; then - echo "Failed to build $BINARY_NAME" - exit 1 - fi; +if ! cargo build --release --package "$PACKAGE_NAME" --locked; then + echo "Failed to build $PACKAGE_NAME" + exit 1 fi; -RUST_LOG=none "$BINARY_PATH" & echo $! > .$BINARY_NAME.pid; +RUST_LOG=none cargo run --release --package "$PACKAGE_NAME" --locked & echo $! > .$PACKAGE_NAME.pid; sleep 4; -if ! ps -p $(cat .$BINARY_NAME.pid) > /dev/null; then - echo "Failed to start $BINARY_NAME"; - rm -f .$BINARY_NAME.pid; +if ! ps -p $(cat .$PACKAGE_NAME.pid) > /dev/null; then + echo "Failed to start $PACKAGE_NAME"; + rm -f .$PACKAGE_NAME.pid; exit 1; fi; -rm -f .$BINARY_NAME.pid +rm -f .$PACKAGE_NAME.pid diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index 944ac7459f..8d87cfc667 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -13,6 +13,7 @@ BRANCH=${TRANSPORT_BRANCH:-main} TRANSPORT_DIR=${TRANSPORT_DIR:-.tmp/miden-note-transport} REPO_URL=${REPO_URL:-https://github.com/0xMiden/miden-note-transport} +RUN_CMD=${TRANSPORT_RUN_CMD:-cargo run --release --locked} # Shared target directory (important for CI speed: ends up under repo `target/` which is cached) TRANSPORT_CARGO_TARGET_DIR=${TRANSPORT_CARGO_TARGET_DIR:-"$REPO_ROOT/target/note-transport"} @@ -32,17 +33,11 @@ else git -C "$TRANSPORT_DIR" reset --hard "origin/$BRANCH" fi -BINARY_PATH="$TRANSPORT_CARGO_TARGET_DIR/release/miden-note-transport-node-bin" - -if [ -x "$BINARY_PATH" ]; then - echo "Note transport binary found, skipping build" -else - echo "Building note transport service..." - ( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) -fi +echo "Building note transport service..." +( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) echo "Starting note transport service in background..." -RUST_LOG=info "$BINARY_PATH" & echo $! > "$PID_FILE" +( cd "$TRANSPORT_DIR" && RUST_LOG=info CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" $RUN_CMD ) & echo $! > "$PID_FILE" sleep 4 From 235681c3b7526f05c2bcc4dcebdf873e1cb617c2 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 02:01:06 -0300 Subject: [PATCH 16/30] chore: adjust path --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fbd535a1c..9ac66a240b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -279,7 +279,7 @@ jobs: uses: actions/download-artifact@v4 with: name: web-client-artifacts - path: ./crates/web-client + path: ./crates/web-client/dist - name: Install Node.js uses: actions/setup-node@v4 @@ -322,7 +322,7 @@ jobs: uses: actions/download-artifact@v4 with: name: web-client-artifacts - path: ./crates/web-client + path: ./crates/web-client/dist - name: Configure setuid sandbox run: . ./scripts/configure-sandbox.sh From 37c5aab86b880a5257b0bb2775a0e004372e0d34 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 02:10:34 -0300 Subject: [PATCH 17/30] chore: rename jobs --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 16 ++++++++-------- .github/workflows/nightly.yml | 4 ++-- .github/workflows/test.yml | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71049229a..7370c9552d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: - name: make - build run: make build build-wasm: - name: Build Client for wasm + name: Build Client for Wasm runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bca9659ac0..f1283e902e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ env: jobs: unused_deps: - name: check for unused dependencies + name: Check for unused dependencies runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 @@ -24,7 +24,7 @@ jobs: uses: bnjbvr/cargo-machete@main typos: - name: spellcheck + name: Spellcheck runs-on: ubuntu-24.04 timeout-minutes: 5 steps: @@ -35,7 +35,7 @@ jobs: - run: make typos-check toml: - name: toml formatting + name: Toml formatting runs-on: ubuntu-24.04 timeout-minutes: 5 steps: @@ -46,14 +46,14 @@ jobs: - run: make toml-check eslint: - name: "Typescript eslint checks" + name: Typescript eslint checks runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - run: make rust-client-ts-lint react-sdk-lint: - name: "React SDK lint and typecheck" + name: React SDK lint and typecheck runs-on: ubuntu-24.04 needs: [wasm-bindgen-types] steps: @@ -114,7 +114,7 @@ jobs: run: make clippy-wasm format: - name: format check + name: Format check runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 @@ -128,7 +128,7 @@ jobs: run: make format-check wasm-bindgen-types: - name: wasm bindgen types + name: Wasm bindgen types runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 @@ -166,7 +166,7 @@ jobs: path: ./crates/web-client/dist rustdocs: - name: build rust documentation + name: Build rust documentation runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 22689fdb18..892511a13c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,7 +14,7 @@ permissions: jobs: # Run tests on the beta channel to provide feedback for Rust team. beta-test: - name: test on beta channel + name: Test on beta channel runs-on: ubuntu-24.04 timeout-minutes: 30 steps: @@ -32,7 +32,7 @@ jobs: # Check that our MSRV complies with our specified rust version. # Each workspace package is verified independently via a matrix for clear per-package errors. workspace-packages: - name: list packages + name: List packages runs-on: ubuntu-24.04 outputs: packages: ${{ steps.package-matrix.outputs.packages }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ac66a240b..973c9449f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ env: jobs: test: - name: Test Rust + name: Unit tests runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 @@ -44,7 +44,7 @@ jobs: run: make test doc-tests: - name: doc-tests + name: Documentation tests runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 @@ -59,7 +59,7 @@ jobs: run: make test-docs test-react-sdk: - name: Test React SDK + name: React SDK tests runs-on: ubuntu-24.04 needs: [build-web-client-dist-folder] steps: @@ -157,7 +157,7 @@ jobs: cd .tmp/miden-note-transport && CARGO_TARGET_DIR="$GITHUB_WORKSPACE/target/note-transport" cargo build --release --locked integration-tests: - name: Run integration tests + name: Integration tests runs-on: ubuntu-24.04 needs: [build-node-builder, build-note-transport] steps: @@ -261,7 +261,7 @@ jobs: path: ./crates/web-client/dist integration-tests-web-client: - name: Run integration tests for web client + name: Integration tests for web client runs-on: ubuntu-24.04 needs: [build-web-client-dist-folder, build-node-builder] strategy: @@ -304,7 +304,7 @@ jobs: run: make stop-node integration-tests-remote-prover-web-client: - name: Run integration tests for remote prover + name: Integration tests for remote prover runs-on: ubuntu-24.04 needs: [build-web-client-dist-folder, build-node-builder] steps: From 77afa7cc15cdb9998c87c0c09fb20420c28cf3c6 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 09:35:17 -0300 Subject: [PATCH 18/30] chore: avoid rebuilding binaries on cache hit --- .github/workflows/test.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 973c9449f6..c9d6ac951e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -184,19 +184,23 @@ jobs: path: target/note-transport/release/miden-note-transport-node-bin key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} - name: Start test node - run: make start-node-background + run: | + RUST_LOG=none target/release/testing-node-builder & + sleep 4 + pgrep -f testing-node-builder || (echo "Failed to start node" && exit 1) - name: Start note transport - run: make start-note-transport-background + run: | + RUST_LOG=none target/note-transport/release/miden-note-transport-node-bin & + sleep 4 + pgrep -f miden-note-transport-node-bin || (echo "Failed to start note transport" && exit 1) - name: Run integration tests run: make integration-test-full - name: Stop test node if: always() - run: | - make stop-node + run: make stop-node - name: Stop note transport if: always() - run: | - make stop-note-transport + run: make stop-note-transport build-web-client-dist-folder: name: Build Web Client @@ -293,7 +297,10 @@ jobs: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - name: Start test node - run: make start-node-background + run: | + RUST_LOG=none target/release/testing-node-builder & + sleep 4 + pgrep -f testing-node-builder || (echo "Failed to start node" && exit 1) - name: Run web client tests run: | make integration-test-web-client @@ -341,9 +348,15 @@ jobs: if: steps.cache-prover.outputs.cache-hit != 'true' run: cargo build --release --package testing-remote-prover --locked - name: Start test node - run: make start-node-background + run: | + RUST_LOG=none target/release/testing-node-builder & + sleep 4 + pgrep -f testing-node-builder || (echo "Failed to start node" && exit 1) - name: Start prover - run: make start-prover-background + run: | + RUST_LOG=none target/release/testing-remote-prover & + sleep 4 + pgrep -f testing-remote-prover || (echo "Failed to start prover" && exit 1) - name: Run remote prover tests run: make integration-test-remote-prover-web-client - name: Stop test node From 8d0d2173803b603511ffd125762008a4b0aaf823 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 12:38:43 -0300 Subject: [PATCH 19/30] chore: install note-transport via git install --- .github/workflows/test.yml | 12 ++++------ scripts/start-note-transport-bg.sh | 37 ++++++------------------------ scripts/start-note-transport.sh | 36 ++++++----------------------- 3 files changed, 19 insertions(+), 66 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9d6ac951e..e126b0dce3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -148,13 +148,11 @@ jobs: id: cache-note-transport uses: actions/cache@v4 with: - path: target/note-transport/release/miden-note-transport-node-bin + path: ~/.cargo/bin/miden-note-transport-node-bin key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} - - name: Build note-transport + - name: Install note-transport if: steps.cache-note-transport.outputs.cache-hit != 'true' - run: | - git clone --depth=1 -b main https://github.com/0xMiden/miden-note-transport .tmp/miden-note-transport - cd .tmp/miden-note-transport && CARGO_TARGET_DIR="$GITHUB_WORKSPACE/target/note-transport" cargo build --release --locked + run: cargo install --git https://github.com/0xMiden/miden-note-transport --locked integration-tests: name: Integration tests @@ -181,7 +179,7 @@ jobs: - name: Restore note-transport binary uses: actions/cache/restore@v4 with: - path: target/note-transport/release/miden-note-transport-node-bin + path: ~/.cargo/bin/miden-note-transport-node-bin key: ${{ runner.os }}-note-transport-${{ hashFiles('Cargo.lock') }} - name: Start test node run: | @@ -190,7 +188,7 @@ jobs: pgrep -f testing-node-builder || (echo "Failed to start node" && exit 1) - name: Start note transport run: | - RUST_LOG=none target/note-transport/release/miden-note-transport-node-bin & + RUST_LOG=none miden-note-transport-node-bin & sleep 4 pgrep -f miden-note-transport-node-bin || (echo "Failed to start note transport" && exit 1) - name: Run integration tests diff --git a/scripts/start-note-transport-bg.sh b/scripts/start-note-transport-bg.sh index 8d87cfc667..9e812df274 100755 --- a/scripts/start-note-transport-bg.sh +++ b/scripts/start-note-transport-bg.sh @@ -1,43 +1,21 @@ #!/bin/bash -# Starts the external Note Transport service in the background. -# - Default: clones/updates the note transport repo and runs it via cargo +# Starts the Note Transport service in the background. +# Installs it via cargo install if not already available. set -euo pipefail -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" - -# NOTE: This should be in line with `miden-note-transport-proto-build`'s version in Cargo.toml -BRANCH=${TRANSPORT_BRANCH:-main} - -TRANSPORT_DIR=${TRANSPORT_DIR:-.tmp/miden-note-transport} REPO_URL=${REPO_URL:-https://github.com/0xMiden/miden-note-transport} -RUN_CMD=${TRANSPORT_RUN_CMD:-cargo run --release --locked} - -# Shared target directory (important for CI speed: ends up under repo `target/` which is cached) -TRANSPORT_CARGO_TARGET_DIR=${TRANSPORT_CARGO_TARGET_DIR:-"$REPO_ROOT/target/note-transport"} - +BINARY_NAME=miden-note-transport-node-bin PID_FILE=.note-transport.pid -mkdir -p "$(dirname "$TRANSPORT_DIR")" -mkdir -p "$TRANSPORT_CARGO_TARGET_DIR" - -if [ ! -d "$TRANSPORT_DIR/.git" ]; then - echo "Cloning note transport repo (branch: $BRANCH) into $TRANSPORT_DIR"; - git clone --depth=1 -b "$BRANCH" "$REPO_URL" "$TRANSPORT_DIR" -else - echo "Updating note transport repo in $TRANSPORT_DIR (branch: $BRANCH)"; - git -C "$TRANSPORT_DIR" fetch --prune origin "$BRANCH" - git -C "$TRANSPORT_DIR" checkout "$BRANCH" - git -C "$TRANSPORT_DIR" reset --hard "origin/$BRANCH" +if ! command -v "$BINARY_NAME" &>/dev/null; then + echo "Installing note transport service..." + cargo install --git "$REPO_URL" --locked fi -echo "Building note transport service..." -( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) - echo "Starting note transport service in background..." -( cd "$TRANSPORT_DIR" && RUST_LOG=info CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" $RUN_CMD ) & echo $! > "$PID_FILE" +RUST_LOG=info "$BINARY_NAME" & echo $! > "$PID_FILE" sleep 4 @@ -61,4 +39,3 @@ if ! ps -p "$PID" > /dev/null 2>&1; then fi echo "Note transport service started (pid $PID)" - diff --git a/scripts/start-note-transport.sh b/scripts/start-note-transport.sh index 9b3ddc8e66..33ad305130 100755 --- a/scripts/start-note-transport.sh +++ b/scripts/start-note-transport.sh @@ -1,39 +1,17 @@ #!/bin/bash -# Starts the external Note Transport service in the foreground. -# - Default: clones/updates the note transport repo and runs it via cargo +# Starts the Note Transport service in the foreground. +# Installs it via cargo install if not already available. set -euo pipefail -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" - -# NOTE: This should be in line with `miden-note-transport-proto-build`'s version in Cargo.toml -BRANCH=${TRANSPORT_BRANCH:-main} - -TRANSPORT_DIR=${TRANSPORT_DIR:-.tmp/miden-note-transport} REPO_URL=${REPO_URL:-https://github.com/0xMiden/miden-note-transport} -RUN_CMD=${TRANSPORT_RUN_CMD:-cargo run --release --locked} - -# Shared target directory (important for CI speed: ends up under repo `target/` which is cached) -TRANSPORT_CARGO_TARGET_DIR=${TRANSPORT_CARGO_TARGET_DIR:-"$REPO_ROOT/target/note-transport"} +BINARY_NAME=miden-note-transport-node-bin -mkdir -p "$(dirname "$TRANSPORT_DIR")" -mkdir -p "$TRANSPORT_CARGO_TARGET_DIR" - -if [ ! -d "$TRANSPORT_DIR/.git" ]; then - echo "Cloning note transport repo (branch: $BRANCH) into $TRANSPORT_DIR"; - git clone --depth=1 -b "$BRANCH" "$REPO_URL" "$TRANSPORT_DIR" -else - echo "Updating note transport repo in $TRANSPORT_DIR (branch: $BRANCH)"; - git -C "$TRANSPORT_DIR" fetch --prune origin "$BRANCH" - git -C "$TRANSPORT_DIR" checkout "$BRANCH" - git -C "$TRANSPORT_DIR" reset --hard "origin/$BRANCH" +if ! command -v "$BINARY_NAME" &>/dev/null; then + echo "Installing note transport service..." + cargo install --git "$REPO_URL" --locked fi -echo "Building note transport service..." -( cd "$TRANSPORT_DIR" && CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" cargo build --release --locked ) - echo "Starting note transport service in foreground..." -cd "$TRANSPORT_DIR" -RUST_LOG=info CARGO_TARGET_DIR="$TRANSPORT_CARGO_TARGET_DIR" exec $RUN_CMD +RUST_LOG=info exec "$BINARY_NAME" From 0b2d975a414acdf9f079c448317ecdddabbf65bc Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 12:45:04 -0300 Subject: [PATCH 20/30] review: add TODO comment --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f1283e902e..e931d140c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -175,7 +175,7 @@ jobs: - name: Add Rust Cache uses: Swatinem/rust-cache@v2 with: - shared-key: rust-nightly-release + shared-key: rust-nightly-release # TODO: remove once https://github.com/rust-lang/rust/pull/150055 gets stabilized. prefix-key: ${{ env.RUST_CACHE_KEY }} save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - doc From 556d455bc28abae86cd8e364a261793ab9de697a Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 14:49:43 -0300 Subject: [PATCH 21/30] chore: restore rust cache for wasm tests --- .github/workflows/test.yml | 12 ++++++++++++ Makefile | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e126b0dce3..4dd0cd571e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -276,6 +276,12 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-wasm + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Fetch dist folder uses: actions/download-artifact@v4 @@ -318,6 +324,12 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-wasm + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Install Node.js uses: actions/setup-node@v4 with: diff --git a/Makefile b/Makefile index 39ffd480ac..5e99c1939b 100644 --- a/Makefile +++ b/Makefile @@ -30,8 +30,8 @@ clippy: ## Run Clippy with configs. We need two separate commands because the `t .PHONY: clippy-wasm clippy-wasm: rust-client-ts-build ## Run Clippy for the wasm packages (web client and idxdb store) - cargo clippy --package miden-client-web --target wasm32-unknown-unknown --all-targets -- -D warnings - cargo clippy --package miden-idxdb-store --target wasm32-unknown-unknown --all-targets -- -D warnings + cargo clippy --package miden-client-web --target wasm32-unknown-unknown --release --all-targets -- -D warnings + cargo clippy --package miden-idxdb-store --target wasm32-unknown-unknown --release --all-targets -- -D warnings .PHONY: fix fix: ## Run Fix with configs, building tests with proper features to avoid type split. @@ -202,8 +202,8 @@ build: ## Build the CLI binary, client library and tests binary in release mode cargo build --package miden-client-integration-tests --release --locked build-wasm: rust-client-ts-build ## Build the wasm packages (web client and idxdb store) - CODEGEN=1 cargo build --package miden-client-web --target wasm32-unknown-unknown --locked - cargo build --package miden-idxdb-store --target wasm32-unknown-unknown --locked + CODEGEN=1 cargo build --package miden-client-web --target wasm32-unknown-unknown --release --locked + cargo build --package miden-idxdb-store --target wasm32-unknown-unknown --release --locked .PHONY: rust-client-ts-build rust-client-ts-build: From 1bcf57ee4281fdd13cb4a3f1dae943f8ca4690cc Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 15:22:40 -0300 Subject: [PATCH 22/30] test: temporarily write to cache --- .github/workflows/build.yml | 6 ++++-- .github/workflows/lint.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7370c9552d..c848d70d00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,8 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging + save-if: true - name: make - build run: make build build-wasm: @@ -53,6 +54,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging + save-if: true - name: make - build-wasm run: make build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e931d140c7..6f0fa0f08f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -90,7 +90,8 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging + save-if: true - name: make - clippy run: make clippy @@ -177,6 +178,7 @@ jobs: with: shared-key: rust-nightly-release # TODO: remove once https://github.com/rust-lang/rust/pull/150055 gets stabilized. prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} + # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging + save-if: true - name: make - doc run: make doc From 7d83c466f705f33611cfeb0a9671e703b18e2016 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 16:28:53 -0300 Subject: [PATCH 23/30] Revert "test: temporarily write to cache" This reverts commit 1bcf57ee4281fdd13cb4a3f1dae943f8ca4690cc. --- .github/workflows/build.yml | 6 ++---- .github/workflows/lint.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c848d70d00..7370c9552d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,8 +36,7 @@ jobs: with: shared-key: rust-release prefix-key: ${{ env.RUST_CACHE_KEY }} - # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging - save-if: true + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build run: make build build-wasm: @@ -54,7 +53,6 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging - save-if: true + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build-wasm run: make build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f0fa0f08f..e931d140c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -90,8 +90,7 @@ jobs: with: shared-key: rust-debug prefix-key: ${{ env.RUST_CACHE_KEY }} - # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging - save-if: true + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy run: make clippy @@ -178,7 +177,6 @@ jobs: with: shared-key: rust-nightly-release # TODO: remove once https://github.com/rust-lang/rust/pull/150055 gets stabilized. prefix-key: ${{ env.RUST_CACHE_KEY }} - # TODO: restore to save-if: ${{ github.ref == 'refs/heads/next' }} before merging - save-if: true + save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - doc run: make doc From d62e01da40250789a7d5187f23bea66f26ebbf97 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 17:18:50 -0300 Subject: [PATCH 24/30] chore: remove rust-wasm, rust-debug, rust-nightly-release cache entries --- .github/workflows/build.yml | 6 ------ .github/workflows/lint.yml | 25 ------------------------- .github/workflows/test.yml | 24 ------------------------ 3 files changed, 55 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7370c9552d..99e4a407e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,11 +48,5 @@ jobs: run: rustup update --no-self-update - name: Add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - build-wasm run: make build-wasm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e931d140c7..57f36d03d8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,6 @@ concurrency: env: CARGO_PROFILE_DEV_DEBUG: 0 - RUST_CACHE_KEY: rust-cache-2026.02.18 jobs: unused_deps: @@ -85,12 +84,6 @@ jobs: run: | rustup update --no-self-update rustup component add clippy - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-debug - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - clippy run: make clippy @@ -104,12 +97,6 @@ jobs: rustup update --no-self-update rustup target add wasm32-unknown-unknown rustup component add clippy - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - name: make - clippy-wasm run: make clippy-wasm @@ -144,12 +131,6 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - name: Install dependencies working-directory: crates/web-client run: yarn install --frozen-lockfile @@ -172,11 +153,5 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust run: rustup update --no-self-update - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-nightly-release # TODO: remove once https://github.com/rust-lang/rust/pull/150055 gets stabilized. - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: ${{ github.ref == 'refs/heads/next' }} - name: make - doc run: make doc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4dd0cd571e..7821bc05af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,11 +48,6 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-debug - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - name: Install rust run: rustup update --no-self-update - name: Run doc-tests @@ -210,13 +205,6 @@ jobs: rustup update --no-self-update rustup target add wasm32-unknown-unknown - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - - name: Install Node.js uses: actions/setup-node@v4 with: @@ -276,12 +264,6 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - name: Fetch dist folder uses: actions/download-artifact@v4 @@ -324,12 +306,6 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: rust-wasm - prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: false - name: Install Node.js uses: actions/setup-node@v4 with: From b1df45a1ec80ddd18c08e4766102c11842ef5787 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 18:36:00 -0300 Subject: [PATCH 25/30] chore: restore rust-wasm --- .github/workflows/test.yml | 18 ++++++++++++++++++ Makefile | 8 ++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7821bc05af..fc7292a52d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -204,6 +204,12 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-wasm + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: true # TODO: change back to ${{ github.ref == 'refs/heads/next' }} - name: Install Node.js uses: actions/setup-node@v4 @@ -264,6 +270,12 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-wasm + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Fetch dist folder uses: actions/download-artifact@v4 @@ -306,6 +318,12 @@ jobs: run: | rustup update --no-self-update rustup target add wasm32-unknown-unknown + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-wasm + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Install Node.js uses: actions/setup-node@v4 with: diff --git a/Makefile b/Makefile index 5e99c1939b..39ffd480ac 100644 --- a/Makefile +++ b/Makefile @@ -30,8 +30,8 @@ clippy: ## Run Clippy with configs. We need two separate commands because the `t .PHONY: clippy-wasm clippy-wasm: rust-client-ts-build ## Run Clippy for the wasm packages (web client and idxdb store) - cargo clippy --package miden-client-web --target wasm32-unknown-unknown --release --all-targets -- -D warnings - cargo clippy --package miden-idxdb-store --target wasm32-unknown-unknown --release --all-targets -- -D warnings + cargo clippy --package miden-client-web --target wasm32-unknown-unknown --all-targets -- -D warnings + cargo clippy --package miden-idxdb-store --target wasm32-unknown-unknown --all-targets -- -D warnings .PHONY: fix fix: ## Run Fix with configs, building tests with proper features to avoid type split. @@ -202,8 +202,8 @@ build: ## Build the CLI binary, client library and tests binary in release mode cargo build --package miden-client-integration-tests --release --locked build-wasm: rust-client-ts-build ## Build the wasm packages (web client and idxdb store) - CODEGEN=1 cargo build --package miden-client-web --target wasm32-unknown-unknown --release --locked - cargo build --package miden-idxdb-store --target wasm32-unknown-unknown --release --locked + CODEGEN=1 cargo build --package miden-client-web --target wasm32-unknown-unknown --locked + cargo build --package miden-idxdb-store --target wasm32-unknown-unknown --locked .PHONY: rust-client-ts-build rust-client-ts-build: From cb9c63a6e7779e2342993ca284cf253dfcff9c99 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Wed, 25 Feb 2026 18:49:15 -0300 Subject: [PATCH 26/30] chore: save rust-wasm cache --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc7292a52d..1ef483348d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -209,7 +209,7 @@ jobs: with: shared-key: rust-wasm prefix-key: ${{ env.RUST_CACHE_KEY }} - save-if: true # TODO: change back to ${{ github.ref == 'refs/heads/next' }} + save-if: ${{ github.ref == 'refs/heads/next' }} - name: Install Node.js uses: actions/setup-node@v4 From e673a6e6aeaba0d38cfaa524b91f7a327cbcbfae Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Fri, 27 Feb 2026 14:00:44 -0300 Subject: [PATCH 27/30] chore: add build-remote-prover job --- .github/workflows/test.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ef483348d..02a2d1e46e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -149,6 +149,23 @@ jobs: if: steps.cache-note-transport.outputs.cache-hit != 'true' run: cargo install --git https://github.com/0xMiden/miden-note-transport --locked + build-remote-prover: + name: Build remote-prover + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + - name: Install Rust + run: rustup update --no-self-update + - name: Restore remote-prover binary + id: cache-remote-prover + uses: actions/cache@v4 + with: + path: target/release/testing-remote-prover + key: ${{ runner.os }}-prover-${{ hashFiles('Cargo.lock') }} + - name: Build remote-prover + if: steps.cache-remote-prover.outputs.cache-hit != 'true' + run: cargo build --release --package testing-remote-prover --locked + integration-tests: name: Integration tests runs-on: ubuntu-24.04 @@ -311,7 +328,7 @@ jobs: integration-tests-remote-prover-web-client: name: Integration tests for remote prover runs-on: ubuntu-24.04 - needs: [build-web-client-dist-folder, build-node-builder] + needs: [build-web-client-dist-folder, build-node-builder, build-remote-prover] steps: - uses: actions/checkout@v6 - name: Install Rust @@ -342,15 +359,11 @@ jobs: with: path: target/release/testing-node-builder key: ${{ runner.os }}-node-builder-${{ hashFiles('Cargo.lock') }} - - name: Restore prover binary - id: cache-prover - uses: actions/cache@v4 + - name: Restore remote-prover binary + uses: actions/cache/restore@v4 with: path: target/release/testing-remote-prover key: ${{ runner.os }}-prover-${{ hashFiles('Cargo.lock') }} - - name: Build prover - if: steps.cache-prover.outputs.cache-hit != 'true' - run: cargo build --release --package testing-remote-prover --locked - name: Start test node run: | RUST_LOG=none target/release/testing-node-builder & From c724d28b8b408be126b2dca6fd4ba252da0def88 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 2 Mar 2026 01:45:48 -0300 Subject: [PATCH 28/30] chore: add rust cache for prover and node-builder jobs --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02a2d1e46e..4902e70318 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,6 +122,12 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust run: rustup update --no-self-update + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-release + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Restore node-builder binary id: cache-node-builder uses: actions/cache@v4 @@ -156,6 +162,12 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust run: rustup update --no-self-update + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: rust-release + prefix-key: ${{ env.RUST_CACHE_KEY }} + save-if: false - name: Restore remote-prover binary id: cache-remote-prover uses: actions/cache@v4 From cffd5148ca20d8cae2fb84c58a8064fd5529e740 Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 2 Mar 2026 11:11:37 -0300 Subject: [PATCH 29/30] chore: format --- crates/rust-client/src/rpc/domain/account.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/crates/rust-client/src/rpc/domain/account.rs b/crates/rust-client/src/rpc/domain/account.rs index f70ee92944..fac1a7617d 100644 --- a/crates/rust-client/src/rpc/domain/account.rs +++ b/crates/rust-client/src/rpc/domain/account.rs @@ -5,16 +5,8 @@ use core::fmt::{self, Debug, Display, Formatter}; use miden_protocol::Word; use miden_protocol::account::{ - Account, - AccountCode, - AccountHeader, - AccountId, - AccountStorageHeader, - StorageMap, - StorageMapWitness, - StorageSlotHeader, - StorageSlotName, - StorageSlotType, + Account, AccountCode, AccountHeader, AccountId, AccountStorageHeader, StorageMap, + StorageMapWitness, StorageSlotHeader, StorageSlotName, StorageSlotType, }; use miden_protocol::asset::Asset; use miden_protocol::block::BlockNumber; @@ -671,8 +663,7 @@ impl From for Vec Vec { - use account_detail_request; - use account_detail_request::storage_map_detail_request; + use account_detail_request::{self, storage_map_detail_request}; let request_map = value.0; let mut requests = Vec::with_capacity(request_map.len()); for (slot_name, _map_keys) in request_map { From 69cc9a1ba3e6e0a0585211ee835dd3b183e025ed Mon Sep 17 00:00:00 2001 From: tomasarrachea Date: Mon, 2 Mar 2026 11:38:30 -0300 Subject: [PATCH 30/30] chore: lint --- crates/rust-client/src/rpc/domain/account.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/rust-client/src/rpc/domain/account.rs b/crates/rust-client/src/rpc/domain/account.rs index fac1a7617d..cc1b609787 100644 --- a/crates/rust-client/src/rpc/domain/account.rs +++ b/crates/rust-client/src/rpc/domain/account.rs @@ -5,8 +5,16 @@ use core::fmt::{self, Debug, Display, Formatter}; use miden_protocol::Word; use miden_protocol::account::{ - Account, AccountCode, AccountHeader, AccountId, AccountStorageHeader, StorageMap, - StorageMapWitness, StorageSlotHeader, StorageSlotName, StorageSlotType, + Account, + AccountCode, + AccountHeader, + AccountId, + AccountStorageHeader, + StorageMap, + StorageMapWitness, + StorageSlotHeader, + StorageSlotName, + StorageSlotType, }; use miden_protocol::asset::Asset; use miden_protocol::block::BlockNumber;