{"record":{"id":"91d8596fd0cc795e","repo":"nautechsystems/nautilus_trader","slug":"retained-execution-history-has-duplicate-signer-no","errorCode":null,"errorMessage":"Retained execution history has duplicate signer nonce ownership","messagePattern":"Retained execution history has duplicate signer nonce ownership","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":5382,"sourceCode":"                        self.payload_keys\n                            .as_deref()\n                            .expect(\"Postgres execution requires payload keys\"),\n                        self.payload_policy(),\n                        intent,\n                        hash,\n                        \"verification migration\",\n                    )?;\n                    authenticated.insert(hash.id, raw);\n                } else {\n                    anyhow::ensure!(\n                        hash.raw_transaction.is_none() && hash.sealed_transaction.is_none(),\n                        \"Unowned replacement hash retains signed bytes\"\n                    );\n                }\n            }\n\n            if let Some(nonce) = intent.nonce {\n                anyhow::ensure!(\n                    nonce_owners.insert(nonce, intent.id).is_none(),\n                    \"Retained execution history has duplicate signer nonce ownership\"\n                );\n            }\n\n            let base_decision = verification_decision(\n                nonce_verification,\n                Some(finalized.number),\n                Some(finalized.number),\n            );\n\n            if !intent.active {\n                if matches!(intent.status.as_str(), \"finalized\" | \"reverted\") {\n                    let expected_marker =\n                        if purpose == TransactionPurpose::Swap && intent.status == \"finalized\" {\n                            intent.fill_emitted\n                        } else {\n                            intent.terminal_emitted","sourceCodeStart":5364,"sourceCodeEnd":5400,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L5364-L5400","documentation":"During verification migration, the retained execution history contains two records claiming ownership of the same signer nonce; this invariant violation (duplicate nonce ownership) would make nonce accounting ambiguous, so migration aborts rather than pick a winner.","triggerScenarios":"Thrown at crates/adapters/blockchain/src/execution/client.rs:5382 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the execution_history rows for the affected signer address and identify which record legitimately owns the nonce.","Remove or archive the stale/duplicate intent record so nonce ownership is unique.","Re-run the migration after deduplicating the history."],"exampleFix":null,"handlingStrategy":"validation","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"}