From dffc17ef6e69703d0de8469a9b1319671d01a2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 19 May 2026 23:25:24 +0000 Subject: [PATCH 1/7] Install Subway from upstream `v0.1.0` musl release in `ci.yml` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switches `cargo install --git` to a `curl | tar -xz` of the released static binary (https://github.com/AcalaNetwork/subway/releases/tag/v0.1.0, published by AcalaNetwork/subway#202). Removes the Rust toolchain install, Subway-HEAD commit-hash lookup, and Swatinem cache layer that existed only to amortise the `cargo install` cost — none of them have any other consumer in this workflow. --- .github/workflows/ci.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91eefc588..17a0364fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,21 +55,12 @@ jobs: - run: yarn --immutable - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Get Subway commit hash - id: subway-commit - run: echo "hash=$(git ls-remote https://github.com/AcalaNetwork/subway HEAD | cut -f1)" >> $GITHUB_OUTPUT - - - name: Cache Subway binary - uses: Swatinem/rust-cache@v2 - with: - shared-key: subway-binary-${{ steps.subway-commit.outputs.hash }} - save-if: ${{ github.ref == 'refs/heads/master' }} - - name: Install Subway - run: cargo install --git https://github.com/AcalaNetwork/subway + run: | + curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + | sudo tar -xz -C /usr/local/bin + sudo chmod +x /usr/local/bin/subway + subway --version - name: Source known good block numbers run: | From d93f0b677c553146944efcf8dd3e26dc804d0a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 19 May 2026 23:25:50 +0000 Subject: [PATCH 2/7] Install Subway from upstream `v0.1.0` musl release in `update-known-good.yml` Same swap as the previous commit, applied to the periodic block-number update workflow. --- .github/workflows/update-known-good.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-known-good.yml b/.github/workflows/update-known-good.yml index 71c963b44..c2aa281dd 100644 --- a/.github/workflows/update-known-good.yml +++ b/.github/workflows/update-known-good.yml @@ -91,21 +91,12 @@ jobs: # Subway is a WebSocket proxy that caches RPC responses, avoiding # rate-limiting from production endpoints during test runs - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Get Subway commit hash - id: subway-commit - run: echo "hash=$(git ls-remote https://github.com/AcalaNetwork/subway HEAD | cut -f1)" >> $GITHUB_OUTPUT - - - name: Cache Subway binary - uses: Swatinem/rust-cache@v2 - with: - shared-key: subway-binary-${{ steps.subway-commit.outputs.hash }} - save-if: ${{ github.ref == 'refs/heads/master' }} - - name: Install Subway - run: cargo install --git https://github.com/AcalaNetwork/subway + run: | + curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + | sudo tar -xz -C /usr/local/bin + sudo chmod +x /usr/local/bin/subway + subway --version # Start one Subway instance per chain in this network, each on its own port - name: Start all Subway instances From 923956171f4aa1dc1f4d393061080ab6f5bd716e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 19 May 2026 23:26:10 +0000 Subject: [PATCH 3/7] Install Subway from upstream `v0.1.0` musl release in `update-snapshot.yml` Same swap as the previous two commits, applied to the snapshot-update workflow. --- .github/workflows/update-snapshot.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index fcd86a04b..e03aaf639 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -41,21 +41,12 @@ jobs: - run: yarn --immutable - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Get Subway commit hash - id: subway-commit - run: echo "hash=$(git ls-remote https://github.com/AcalaNetwork/subway HEAD | cut -f1)" >> $GITHUB_OUTPUT - - - name: Cache Subway binary - uses: Swatinem/rust-cache@v2 - with: - shared-key: subway-binary-${{ steps.subway-commit.outputs.hash }} - save-if: ${{ github.ref == 'refs/heads/master' }} - - name: Install Subway - run: cargo install --git https://github.com/AcalaNetwork/subway + run: | + curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + | sudo tar -xz -C /usr/local/bin + sudo chmod +x /usr/local/bin/subway + subway --version - name: Update known good block numbers run: yarn update-known-good From cf42f8343bca7072153098f439b078f141ed07dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 19 May 2026 23:32:44 +0000 Subject: [PATCH 4/7] Fail Subway download fast on HTTP errors (`curl -f`) Without `-f`, an HTTP 4xx/5xx response (e.g. release deleted, GitHub degraded) leaves `curl` exiting zero with the error body on stdout, and the downstream `tar -xz` fails with a confusing "not in gzip format" message instead. Per review on PR #622. --- .github/workflows/ci.yml | 2 +- .github/workflows/update-known-good.yml | 2 +- .github/workflows/update-snapshot.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17a0364fc..933fc7d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: - name: Install Subway run: | - curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ | sudo tar -xz -C /usr/local/bin sudo chmod +x /usr/local/bin/subway subway --version diff --git a/.github/workflows/update-known-good.yml b/.github/workflows/update-known-good.yml index c2aa281dd..c760d03dd 100644 --- a/.github/workflows/update-known-good.yml +++ b/.github/workflows/update-known-good.yml @@ -93,7 +93,7 @@ jobs: # rate-limiting from production endpoints during test runs - name: Install Subway run: | - curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ | sudo tar -xz -C /usr/local/bin sudo chmod +x /usr/local/bin/subway subway --version diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index e03aaf639..c77400082 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -43,7 +43,7 @@ jobs: - name: Install Subway run: | - curl -sSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ + curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ | sudo tar -xz -C /usr/local/bin sudo chmod +x /usr/local/bin/subway subway --version From 1cae9094969d9a836b64a2be8ad12dd784a4f589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 20 May 2026 13:18:08 +0000 Subject: [PATCH 5/7] Install Subway by extracting binary from `acala/subway:v0.1.1` Docker image The `v0.1.1` GitHub Release at AcalaNetwork/subway is missing its `x86_64-unknown-linux-musl.tar.gz` asset; the release workflow's `Build release binary` step failed (`cargo build --locked` mismatched the bumped `Cargo.toml` version), so the upload was skipped. The upstream tag still produces a working Docker image because `docker.yml` doesn't use `--locked`, so `acala/subway:v0.1.1` is the only working consumption path for v0.1.1. The image's binary lives at `/usr/local/bin/subway` (per Subway's Dockerfile); copying it out with `docker create` + `docker cp` lands in roughly the same wall time as the curl-and-untar path and unblocks consumption of PR #203's `request_timeout_seconds` config field. --- .github/workflows/ci.yml | 5 +++-- .github/workflows/update-known-good.yml | 5 +++-- .github/workflows/update-snapshot.yml | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 933fc7d03..d3344523d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,8 +57,9 @@ jobs: - name: Install Subway run: | - curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ - | sudo tar -xz -C /usr/local/bin + docker create --name subway-extract acala/subway:v0.1.1 + sudo docker cp subway-extract:/usr/local/bin/subway /usr/local/bin/subway + docker rm subway-extract sudo chmod +x /usr/local/bin/subway subway --version diff --git a/.github/workflows/update-known-good.yml b/.github/workflows/update-known-good.yml index c760d03dd..216e932a0 100644 --- a/.github/workflows/update-known-good.yml +++ b/.github/workflows/update-known-good.yml @@ -93,8 +93,9 @@ jobs: # rate-limiting from production endpoints during test runs - name: Install Subway run: | - curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ - | sudo tar -xz -C /usr/local/bin + docker create --name subway-extract acala/subway:v0.1.1 + sudo docker cp subway-extract:/usr/local/bin/subway /usr/local/bin/subway + docker rm subway-extract sudo chmod +x /usr/local/bin/subway subway --version diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index c77400082..c30a48015 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -43,8 +43,9 @@ jobs: - name: Install Subway run: | - curl -fsSL https://github.com/AcalaNetwork/subway/releases/download/v0.1.0/subway-v0.1.0-x86_64-unknown-linux-musl.tar.gz \ - | sudo tar -xz -C /usr/local/bin + docker create --name subway-extract acala/subway:v0.1.1 + sudo docker cp subway-extract:/usr/local/bin/subway /usr/local/bin/subway + docker rm subway-extract sudo chmod +x /usr/local/bin/subway subway --version From eba74f44334f55b330e9715dc7c86fab735eb5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 20 May 2026 13:19:04 +0000 Subject: [PATCH 6/7] Set Subway per-upstream `request_timeout_seconds` to 90s Subway's default per-upstream request timeout is 30s. With three Acala public RPC endpoints, heavy storage queries that take longer than 30s cause Subway to cycle through all three endpoints (~90s) before any single upstream has a chance to respond, and the test-side waiting client times out. `request_timeout_seconds` was added to `ClientConfig` in AcalaNetwork/subway#203 (Subway v0.1.1+). Setting it to 90 lets a single upstream attempt run long enough to complete those queries instead of being preempted by Subway's own per-endpoint clock. The companion exclusion of Acala tests in `vitest.config.mts` is intentionally left in place; this commit only restores Subway's ability to wait long enough. Lifting the exclusion is a separate verification step. --- .github/subway-template.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/subway-template.yml b/.github/subway-template.yml index 1a7c0fb35..e8a1b6229 100644 --- a/.github/subway-template.yml +++ b/.github/subway-template.yml @@ -7,6 +7,12 @@ extensions: # the failover ladder on stall/disconnect via its existing rotation # logic, so an initial bias toward array[0] doesn't sacrifice resilience. shuffle_endpoints: false + # Heavy upstream queries (e.g. Acala storage at the pinned block) can take + # longer than Subway's default 30s per-upstream timeout. Without this, + # Subway cycles through the entire endpoint list before any single + # upstream has a chance to respond. Requires Subway >= v0.1.1 + # (AcalaNetwork/subway#203). + request_timeout_seconds: 90 event_bus: substrate_api: stale_timeout_seconds: 180 From 71448cd098baca4f01039a6a8f247e94a44f90b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 20 May 2026 13:45:02 +0000 Subject: [PATCH 7/7] Re-enable Acala test suites `request_timeout_seconds: 90` on Subway's upstream client (added to `subway-template.yml` in the previous commit) gives Subway enough time per upstream attempt for Acala storage queries to land before the 30s default forced it to cycle endpoints. The exclusion added in PR #621 is no longer needed and is removed; the exclusion comment is narrowed to bifrostKusama, which still lacks a workable endpoint set. --- vitest.config.mts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/vitest.config.mts b/vitest.config.mts index 613be8d29..d4a081b5a 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -20,21 +20,13 @@ export default defineConfig({ passWithNoTests: true, retry: 1, reporters: process.env.GITHUB_ACTIONS ? ['verbose', 'github-actions'] : ['default'], - // Excluded chains: - // - // - bifrostKusama: only Liebi public endpoint (us./hk./generic) is configured, - // and the only currently-reachable host prunes the state CI needs. - // - acala: Subway hardcodes its per-upstream request_timeout to 30s and - // doesn't expose it in `ClientConfig`, so heavy Acala storage queries - // that take >30s force Subway to cycle through the 3 Liebi endpoints, - // none of which respond inside the chopsticks rpcTimeout (90s here). - // Unblock via an upstream Subway fix (`request_timeout` in YAML). + // bifrostKusama is excluded: only Liebi public endpoints are configured, + // and the only currently-reachable host prunes the state CI needs. exclude: [ '**/node_modules/**', '**/.git/**', 'packages/kusama/src/bifrostKusama.*.test.ts', 'packages/kusama/src/karura.bifrostKusama.xcm.test.ts', - 'packages/polkadot/src/acala.*.test.ts', ], }, build: {