nautechsystems/nautilus_trader · error
Deployment manifest digest must contain 32 hexadecimal bytes
Error message
Deployment manifest digest must contain 32 hexadecimal bytes
What it means
The configured `manifest_digest` must be a string that parses into a 32-byte B256 (64 hexadecimal characters). Parsing failure aborts validation with this message. The digest is the keccak256 commitment of the canonical manifest bytes and is used for integrity checks, so a malformed value cannot proceed.
Source
Thrown at crates/adapters/blockchain/src/rpc/verification.rs:1235
);
let checkpoint_hash = B256::from_str(&anchor.checkpoint_hash)
.map_err(|_| anyhow::anyhow!("Chain checkpoint hash must contain 32 hexadecimal bytes"))?;
anyhow::ensure!(
checkpoint_hash != B256::ZERO,
"Chain checkpoint hash must be nonzero"
);
anyhow::ensure!(
anchor.max_head_skew_blocks != 0
&& anchor.max_head_age_secs != 0
&& anchor.max_future_drift_secs != 0,
"Chain head skew, age, and future-drift limits must be nonzero"
);
anyhow::ensure!(
!config.manifest_version.trim().is_empty(),
"Deployment manifest version is required"
);
let manifest_digest = B256::from_str(&config.manifest_digest).map_err(|_| {
anyhow::anyhow!("Deployment manifest digest must contain 32 hexadecimal bytes")
})?;
anyhow::ensure!(
manifest_digest != B256::ZERO,
"Deployment manifest digest must be nonzero"
);
let manifest = &config.deployment_manifest;
anyhow::ensure!(
manifest.version == config.manifest_version,
"Deployment manifest version does not match its configured identity"
);
anyhow::ensure!(
manifest.chain_id == anchor.chain_id && manifest.chain_name == anchor.chain_name,
"Deployment manifest chain identity does not match the chain anchor"
);
let canonical_manifest = serde_json::to_vec(manifest)
.map_err(|_| anyhow::anyhow!("Failed to serialize the deployment manifest"))?;
anyhow::ensure!(
keccak256(canonical_manifest) == manifest_digest,View on GitHub (pinned to 18893faf8b)
Solutions
- Recompute the digest as keccak256 over the canonical JSON serialization of the manifest and paste the full 64-hex-character value.
- Verify the string is exactly 64 hex characters (optionally 0x-prefixed) with no whitespace.
- Regenerate the manifest artifact if the original digest was produced by an older serializer version.
Example fix
// before
let config = DeploymentConfig { manifest_digest: "9f2cab".into(), ..config }; // truncated
// after
let config = DeploymentConfig { manifest_digest: "9f2c...ab01".into(), ..config }; // full 64 hex chars Defensive patterns
Strategy: validation
Validate before calling
fn digest_is_b256(s: &str) -> bool {
let hex = s.strip_prefix("0x").unwrap_or(s);
hex.len() == 64 && hex.chars().all(|c| c.is_ascii_hexdigit())
}
assert!(digest_is_b256(&config.manifest_digest)); Type guard
fn parse_digest(s: &str) -> Option<B256> {
B256::from_str(s).ok()
} Prevention
- Always copy digests in full 0x-prefixed 64-hex form straight from the generator output.
- Have the manifest build step emit and stamp the digest automatically rather than humans pasting it.
- Trim whitespace and normalize case before storing the digest.
When it happens
Trigger: Validating a DeploymentConfig whose `manifest_digest` is empty, not hex, has an odd number of hex digits, or is not exactly 32 bytes.
Common situations: Digest truncated when copying from logs or CI output; missing 0x handling combined with strict parsing; a placeholder like "<digest>" left in a template; uppercase/whitespace artifacts from copy-paste.
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
- Pool identifier must start with '0x', was: {value}
- Pool identifier must be 42 chars (address) or 66 chars (pool
- Invalid hex characters in: {s}
- Invalid event signature for '{event_name}': expected {expect
- Invalid receipt log data
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/c297384dd45abc67.
Report an issue: GitHub.