{"record":{"id":"5f15acdfa357c518","repo":"nautechsystems/nautilus_trader","slug":"transaction-intent-nonce-is-still","errorCode":null,"errorMessage":"Transaction {} (intent {}, {}, nonce {}) is still awaiting finality; at most one transaction can be in flight","messagePattern":"Transaction (.+?) \\(intent (.+?), (.+?), nonce (.+?)\\) is still awaiting finality; at most one transaction can be in flight","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1861,"sourceCode":"        router: Address,\n        amount: U256,\n    },\n}\n\n/// The single-in-flight limit error naming the transaction currently occupying the slot.\nfn in_flight_limit_error(slot: &InFlightSlot) -> anyhow::Error {\n    match slot {\n        InFlightSlot::Preparing(purpose) => anyhow::anyhow!(\n            \"A {} transaction is being prepared; at most one transaction can be in flight\",\n            purpose.as_str()\n        ),\n        InFlightSlot::Recovering(recovery) => anyhow::anyhow!(\n            \"Execution intent {} ({}, nonce {}) retains signer ownership pending recovery; at most one transaction can be in flight\",\n            recovery.intent_id,\n            recovery.purpose.as_str(),\n            recovery.nonce\n        ),\n        InFlightSlot::AwaitingFinality(in_flight) => anyhow::anyhow!(\n            \"Transaction {} (intent {}, {}, nonce {}) is still awaiting finality; at most one transaction can be in flight\",\n            in_flight.tx_hash,\n            in_flight.intent_id,\n            in_flight.purpose.as_str(),\n            in_flight.nonce\n        ),\n    }\n}\n\n/// Releases a pre-signature slot claim when the slot is still in the preparing state.\n///\n/// Aborted or failed preparation can leave a claim behind; because no signed transaction\n/// exists for a preparing slot, releasing it cannot strand a broadcastable signature.\nfn release_preparing_slot(in_flight: &Mutex<Option<InFlightSlot>>) {\n    let mut slot = in_flight.lock();\n    if matches!(*slot, Some(InFlightSlot::Preparing(_))) {\n        *slot = None;\n    }","sourceCodeStart":1843,"sourceCodeEnd":1879,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1843-L1879","documentation":"Raised when the in-flight slot holds a transaction that has been broadcast but is still awaiting finality (confirmation on chain). The client blocks any new transaction until the pending one reaches finality; the message identifies the tx hash, intent, purpose, and nonce.","triggerScenarios":"Submitting a new transaction while a previously sent transaction (given by tx_hash) has not yet reached the configured finality depth/confirmations.","commonSituations":"Slow block times or low gas price making confirmation take longer than the strategy's submission cadence; high-frequency strategy loop outpacing chain finality; RPC lag reporting stale receipt status.","solutions":["Wait for the pending transaction to finalize; poll its receipt or await the finality future before submitting again.","Speed up the stuck tx via a replacement with higher gas (same nonce) if miners are slow.","Increase submission interval or implement an outbound order queue in the strategy.","Verify RPC connectivity — a lagging node may delay finality detection."],"exampleFix":"// before: submit during pending finality\nclient.submit_order(order_b)?; // tx 0xdef... still awaiting finality\n// after: wait for finality\nclient.await_transaction_finality(\"0xdef...\").await?;\nclient.submit_order(order_b)?;","handlingStrategy":"retry","validationCode":"if let Some(tx) = client.pending_in_flight() { client.await_transaction_finality(tx.tx_hash).await?; }","typeGuard":"fn is_awaiting_finality(slot: &InFlightSlot) -> bool { matches!(slot, InFlightSlot::AwaitingFinality(_)) }","tryCatchPattern":"match client.submit_order(order) { Err(e) if e.to_string().contains(\"awaiting finality\") => { wait_with_backoff().await; retry(order); } Ok(r) => r }","preventionTips":["Queue outbound orders until the previous tx finalizes","Use replacement transactions (same nonce, higher gas) for stuck txs","Monitor finality latency and alert on slow confirmations"],"tags":["transaction","finality","concurrency","blockchain"],"backgroundTag":"invalid-state-transition","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"}