{"record":{"id":"a4c1ec30abcf876b","repo":"nautechsystems/nautilus_trader","slug":"verification-chain-anchor-id-does-not-match-the-co","errorCode":null,"errorMessage":"Verification chain anchor ID does not match the configured chain","messagePattern":"Verification chain anchor ID does not match the configured chain","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":187,"sourceCode":"        core_client: ExecutionClientCore,\n        config: BlockchainExecutionClientConfig,\n    ) -> anyhow::Result<Self> {\n        let transaction_limits = Self::transaction_limits(&config)?;\n        let chain = Arc::new(config.chain.clone());\n        let cache = BlockchainCache::new(chain.clone());\n        let http_rpc_client = Arc::new(BlockchainHttpRpcClient::new(\n            config.http_rpc_url.clone().into_inner(),\n            config.rpc_requests_per_second,\n            None,\n        ));\n        let verification_config = config.verification.as_ref().ok_or_else(|| {\n            anyhow::anyhow!(\"Independent Blockchain execution verification is required\")\n        })?;\n        anyhow::ensure!(\n            verification_config.chain_anchor.chain_id == config.chain.chain_id,\n            \"Verification chain anchor ID does not match the configured chain\"\n        );\n        anyhow::ensure!(\n            verification_config.chain_anchor.chain_name == config.chain.name.to_string(),\n            \"Verification chain anchor name does not match the configured chain\"\n        );\n        let verification = VerificationCoordinator::new(\n            http_rpc_client.clone(),\n            config.http_rpc_url.expose_secret(),\n            verification_config,\n            config.rpc_requests_per_second,\n        )?;\n        let wallet_address = validate_address(config.wallet_address.as_str())?;\n        let erc20_contract = Erc20Contract::new_with_timeout(\n            http_rpc_client.clone(),\n            Some(EXECUTION_RPC_TIMEOUT_SECS),\n            true,\n        );\n\n        let router_addresses = config\n            .router_addresses","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L169-L205","documentation":"Thrown by `BlockchainExecutionClient::new` via `anyhow::ensure!` when `verification.chain_anchor.chain_id` differs from `config.chain.chain_id`. The verification coordinator must verify executions on exactly the chain the client transacts on; a mismatch means the config points at two different networks.","triggerScenarios":"Constructing a `BlockchainExecutionClient` where the `verification` section's `chain_anchor.chain_id` (e.g. 1 for Ethereum mainnet) does not equal the client's `chain.chain_id` (e.g. 8453 for Base) — typically after copying a config between environments and editing only one side.","commonSituations":"Reusing a mainnet verification manifest/config against a testnet chain (or vice versa); renaming/chains changed by a fork; hand-editing chain IDs in one section only.","solutions":["Set `verification.chain_anchor.chain_id` equal to `config.chain.chain_id` in the config file.","If the deployment target changed, regenerate the deployment manifest for the correct chain and update the anchor.","Load both values from a single shared chain descriptor so they cannot drift."],"exampleFix":"// before (config.toml)\n[chain]\nchain_id = 8453\n[verification.chain_anchor]\nchain_id = 1\n// after\n[chain]\nchain_id = 8453\n[verification.chain_anchor]\nchain_id = 8453","handlingStrategy":"validation","validationCode":"fn chain_ids_match(config: &BlockchainExecutionClientConfig) -> bool {\n    config.verification.as_ref()\n        .map(|v| v.chain_anchor.chain_id == config.chain.chain_id)\n        .unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"BlockchainExecutionClient::new(config.clone()).map_err(|e| {\n    if e.to_string().contains(\"chain anchor ID\") {\n        anyhow::anyhow!(\"verification.chain_anchor.chain_id must equal chain.chain_id ({})\", config.chain.chain_id)\n    } else { e }\n})?;","preventionTips":["Derive chain_anchor from the same chain object rather than editing IDs separately","Re-verify the whole config when migrating between mainnet/testnet","Add a config lint that asserts anchor ID equals chain ID"],"tags":["blockchain","config","chain-id","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}