{"record":{"id":"2fae65c071de94c8","repo":"nautechsystems/nautilus_trader","slug":"latest-block-has-no-base-fee","errorCode":null,"errorMessage":"Latest block {} has no base fee","messagePattern":"Latest block (.+?) has no base fee","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":641,"sourceCode":"            }\n\n            tokens.push(TokenPreflightCheck {\n                address: token.address,\n                symbol: token.symbol.clone(),\n                has_deployed_code: !code.is_empty(),\n                wallet_balance,\n                router_allowances,\n            });\n        }\n\n        let native_balance_wei = self\n            .http_rpc_client\n            .get_balance_with_timeout(&self.wallet_address, None, Some(EXECUTION_RPC_TIMEOUT_SECS))\n            .await?;\n\n        let latest_block = self.http_rpc_client.latest_block().await?;\n        let base_fee_per_gas_wei = latest_block.base_fee_per_gas.ok_or_else(|| {\n            anyhow::anyhow!(\"Latest block {} has no base fee\", latest_block.number)\n        })?;\n        let max_priority_fee_per_gas_wei = self.http_rpc_client.max_priority_fee_per_gas().await?;\n        let derived_max_fee_per_gas_wei = compute_max_fee(\n            base_fee_per_gas_wei,\n            max_priority_fee_per_gas_wei,\n            self.config.base_fee_buffer_bps,\n        )?;\n\n        Ok(BlockchainPreflightReport::new(\n            u64::from(self.chain.chain_id),\n            actual_chain_id,\n            pool_check,\n            routers,\n            tokens,\n            native_balance_wei,\n            base_fee_per_gas_wei,\n            max_priority_fee_per_gas_wei,\n            derived_max_fee_per_gas_wei,","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L623-L659","documentation":"The preflight fee derivation needs the latest block's base fee per gas to compute max_fee_per_gas. If the RPC returns a latest block without base_fee_per_gas (None), the code cannot derive EIP-1559 fees and raises. This typically means the chain or RPC endpoint does not support EIP-1559.","triggerScenarios":"Calling preflight against a chain/RPC whose eth_getBlockByNumber response lacks baseFeePerGas (pre-London chains, some non-EVM-compatible RPCs, or mocked/proxy RPCs stripping the field).","commonSituations":"Pointing config at a legacy PoA/test network without EIP-1559; using a third-party RPC proxy that omits the field; wrong chain id selected.","solutions":["Point the RPC at an EIP-1559-compatible endpoint for the intended chain","Verify the configured chain id matches a network that supports base fee (post-London)","Use a different provider whose latest_block includes baseFeePerGas"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"let block = rpc.latest_block().await?;\nif block.base_fee_per_gas.is_none() {\n    return Err(\"chain does not support EIP-1559 base fee; check RPC/chain id\".into());\n}","typeGuard":null,"tryCatchPattern":"match client.preflight().await {\n    Err(e) if e.to_string().contains(\"has no base fee\") => {\n        // switch to an EIP-1559-capable RPC or configure legacy gas\n    }\n    other => other?,\n}","preventionTips":["Verify the target chain supports EIP-1559 before configuring the client","Use reputable RPC providers that return baseFeePerGas","Pin and verify chain id against a London+ hard-fork block"],"tags":["blockchain","rpc","gas","eip1559"],"backgroundTag":"unexpected-api-response-shape","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"}