nautechsystems/nautilus_trader · error

Execution intent {} has invalid transaction hash {}

Error message

Execution intent {} has invalid transaction hash {}

What it means

During reconciliation of unresolved executions, a transaction hash attached to an intent failed to parse as a B256 hash; the stored hash string is malformed, so the intent cannot be authenticated or matched to an on-chain transaction.

Source

Thrown at crates/adapters/blockchain/src/execution/client.rs:1238

                policy,
                &intent,
                hash,
                "recovery",
            )
            .map_err(|e| {
                anyhow::anyhow!(
                    "Execution intent {} signed transaction {} failed authentication: {e}",
                    intent.id,
                    hash.transaction_hash
                )
            })?;
            let authenticated_hash = B256::from_str(&hash.transaction_hash).with_context(|| {
                format!(
                    "Execution intent {} has invalid transaction hash {}",
                    intent.id, hash.transaction_hash
                )
            })?;
            anyhow::ensure!(
                authenticated_payloads
                    .insert(authenticated_hash, raw_transaction.clone())
                    .is_none(),
                "Execution intent {} has duplicate authenticated transaction hash {}",
                intent.id,
                hash.transaction_hash
            );

            if hash.id == current.id {
                current_payload = Some(raw_transaction);
            }
        }
        anyhow::ensure!(
            !authenticated_payloads.is_empty(),
            "Execution intent {} has no persisted signed transaction bytes",
            intent.id
        );

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Fix the transaction_hash value in the row to a valid 32-byte hex hash
  2. Delete the malformed row and let recovery re-derive the transaction record
  3. Check the writer that stores hashes to ensure canonical encoding is persisted

Example fix

// before
transaction_hash = "0xdeadbeef"  // too short / invalid
// after
transaction_hash = "0x<64 hex chars>"
Defensive patterns

Strategy: validation

Validate before calling

fn is_valid_tx_hash(s: &str) -> bool {
    B256::from_str(s).is_ok()
}
// pre-check rows
let bad: Vec<_> = hashes.iter().filter(|h| !is_valid_tx_hash(&h.transaction_hash)).collect();

Type guard

fn valid_hash(s: &str) -> Option<B256> {
    B256::from_str(s).ok()
}

Prevention

When it happens

Trigger: connect() -> reconcile_unresolved_execution(): B256::from_str(&hash.transaction_hash) fails while building authenticated_payloads after successful authentication.

Common situations: Corrupted rows; hashes stored with '0x' prefix vs not (depending on parser), wrong length, or non-hex characters; manual DB edits.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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