nautechsystems/nautilus_trader · error

validated proxy storage value

Error message

validated proxy storage value

What it means

In the same proxy-verification path, the expected storage value is parsed with `B256::from_str(&proxy.storage_value).expect("validated proxy storage value")`. Like the slot, the manifest is pre-validated by `validate_config` (verification.rs:1291), which guarantees `storage_value` is valid 32-byte hex, making this expect an internal invariant. Reaching it means an unvalidated or hand-built manifest reached `verify_deployment_manifest`.

Source

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

                }
                VerificationOutcome::Retryable(failure) => {
                    return VerificationOutcome::Retryable(failure);
                }
                VerificationOutcome::LocallyInvalid(failure) => {
                    return VerificationOutcome::LocallyInvalid(failure);
                }
            };

            if code.is_empty() || keccak256(&code) != expected_hash {
                return VerificationOutcome::Disagreement(
                    self.failure(VerificationRead::DeploymentIdentity),
                );
            }

            if let Some(proxy) = &contract.proxy {
                let slot = B256::from_str(&proxy.storage_slot).expect("validated proxy slot");
                let expected =
                    B256::from_str(&proxy.storage_value).expect("validated proxy storage value");
                match self.verify_storage(&address, &slot, block).await {
                    VerificationOutcome::Verified(verified) if verified.value == expected => {}
                    VerificationOutcome::Verified(_) => {
                        return VerificationOutcome::Disagreement(
                            self.failure(VerificationRead::DeploymentIdentity),
                        );
                    }
                    VerificationOutcome::Disagreement(failure) => {
                        return VerificationOutcome::Disagreement(failure);
                    }
                    VerificationOutcome::Unavailable(failure) => {
                        return VerificationOutcome::Unavailable(failure);
                    }
                    VerificationOutcome::Retryable(failure) => {
                        return VerificationOutcome::Retryable(failure);
                    }
                    VerificationOutcome::LocallyInvalid(failure) => {
                        return VerificationOutcome::LocallyInvalid(failure);

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Validate the manifest with `validate_config` before calling `verify_deployment_manifest`.
  2. Correct `proxy.storage_value` in the manifest to exactly 64 hex digits (with 0x).
  3. In your own code, parse with `B256::from_str` and map the error instead of expecting.
  4. Re-generate the manifest through its official source/generator rather than editing by hand.

Example fix

// before
let expected = B256::from_str(&proxy.storage_value).expect("validated proxy storage value");
// after
let expected = B256::from_str(&proxy.storage_value)
    .map_err(|e| anyhow::anyhow!("invalid proxy storage_value {:?}: {e}", proxy.storage_value))?;
Defensive patterns

Strategy: validation

Validate before calling

fn validate_proxy_storage_value(proxy: &ProxyInfo) -> Result<B256, String> {
    let s = proxy.storage_value.trim();
    let hex = s.strip_prefix("0x").unwrap_or(s);
    if hex.len() != 64 || !hex.chars().all(|c| c.is_ascii_hexdigit()) {
        return Err(format!("storage_value must be 32-byte hex, got {s:?}"));
    }
    B256::from_str(s).map_err(|e| e.to_string())
}

Try / catch

// Validate at load time, not at verification time
validate_config(&manifest).map_err(|e| anyhow::anyhow!("invalid manifest: {e}"))?;

Prevention

When it happens

Trigger: Verifying a manifest whose `proxy.storage_value` is not valid 32-byte hex (truncated value, missing 0x, non-hex chars) without first passing `validate_config` — typically manifests loaded directly from JSON or constructed in tests.

Common situations: Hand-edited manifest files with a truncated storage value; copying a value of the wrong length (e.g. 32 hex chars instead of 64); test manifests built bypassing validation; older schema manifests with differently formatted values.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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