{"record":{"id":"942bc493357ef571","repo":"nautechsystems/nautilus_trader","slug":"failed-to-parse-full-transaction-in-eth-getblockby","errorCode":null,"errorMessage":"Failed to parse full transaction in eth_getBlockByNumber response","messagePattern":"Failed to parse full transaction in eth_getBlockByNumber response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/http.rs","lineNumber":700,"sourceCode":"\n    async fn block_by_tag(&self, tag: &str, full_transactions: bool) -> anyhow::Result<RpcBlock> {\n        let result: Option<RpcBlockResponse> = self\n            .execute_execution_rpc_call(\n                \"eth_getBlockByNumber\",\n                serde_json::json!([tag, full_transactions]),\n            )\n            .await?;\n        let response = result.ok_or_else(|| {\n            anyhow::anyhow!(\"eth_getBlockByNumber returned no result for block tag {tag}\")\n        })?;\n        let mut block = response.block;\n        if full_transactions {\n            block.transactions = response\n                .transactions\n                .into_iter()\n                .map(|transaction| {\n                    serde_json::from_value(transaction).map_err(|_| {\n                        anyhow::anyhow!(\n                            \"Failed to parse full transaction in eth_getBlockByNumber response\"\n                        )\n                    })\n                })\n                .collect::<anyhow::Result<_>>()?;\n        }\n        Ok(block)\n    }\n\n    /// Returns the receipt for the given transaction hash via `eth_getTransactionReceipt`.\n    ///\n    /// A `null` result maps to `Ok(None)`: the transaction is pending and no receipt\n    /// exists yet.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the RPC call fails or the response is malformed.\n    pub async fn get_transaction_receipt(","sourceCodeStart":682,"sourceCodeEnd":718,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/http.rs#L682-L718","documentation":"When `block_by_tag` fetches a block with `full_transactions: true`, each transaction in the response is deserialized from its JSON value into the library's transaction type. This error is raised if any transaction object in the `eth_getBlockByNumber` response cannot be parsed — the block envelope was valid, but a transaction's shape or field types are unexpected.","triggerScenarios":"A transaction in the full-transaction array has missing/unexpected fields: non-standard transaction types (e.g. newer EIP-2718 typed transactions the library version doesn't know), null `to`/fields in unexpected places, or node-specific extra/mis-typed fields breaking serde deserialization.","commonSituations":"Running an adapter version older than a new transaction type (e.g. blobs/EIP-4844 or future EIPs) against a node that includes them; exotic chains with extra fields; node returning `null` where the library expects a value.","solutions":["Check the inner serde message by reproducing the call and inspecting the raw JSON transaction objects","Upgrade the adapter to a version that supports the transaction types the node emits","Use `full_transactions: false` if only block headers are needed, avoiding per-tx parsing","Exclude non-standard transaction types at the node level or use a mainstream chain/node combo"],"exampleFix":"// before: adapter predates blob transactions\nlet block = client.block_by_number(height, true).await?; // Err parsing EIP-4844 tx\n// after: upgrade adapter, or fetch headers only\nlet block = client.block_by_number(height, false).await?;","handlingStrategy":"fallback","validationCode":null,"typeGuard":"fn transactions_parseable(block_json: &serde_json::Value) -> bool {\n    block_json[\"transactions\"].as_array().map(|txs| {\n        txs.iter().all(|t| t.get(\"hash\").map(|h| h.is_string()).unwrap_or(false))\n    }).unwrap_or(true)\n}","tryCatchPattern":"match client.block_by_number(height, true).await {\n    Ok(b) => Ok(b),\n    Err(e) if e.to_string().contains(\"Failed to parse full transaction\") => {\n        log::warn!(\"unsupported tx shape; degrading to headers-only\");\n        client.block_by_number(height, false).await\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Keep the adapter updated for new EIP-2718 transaction types (4844 blobs, etc.)","Test full-transaction fetching against the target chain after upgrades","Use full_transactions=false when only block headers are needed","Prefer mainstream chain/node combinations that emit spec-compliant transaction JSON"],"tags":["rpc","ethereum","transactions","deserialization"],"backgroundTag":"json-unmarshal-failed","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"}