diff --git a/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch b/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch new file mode 100644 index 000000000..ca6e38fe6 --- /dev/null +++ b/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch @@ -0,0 +1,86 @@ +diff --git a/dist/cjs/index.d.ts b/dist/cjs/index.d.ts +index e072ffe6156827581272398cf9acd9352d1b502b..ecec2991498332c287c47f35546932126141b001 100644 +--- a/dist/cjs/index.d.ts ++++ b/dist/cjs/index.d.ts +@@ -23,6 +23,8 @@ export type SetupOption = { + db?: string; + /** Connection timeout in milliseconds */ + timeout?: number; ++ /** Upstream RPC timeout in milliseconds (chopsticks -> upstream/proxy). Forwarded as rpc-timeout. */ ++ rpcTimeout?: number; + /** Host address to bind the server to */ + host?: string; + /** Port number to bind the server to */ +@@ -52,7 +54,7 @@ export type SetupConfig = Config & { + * @param options - Setup options for the network + * @returns Configuration object compatible with chopsticks + */ +-export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; ++export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; + /** + * Sets up a blockchain network context using provided options + * @param option - Setup options for the network +diff --git a/dist/cjs/index.js b/dist/cjs/index.js +index 68a4dfb2ef3443eaf662482bd64d66fbf0f904c2..dce2a4c1cb6a048adef2b41506c7d2b516eae5d7 100644 +--- a/dist/cjs/index.js ++++ b/dist/cjs/index.js +@@ -57,7 +57,7 @@ function _export_star(from, to) { + const logger = _chopsticks.defaultLogger.child({ + name: 'utils' + }); +-const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ ++const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ + // random port if not specified + port = port ?? Math.floor(Math.random() * 10000) + 10000; + const config = { +@@ -72,6 +72,7 @@ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, time + db, + 'wasm-override': wasmOverride, + timeout, ++ 'rpc-timeout': rpcTimeout, + resume: resume ?? false, + 'allow-unresolved-imports': allowUnresolvedImports, + 'process-queued-messages': processQueuedMessages, +diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts +index e072ffe6156827581272398cf9acd9352d1b502b..ecec2991498332c287c47f35546932126141b001 100644 +--- a/dist/esm/index.d.ts ++++ b/dist/esm/index.d.ts +@@ -23,6 +23,8 @@ export type SetupOption = { + db?: string; + /** Connection timeout in milliseconds */ + timeout?: number; ++ /** Upstream RPC timeout in milliseconds (chopsticks -> upstream/proxy). Forwarded as rpc-timeout. */ ++ rpcTimeout?: number; + /** Host address to bind the server to */ + host?: string; + /** Port number to bind the server to */ +@@ -52,7 +54,7 @@ export type SetupConfig = Config & { + * @param options - Setup options for the network + * @returns Configuration object compatible with chopsticks + */ +-export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; ++export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig; + /** + * Sets up a blockchain network context using provided options + * @param option - Setup options for the network +diff --git a/dist/esm/index.js b/dist/esm/index.js +index 6509ac6f609c0abcef9996b563181930ae933413..bb2db6a13d46f46cc5d1c7cee53708e3f53b08da 100644 +--- a/dist/esm/index.js ++++ b/dist/esm/index.js +@@ -12,7 +12,7 @@ export * from './signFake.js'; + * Creates a configuration object from setup options + * @param options - Setup options for the network + * @returns Configuration object compatible with chopsticks +- */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ ++ */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, rpcTimeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{ + // random port if not specified + port = port ?? Math.floor(Math.random() * 10000) + 10000; + const config = { +@@ -27,6 +27,7 @@ export * from './signFake.js'; + db, + 'wasm-override': wasmOverride, + timeout, ++ 'rpc-timeout': rpcTimeout, + resume: resume ?? false, + 'allow-unresolved-imports': allowUnresolvedImports, + 'process-queued-messages': processQueuedMessages, diff --git a/KNOWN_GOOD_BLOCK_NUMBERS_WESTEND.env b/KNOWN_GOOD_BLOCK_NUMBERS_WESTEND.env index 010d773f0..0605389b8 100644 --- a/KNOWN_GOOD_BLOCK_NUMBERS_WESTEND.env +++ b/KNOWN_GOOD_BLOCK_NUMBERS_WESTEND.env @@ -1 +1 @@ -ASSETHUBWESTEND_BLOCK_NUMBER=15118358 +ASSETHUBWESTEND_BLOCK_NUMBER=15151649 diff --git a/package.json b/package.json index 01b6469d4..6f087ad77 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,8 @@ "node-gyp": "^11.0.0", "@polkadot/types@npm:^16.4.1": "patch:@polkadot/types@npm%3A16.5.6#~/.yarn/patches/@polkadot-types-npm-16.5.6-6fe2703ed8.patch", "@polkadot/types@npm:^16.5.4": "patch:@polkadot/types@npm%3A16.5.6#~/.yarn/patches/@polkadot-types-npm-16.5.6-6fe2703ed8.patch", - "@polkadot/types@npm:16.5.6": "patch:@polkadot/types@npm%3A16.5.6#~/.yarn/patches/@polkadot-types-npm-16.5.6-6fe2703ed8.patch" + "@polkadot/types@npm:16.5.6": "patch:@polkadot/types@npm%3A16.5.6#~/.yarn/patches/@polkadot-types-npm-16.5.6-6fe2703ed8.patch", + "@acala-network/chopsticks-utils@npm:1.4.0": "patch:@acala-network/chopsticks-utils@npm%3A1.4.0#~/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch" }, "packageManager": "yarn@4.14.1", "dependencies": { diff --git a/packages/networks/src/defineChain.ts b/packages/networks/src/defineChain.ts index 12c210913..5fa4fba26 100644 --- a/packages/networks/src/defineChain.ts +++ b/packages/networks/src/defineChain.ts @@ -34,7 +34,8 @@ export function defineChain< db: process.env.DB_PATH, runtimeLogLevel: process.env.RUNTIME_LOG_LEVEL ? Number(process.env.RUNTIME_LOG_LEVEL) : 0, blockNumber: toNumber(process.env[`${upperName}_BLOCK_NUMBER`]), - timeout: 60_000, + timeout: 90_000, + rpcTimeout: 90_000, port: 0, allowUnresolvedImports: true, saveBlock: false, diff --git a/packages/networks/src/pet-chain-endpoints.json b/packages/networks/src/pet-chain-endpoints.json index bfbc2e606..b99f61800 100644 --- a/packages/networks/src/pet-chain-endpoints.json +++ b/packages/networks/src/pet-chain-endpoints.json @@ -33,7 +33,6 @@ "collectivesPolkadot": [ "wss://sys.ibp.network/collectives-polkadot", "wss://collectives-polkadot.dotters.network", - "wss://collectives.api.onfinality.io/public-ws", "wss://rpc-collectives-polkadot.luckyfriday.io", "wss://collectives-polkadot-rpc.n.dwellir.com", "wss://dot-rpc.stakeworld.io/collectives", @@ -131,7 +130,8 @@ "wss://karura-rpc.n.dwellir.com" ], "bifrostKusama": [ - "wss://us.bifrost-rpc.liebi.com/ws" + "wss://hk.bifrost-rpc.liebi.com/ws", + "wss://bifrost-rpc.liebi.com/ws" ], "basilisk": [ "wss://basilisk-rpc.n.dwellir.com", diff --git a/vitest.config.mts b/vitest.config.mts index e5908fa20..613be8d29 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -20,6 +20,22 @@ 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). + 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: { outDir: '../../dist', diff --git a/yarn.lock b/yarn.lock index 9f48f44d3..c59cbc4cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -81,6 +81,24 @@ __metadata: languageName: node linkType: hard +"@acala-network/chopsticks-utils@patch:@acala-network/chopsticks-utils@npm%3A1.4.0#~/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch": + version: 1.4.0 + resolution: "@acala-network/chopsticks-utils@patch:@acala-network/chopsticks-utils@npm%3A1.4.0#~/.yarn/patches/@acala-network-chopsticks-utils-npm-1.4.0-abeade0cda.patch::version=1.4.0&hash=cb2edc" + dependencies: + "@acala-network/chopsticks": "npm:1.4.0" + "@acala-network/chopsticks-core": "npm:1.4.0" + "@polkadot-labs/hdkd": "npm:^0.0.19" + "@polkadot-labs/hdkd-helpers": "npm:^0.0.19" + "@polkadot/api": "npm:^16.4.1" + "@polkadot/api-base": "npm:^16.4.1" + "@polkadot/keyring": "npm:^14.0.1" + "@polkadot/types": "npm:^16.4.1" + "@polkadot/util": "npm:^14.0.1" + polkadot-api: "npm:^1.14.1" + checksum: 10c0/e3276c0bbe8ab4b8c2c366eee9595807f1fbaf0bd4e34c52ab65edb39c63d959254518549ab7fc41cc4e8be9dfb2573644506eddbff2e1500f36c7a6779ec325 + languageName: node + linkType: hard + "@acala-network/chopsticks@npm:1.4.0, @acala-network/chopsticks@npm:^1.4.0": version: 1.4.0 resolution: "@acala-network/chopsticks@npm:1.4.0"