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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91eefc588..d3344523d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,21 +55,13 @@ 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: | + 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 - name: Source known good block numbers run: | diff --git a/.github/workflows/update-known-good.yml b/.github/workflows/update-known-good.yml index 71c963b44..216e932a0 100644 --- a/.github/workflows/update-known-good.yml +++ b/.github/workflows/update-known-good.yml @@ -91,21 +91,13 @@ 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: | + 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 # Start one Subway instance per chain in this network, each on its own port - name: Start all Subway instances diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index fcd86a04b..c30a48015 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -41,21 +41,13 @@ 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: | + 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 - name: Update known good block numbers run: yarn update-known-good 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: {