{"record":{"id":"e5a888a6d8dd3038","repo":"nautechsystems/nautilus_trader","slug":"missing-miner","errorCode":null,"errorMessage":"Missing miner","messagePattern":"Missing miner","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/hypersync/transform.rs","lineNumber":69,"sourceCode":"            .ok_or_else(|| anyhow::anyhow!(\"Missing timestamp\"))?\n            .encode_hex()\n            .as_str(),\n    )?;\n\n    let mut block = Block::new(\n        received_block\n            .hash\n            .ok_or_else(|| anyhow::anyhow!(\"Missing hash\"))?\n            .to_string(),\n        received_block\n            .parent_hash\n            .ok_or_else(|| anyhow::anyhow!(\"Missing parent hash\"))?\n            .to_string(),\n        number,\n        Ustr::from(\n            received_block\n                .miner\n                .ok_or_else(|| anyhow::anyhow!(\"Missing miner\"))?\n                .to_string()\n                .as_str(),\n        ),\n        gas_limit,\n        gas_used,\n        UnixNanos::new(timestamp * NANOSECONDS_IN_SECOND),\n        Some(chain),\n    );\n\n    if let Some(base_fee_hex) = received_block.base_fee_per_gas {\n        let s = base_fee_hex.encode_hex();\n        let val = U256::from_str_radix(s.trim_start_matches(\"0x\"), 16)?;\n        block = block.with_base_fee(val);\n    }\n\n    if let (Some(used_hex), Some(excess_hex)) =\n        (received_block.blob_gas_used, received_block.excess_blob_gas)\n    {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/hypersync/transform.rs#L51-L87","documentation":"transform_hypersync_block requires the miner (beneficiary/fee recipient) address to build the Block. HyperSync's miner field is optional; when None the transform fails rather than constructing a Block with an unknown producer. The value is converted to a Ustr identifier for the block's miner.","triggerScenarios":"pool_events_from_response receiving a HyperSync block where miner is None — typically because the query projection excluded miner or the provider record is incomplete for that block.","commonSituations":"Selective HyperSync column queries missing the miner field; chains/schemas where miner is not populated (e.g. post-merge builder slots in some providers); stub test blocks.","solutions":["Add miner to the HyperSync query's selected block fields.","Use a zero address default (0x0000...0000) if the producer is irrelevant to your use case.","Verify the hypersync-client dataset version populates miner for the target chain.","Log the block number with the error to identify which ranges return incomplete records and exclude them."],"exampleFix":"// before\nlet miner = Ustr::from(received_block.miner.ok_or_else(|| anyhow::anyhow!(\"Missing miner\"))?.to_string().as_str());\n// after (default zero address)\nlet miner = Ustr::from(\n    &received_block.miner.map(|m| m.to_string()).unwrap_or_else(|| \"0x0000000000000000000000000000000000000000\".to_string()),\n);","handlingStrategy":"validation","validationCode":"fn block_has_miner(b: &hypersync_client::simple_types::Block) -> bool {\n    b.miner.is_some()\n}\n// only transform blocks where miner is present, or default it","typeGuard":"fn has_miner(b: &hypersync_client::simple_types::Block) -> bool {\n    matches!(b.miner, Some(_))\n}","tryCatchPattern":"match transform_hypersync_block(chain, block) {\n    Ok(b) => process(b),\n    Err(e) if e.to_string().contains(\"Missing miner\") => {\n        tracing::warn!(block = ?block.number, \"block missing miner; skipping\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Include miner in the HyperSync field selection.","If miner is irrelevant to your strategy, patch the query results with a zero-address default.","Confirm the chain's schema populates miner (some post-merge datasets differ)."],"tags":["blockchain","hypersync","missing-field","block-miner"],"backgroundTag":"missing-required-argument","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"}