Skip to content
6 changes: 6 additions & 0 deletions .github/subway-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/update-known-good.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/update-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 2 additions & 10 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Loading