nautechsystems/nautilus_trader · error

Missing miner

Error message

Missing miner

What it means

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.

Source

Thrown at crates/adapters/blockchain/src/hypersync/transform.rs:69

            .ok_or_else(|| anyhow::anyhow!("Missing timestamp"))?
            .encode_hex()
            .as_str(),
    )?;

    let mut block = Block::new(
        received_block
            .hash
            .ok_or_else(|| anyhow::anyhow!("Missing hash"))?
            .to_string(),
        received_block
            .parent_hash
            .ok_or_else(|| anyhow::anyhow!("Missing parent hash"))?
            .to_string(),
        number,
        Ustr::from(
            received_block
                .miner
                .ok_or_else(|| anyhow::anyhow!("Missing miner"))?
                .to_string()
                .as_str(),
        ),
        gas_limit,
        gas_used,
        UnixNanos::new(timestamp * NANOSECONDS_IN_SECOND),
        Some(chain),
    );

    if let Some(base_fee_hex) = received_block.base_fee_per_gas {
        let s = base_fee_hex.encode_hex();
        let val = U256::from_str_radix(s.trim_start_matches("0x"), 16)?;
        block = block.with_base_fee(val);
    }

    if let (Some(used_hex), Some(excess_hex)) =
        (received_block.blob_gas_used, received_block.excess_blob_gas)
    {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Add miner to the HyperSync query's selected block fields.
  2. Use a zero address default (0x0000...0000) if the producer is irrelevant to your use case.
  3. Verify the hypersync-client dataset version populates miner for the target chain.
  4. Log the block number with the error to identify which ranges return incomplete records and exclude them.

Example fix

// before
let miner = Ustr::from(received_block.miner.ok_or_else(|| anyhow::anyhow!("Missing miner"))?.to_string().as_str());
// after (default zero address)
let miner = Ustr::from(
    &received_block.miner.map(|m| m.to_string()).unwrap_or_else(|| "0x0000000000000000000000000000000000000000".to_string()),
);
Defensive patterns

Strategy: validation

Validate before calling

fn block_has_miner(b: &hypersync_client::simple_types::Block) -> bool {
    b.miner.is_some()
}
// only transform blocks where miner is present, or default it

Type guard

fn has_miner(b: &hypersync_client::simple_types::Block) -> bool {
    matches!(b.miner, Some(_))
}

Try / catch

match transform_hypersync_block(chain, block) {
    Ok(b) => process(b),
    Err(e) if e.to_string().contains("Missing miner") => {
        tracing::warn!(block = ?block.number, "block missing miner; skipping");
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/e5a888a6d8dd3038. Report an issue: GitHub.