{"record":{"id":"debf4fde753dc4b2","repo":"nautechsystems/nautilus_trader","slug":"deployment-manifest-version-does-not-match-its-con","errorCode":null,"errorMessage":"Deployment manifest version does not match its configured identity","messagePattern":"Deployment manifest version does not match its configured identity","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/verification.rs","lineNumber":1242,"sourceCode":"    anyhow::ensure!(\n        anchor.max_head_skew_blocks != 0\n            && anchor.max_head_age_secs != 0\n            && anchor.max_future_drift_secs != 0,\n        \"Chain head skew, age, and future-drift limits must be nonzero\"\n    );\n    anyhow::ensure!(\n        !config.manifest_version.trim().is_empty(),\n        \"Deployment manifest version is required\"\n    );\n    let manifest_digest = B256::from_str(&config.manifest_digest).map_err(|_| {\n        anyhow::anyhow!(\"Deployment manifest digest must contain 32 hexadecimal bytes\")\n    })?;\n    anyhow::ensure!(\n        manifest_digest != B256::ZERO,\n        \"Deployment manifest digest must be nonzero\"\n    );\n    let manifest = &config.deployment_manifest;\n    anyhow::ensure!(\n        manifest.version == config.manifest_version,\n        \"Deployment manifest version does not match its configured identity\"\n    );\n    anyhow::ensure!(\n        manifest.chain_id == anchor.chain_id && manifest.chain_name == anchor.chain_name,\n        \"Deployment manifest chain identity does not match the chain anchor\"\n    );\n    let canonical_manifest = serde_json::to_vec(manifest)\n        .map_err(|_| anyhow::anyhow!(\"Failed to serialize the deployment manifest\"))?;\n    anyhow::ensure!(\n        keccak256(canonical_manifest) == manifest_digest,\n        \"Deployment manifest digest does not match its canonical content\"\n    );\n    anyhow::ensure!(\n        !manifest.contracts.is_empty() && !manifest.tokens.is_empty() && !manifest.pools.is_empty(),\n        \"Deployment manifest contracts, tokens, and pools are required\"\n    );\n    let mut contract_addresses = HashSet::new();","sourceCodeStart":1224,"sourceCodeEnd":1260,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/verification.rs#L1224-L1260","documentation":"The validator compares the deployment manifest's embedded `version` field against the separately configured `manifest_version`. If they differ, the configured identity and the manifest content disagree, which would let a stale or swapped manifest masquerade under the configured version. Validation fails with this message.","triggerScenarios":"Validating a DeploymentConfig where `config.manifest_version != config.deployment_manifest.version` (e.g. config bumped to a new version but the manifest file was not regenerated).","commonSituations":"Partial release rollout: config updated, manifest artifact stale; hotfix edits the manifest version directly but forgets the config; two environments sharing one manifest with different configured versions.","solutions":["Make `config.manifest_version` exactly equal `deployment_manifest.version` (prefer deriving one from the other).","Regenerate the manifest for the new version and recompute the digest, then update the config.","Pin both values from a single source (build script or manifest artifact) so they cannot drift."],"exampleFix":"// before\nlet config = DeploymentConfig { manifest_version: \"v1.3.0\".into(), ..config }; // manifest.version == \"v1.2.0\"\n// after\nlet config = DeploymentConfig { manifest_version: manifest.version.clone(), ..config };","handlingStrategy":"validation","validationCode":"assert_eq!(\n    config.manifest_version,\n    config.deployment_manifest.version,\n    \"configured manifest_version must equal the manifest's own version\"\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive config.manifest_version from the manifest at load time instead of storing it twice.","Bump version and regenerate the manifest in the same commit/release step.","Run a startup assertion comparing the two versions before calling verification APIs."],"tags":["validation","mismatch","config"],"backgroundTag":"type-mismatch","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}