nautechsystems/nautilus_trader · error

Manifest probe output is invalid

Error message

Manifest probe output is invalid

What it means

The manifest validator parses each probe's expected_output with alloy's Bytes::from_str; this error means the expected output is not valid hex. The expected_output is the ABI-encoded return value the verifier compares against when executing the identity probe on-chain, so it must be a well-formed byte string.

Source

Thrown at crates/adapters/blockchain/src/rpc/verification.rs:1313

            let target = Address::from_str(&proxy.target_address)
                .map_err(|_| anyhow::anyhow!("Proxy target address is invalid"))?;
            let target_hash = B256::from_str(&proxy.target_code_hash)
                .map_err(|_| anyhow::anyhow!("Proxy target code hash is invalid"))?;
            anyhow::ensure!(
                target != Address::ZERO
                    && target != address
                    && target_hash != B256::ZERO
                    && storage_value[..12].iter().all(|byte| *byte == 0)
                    && storage_value[12..] == *target.as_slice(),
                "Proxy target binding is invalid"
            );
        }

        for probe in &contract.probes {
            Bytes::from_str(&probe.call_data)
                .map_err(|_| anyhow::anyhow!("Manifest probe call data is invalid"))?;
            Bytes::from_str(&probe.expected_output)
                .map_err(|_| anyhow::anyhow!("Manifest probe output is invalid"))?;
        }
    }

    for contract in &manifest.contracts {
        let Some(proxy) = &contract.proxy else {
            continue;
        };
        let target =
            Address::from_str(&proxy.target_address).expect("validated proxy target address");
        let target_contract = manifest
            .contracts
            .iter()
            .find(|candidate| Address::from_str(&candidate.address).ok() == Some(target))
            .ok_or_else(|| {
                anyhow::anyhow!("Proxy target has no unique deployment manifest identity")
            })?;
        anyhow::ensure!(
            target_contract.role == BlockchainContractRole::Implementation

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Set probe.expected_output to valid even-length hex of the ABI-encoded return value
  2. Produce it with an ABI encoder for the probe's return type (e.g. cast abi-encode)
  3. Regenerate the manifest programmatically rather than editing expected_output by hand

Example fix

// before
{"expected_output": "WETH"}
// after
{"expected_output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000"}
Defensive patterns

Strategy: validation

Validate before calling

fn valid_hex_bytes(s: &str) -> bool {
    let h = s.strip_prefix("0x").unwrap_or(s);
    !h.is_empty() && h.len() % 2 == 0 && h.chars().all(|c| c.is_ascii_hexdigit())
}
assert!(manifest.contracts.iter().flat_map(|c| &c.probes).all(|p| valid_hex_bytes(&p.expected_output)));

Try / catch

match validate_manifest(&config) {
    Err(e) if e.to_string().contains("probe output") => {
        eprintln!("ABI-encode the expected return value into expected_output: {e}");
    }
    Err(e) => return Err(e),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: Running manifest verification where a probes[] entry has expected_output that is empty, odd-length hex, or contains non-hex characters — e.g. an ASCII string like 'WETH' instead of its ABI-encoded bytes.

Common situations: Hand-writing expected outputs instead of ABI-encoding them; copying a human-readable return value from a block explorer; truncating or corrupting hex during JSON editing; mixing 0X/0x casing tools reject.

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/e3a41571ad7ead78. Report an issue: GitHub.