{"record":{"id":"d9020e2ba461a372","repo":"nautechsystems/nautilus_trader","slug":"debug-tracetransaction-returned-no-result","errorCode":null,"errorMessage":"debug_traceTransaction returned no result","messagePattern":"debug_traceTransaction returned no result","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/http.rs","lineNumber":797,"sourceCode":"        &self,\n        tx_hash: &B256,\n    ) -> anyhow::Result<RpcCallTrace> {\n        let result: Option<RpcCallTrace> = self\n            .execute_execution_rpc_call(\n                \"debug_traceTransaction\",\n                serde_json::json!([\n                    tx_hash,\n                    {\n                        \"tracer\": \"callTracer\",\n                        \"tracerConfig\": {\n                            \"onlyTopCall\": false,\n                            \"withLog\": false,\n                        },\n                    }\n                ]),\n            )\n            .await?;\n        result.ok_or_else(|| anyhow::anyhow!(\"debug_traceTransaction returned no result\"))\n    }\n\n    /// Probes whether the endpoint recognizes the configured `callTracer` request shape.\n    #[cfg(feature = \"hypersync\")]\n    pub(crate) async fn probe_call_trace(&self) -> anyhow::Result<()> {\n        let request = serde_json::json!({\n            \"jsonrpc\": \"2.0\",\n            \"id\": 1,\n            \"method\": \"debug_traceTransaction\",\n            \"params\": [\n                B256::ZERO,\n                {\n                    \"tracer\": \"callTracer\",\n                    \"tracerConfig\": {\n                        \"onlyTopCall\": false,\n                        \"withLog\": false,\n                    },\n                }","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/http.rs#L779-L815","documentation":"`trace_transaction_call` issues `debug_traceTransaction` with a `callTracer` config and returns the raw JSON result; when the node responds with `result: null` (or omits it), this error is raised. A null result means the node could not produce a trace — usually the transaction hash is unknown, already pruned, or `debug_*` tracing is disabled.","triggerScenarios":"Calling `debug_traceTransaction` for a transaction hash the node does not know (not yet indexed, wrong chain, or reorged), or a non-archive/pruned node that discarded the trace state; some nodes also return null when tracing is disabled.","commonSituations":"Tracing a very recent tx before the node indexed it; tracing old txs on a pruned non-archive node; sending the hash to a node on a different network; managed providers that disable `debug_*` namespace.","solutions":["Verify the tx hash exists on the connected chain (`eth_getTransactionReceipt` returns non-null)","Retry after a short delay if the tx is very recent (indexing lag)","Use an archive/trace-enabled node; ensure `debug` API namespace is enabled in node config","Re-check the hash for typos or cross-chain mixups"],"exampleFix":"// before: tracing on a pruned node -> null result\nlet trace = client.trace_transaction(tx_hash).await?; // Err: returned no result\n// after: confirm availability first, then trace on archive node\nlet receipt = client.raw.eth_get_transaction_receipt(tx_hash).await?;\nlet trace = if receipt.is_some() { archive_client.trace_transaction(tx_hash).await? } else { bail!(\"tx unknown on this node\") };","handlingStrategy":"validation","validationCode":"async fn tx_known_and_traceable(url: &str, tx_hash: &str) -> bool {\n    let receipt = send_raw(url, json!({\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[tx_hash],\"id\":1})).await;\n    let known = receipt.map(|v| !v[\"result\"].is_null()).unwrap_or(false);\n    let debug_open = send_raw(url, json!({\"jsonrpc\":\"2.0\",\"method\":\"debug_traceTransaction\",\"params\":[known_tx_hash_for_probe, {\"tracer\":\"callTracer\"}],\"id\":1})).await.is_ok();\n    known && debug_open\n}","typeGuard":null,"tryCatchPattern":"match client.trace_transaction(tx_hash).await {\n    Ok(t) => Ok(t),\n    Err(e) if e.to_string().contains(\"returned no result\") => {\n        Err(anyhow!(\"trace unavailable for {tx_hash}: pruned, unindexed, or debug API disabled\"))\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Verify the receipt exists on the same chain before tracing","Use archive/trace-enabled nodes for historical transaction traces","Enable the debug (geth) or trace (erigon) API namespace in node config","Allow indexing lag for very recent transactions before tracing"],"tags":["rpc","tracing","debug-api","empty-response"],"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-14T05:17:10.506Z"}