{"record":{"id":"63da4fb2341f1cb0","repo":"nautechsystems/nautilus_trader","slug":"swap-decision-header-changed-in-the-pre-sign-ances","errorCode":null,"errorMessage":"Swap decision header changed in the pre-sign ancestry reread","messagePattern":"Swap decision header changed in the pre-sign ancestry reread","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":2705,"sourceCode":"        let watermark = required_verification(\n            self.verification\n                .verify_block(anchors.watermark.number)\n                .await,\n            \"pre-sign profiler watermark reread\",\n        )?;\n        anyhow::ensure!(\n            watermark.value == anchors.watermark,\n            \"Pool state header changed before signing\"\n        );\n        let ancestry = required_verification(\n            self.verification\n                .verify_header_window(watermark.value, anchors.state.number)\n                .await,\n            \"pre-sign profiler ancestry reread\",\n        )?;\n\n        if let Some(last) = ancestry.value.last() {\n            anyhow::ensure!(\n                *last == anchors.state,\n                \"Swap decision header changed in the pre-sign ancestry reread\"\n            );\n        } else {\n            anyhow::ensure!(\n                watermark.value == anchors.state,\n                \"Empty pre-sign ancestry does not end at the swap decision header\"\n            );\n        }\n        let quote = match anchors.quote_kind {\n            SwapQuoteKind::ExactInput(amount_in) => required_verification(\n                self.verification\n                    .verify_quote_exact_input_single(\n                        &anchors.quote_contract,\n                        anchors.token_in,\n                        anchors.token_out,\n                        amount_in,\n                        anchors.fee,","sourceCodeStart":2687,"sourceCodeEnd":2723,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L2687-L2723","documentation":"Pre-sign ancestry re-verification: re-reading the header window between watermark and decision block no longer ends at the same swap decision header, indicating a reorg or data inconsistency since the quote.","triggerScenarios":"Thrown at crates/adapters/blockchain/src/execution/client.rs:2705 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry with a fresh quote and ancestry","Check that the RPC/HyperSync sources agree on the canonical chain"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}