{"record":{"id":"611f910c3371adde","repo":"nautechsystems/nautilus_trader","slug":"failed-to-persist-transaction-tx-hash-e-the","errorCode":null,"errorMessage":"Failed to persist transaction {tx_hash}: {e}; the in-flight slot stays occupied","messagePattern":"Failed to persist transaction (.+?): (.+?); the in-flight slot stays occupied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":2829,"sourceCode":"            .await?;\n        let context = payload_context_identity(\n            &intent,\n            &transaction_hash,\n            self.chain_id,\n            self.payload_keys.deployment_id(),\n        )?;\n        let envelope = self.payload_keys.seal(&prepared.raw_tx, &context)?;\n        let row = self\n            .database\n            .add_execution_transaction_envelope(\n                prepared.intent_id,\n                self.chain_id,\n                &transaction_hash,\n                &envelope,\n            )\n            .await\n        .map_err(|e| {\n            anyhow::anyhow!(\n                \"Failed to persist transaction {tx_hash}: {e}; the in-flight slot stays occupied\"\n            )\n        })?;\n        let stored = open_execution_payload(\n            &self.payload_keys,\n            policy,\n            &intent,\n            &row,\n            \"initial persistence\",\n        )?;\n        anyhow::ensure!(\n            stored == prepared.raw_tx,\n            \"Persisted transaction {tx_hash} does not match the signed bytes\"\n        );\n        Ok(())\n    }\n\n    fn payload_policy(&self) -> PayloadPolicy {","sourceCodeStart":2811,"sourceCodeEnd":2847,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L2811-L2847","documentation":"Persistence failure in the sign-and-persist path: storing the signed transaction envelope in the database failed; the in-flight concurrency slot is deliberately left occupied so the intent is reconciled later rather than double-executed.","triggerScenarios":"Thrown at crates/adapters/blockchain/src/execution/client.rs:2829 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restore database availability and retry","Reconcile the intent on next connect - the occupied slot prevents duplicate submissions","Inspect the wrapped database error for the root cause"],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}