{"record":{"id":"1179f8370661c7e6","repo":"nautechsystems/nautilus_trader","slug":"verified-replacement-scan-returned-no-blocks","errorCode":null,"errorMessage":"Verified replacement scan returned no blocks","messagePattern":"Verified replacement scan returned no blocks","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":3113,"sourceCode":"            ));\n            blocks.push(start_block.value);\n\n            if end > start {\n                let window = required_verification(\n                    self.verification\n                        .verify_replacement_window(start_header.value, end)\n                        .await,\n                    \"canonical replacement window\",\n                )?;\n                decisions.push(verification_decision(&window, Some(start + 1), Some(end)));\n                blocks.extend(window.value);\n            }\n        }\n\n        let scanned_tip = blocks\n            .last()\n            .map(|block| VerifiedBlockHeader::from(block.clone()))\n            .ok_or_else(|| anyhow::anyhow!(\"Verified replacement scan returned no blocks\"))?;\n        if end == head.number {\n            anyhow::ensure!(\n                scanned_tip == head,\n                \"Replacement scan tip conflicts with the verified canonical head\"\n            );\n        }\n        let mut candidates = blocks\n            .iter()\n            .flat_map(|block| block.transactions.iter())\n            .filter(|transaction| {\n                transaction.from == self.wallet_address && transaction.nonce == nonce\n            });\n        let candidate = candidates.next();\n        anyhow::ensure!(\n            candidates.next().is_none(),\n            \"Canonical replacement scan found duplicate signer-nonce transactions\"\n        );\n","sourceCodeStart":3095,"sourceCodeEnd":3131,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L3095-L3131","documentation":"After assembling the block list for a canonical replacement scan, the client requires at least one verified block so it can derive a scanned tip. The verified replacement scan (window or start block fetch) produced an empty block list, which is an unexpected provider/indexer response.","triggerScenarios":"verify_replacement_window() or verify_replacement_block() returned an empty result while the computed scan range start..=end was valid — e.g. the verification provider returned no blocks for the requested window, or the cursor/window logic produced a degenerate range.","commonSituations":"Indexer/RPC with gaps in historical block availability; archive provider missing recently pruned blocks; a verification backend returning an empty payload on partial outages.","solutions":["Retry with a different or archive-capable RPC/indexer provider","Verify the provider returns blocks for the requested range (query a known height directly)","Check that start <= end in the computed scan range and that the cursor is valid","Re-run reconciliation once the provider recovers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let blocks = client.verified_window(start, end).await?;\nif blocks.is_empty() {\n    return Err(\"provider returned no blocks for range; check provider health/archive support\");\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"returned no blocks\") => switch_provider_and_retry(),\n    other => other,\n}","preventionTips":["Use archive-capable providers for historical scans","Health-check the verification provider before reconciliation","Validate requested ranges are non-degenerate","Keep a fallback provider configured"],"tags":["blockchain","empty-result","provider","verification"],"backgroundTag":"empty-result-set","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}