{"record":{"id":"bdca48189bd0ff3f","repo":"nautechsystems/nautilus_trader","slug":"persisted-transaction-row-chain-id-does-not-mat","errorCode":null,"errorMessage":"Persisted transaction row chain ID {} does not match configured chain ID {}","messagePattern":"Persisted transaction row chain ID (.+?) does not match configured chain ID (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1201,"sourceCode":"            )\n        })?;\n        let policy = PayloadPolicy {\n            chain_id: self.chain.chain_id,\n            signer: self.wallet_address,\n            gas_limit: self.config.gas_limit,\n            max_fee_per_gas: self.config.max_fee_per_gas_wei,\n        };\n        let mut authenticated_payloads = HashMap::new();\n        let mut current_payload = None;\n\n        for hash in &hashes {\n            anyhow::ensure!(\n                hash.intent_id == intent.id,\n                \"Persisted transaction row references intent {}, expected {}\",\n                hash.intent_id,\n                intent.id\n            );\n            anyhow::ensure!(\n                hash.chain_id == self.chain.chain_id,\n                \"Persisted transaction row chain ID {} does not match configured chain ID {}\",\n                hash.chain_id,\n                self.chain.chain_id\n            );\n\n            if !hash.payload_expected {\n                anyhow::ensure!(\n                    hash.raw_transaction.is_none() && hash.sealed_transaction.is_none(),\n                    \"Replacement transaction {} unexpectedly retains signed bytes\",\n                    hash.transaction_hash\n                );\n                continue;\n            }\n            let raw_transaction = open_execution_payload(\n                self.payload_keys\n                    .as_deref()\n                    .expect(\"payload keys checked above\"),","sourceCodeStart":1183,"sourceCodeEnd":1219,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1183-L1219","documentation":"Reconciliation guard: a persisted transaction row's chain ID differs from the adapter's configured chain, meaning the database holds rows from a different network deployment; reconciliation aborts to prevent cross-chain recovery.","triggerScenarios":"connect() -> reconcile_unresolved_execution(): hash.chain_id != self.chain.chain_id while validating rows from get_execution_transaction_hashes.","commonSituations":"Pointing the client at a different network (mainnet vs testnet) or wrong chain_id in config while reusing an existing execution database; DB copied between environments.","solutions":["Correct the configured chain_id to match the chain the transactions were signed for","Use a database belonging to the configured chain, or clear stale rows for the other chain","Re-sign the intent on the current chain after discarding the foreign-chain rows"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let hashes = database.get_execution_transaction_hashes(intent.id).await?;\nif hashes.iter().any(|h| h.chain_id != configured_chain.chain_id) {\n    // point config at the right chain or clear foreign rows\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep separate databases per chain/environment","Verify chain_id in config before connecting with an existing database","Never copy execution DBs between networks"],"tags":["blockchain","chain-id","config","database"],"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-14T05:17:10.506Z"}