{"record":{"id":"c26698125af12348","repo":"nautechsystems/nautilus_trader","slug":"verified-action-manifest-identity-changed","errorCode":null,"errorMessage":"Verified action manifest identity changed","messagePattern":"Verified action manifest identity changed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/cache/database.rs","lineNumber":6082,"sourceCode":"            .begin()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to start verified action evidence: {e}\"))?;\n        let (manifest_version, manifest_digest, revision) =\n            sqlx::query_as::<_, (String, String, i64)>(\n                \"\n                SELECT manifest_version, manifest_digest, revision\n                FROM execution_verification_nonce\n                WHERE chain_id = $1 AND wallet_address = $2\n                FOR SHARE\n                \",\n            )\n            .bind(chain_id)\n            .bind(batch.wallet_address)\n            .fetch_optional(&mut *transaction)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to read verified action nonce ledger: {e}\"))?\n            .ok_or_else(|| anyhow::anyhow!(\"Canonical nonce ledger is not initialized\"))?;\n        anyhow::ensure!(\n            manifest_version == batch.manifest_version && manifest_digest == batch.manifest_digest,\n            \"Verified action manifest identity changed\"\n        );\n        let intent_nonce = sqlx::query_scalar::<_, Option<i64>>(\n            \"\n            SELECT nonce\n            FROM execution_intent\n            WHERE id = $1 AND chain_id = $2 AND wallet_address = $3 AND active\n            FOR UPDATE\n            \",\n        )\n        .bind(batch.intent_id)\n        .bind(chain_id)\n        .bind(batch.wallet_address)\n        .fetch_optional(&mut *transaction)\n        .await\n        .map_err(|e| anyhow::anyhow!(\"Failed to lock intent for verified action: {e}\"))?\n        .ok_or_else(|| anyhow::anyhow!(\"Active verified-action intent was not found\"))?;","sourceCodeStart":6064,"sourceCodeEnd":6100,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/database.rs#L6064-L6100","documentation":"Thrown when the manifest_version or manifest_digest in the batch does not match the values stored in the canonical nonce ledger. The ledger pins the verified-action manifest identity; any change (new manifest deployed, digest recomputed differently) must go through re-initialization, otherwise evidence continuity would break.","triggerScenarios":"Calling record_execution_verification_batch after the execution verification manifest was updated (version bump or digest change) without re-initializing the nonce ledger, or with a batch built from stale manifest metadata.","commonSituations":"Deploying a new manifest version while in-flight batches still carry the old version/digest; canonicalization differences (JSON key order, serialization) producing a different digest for the same manifest; mixing environments where ledgers hold different digests.","solutions":["Re-initialize/rotate the execution_verification_nonce ledger to the new manifest_version and manifest_digest, then retry.","Rebuild the batch from the currently deployed manifest metadata so version and digest match the ledger.","Verify the digest computation is deterministic (canonical serialization) across build environments.","Drain or discard in-flight batches created under the old manifest before upgrading."],"exampleFix":"// before: stale manifest metadata in batch\nlet batch = ExecutionVerificationBatch { manifest_version: \"v1\".into(), manifest_digest: old_digest, .. };\n// after: derive from the deployed manifest\nlet manifest = load_deployed_manifest();\nlet batch = ExecutionVerificationBatch { manifest_version: manifest.version.clone(), manifest_digest: manifest.canonical_digest(), .. };","handlingStrategy":"validation","validationCode":"// Rust: compare manifest identity with the ledger before building the batch\nlet (version, digest) = fetch_ledger_manifest_identity(&db, chain_id, wallet).await?;\nanyhow::ensure!(\n    version == manifest.version && digest == manifest.canonical_digest(),\n    \"manifest drift: ledger=({version},{digest}) local=({}, {})\", manifest.version, manifest.canonical_digest()\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use deterministic canonical serialization when computing manifest digests.","Rotate/reinitialize the ledger as part of the manifest upgrade runbook.","Never reuse batches built under an older manifest after a deploy."],"tags":["manifest","digest","consistency","rust"],"backgroundTag":"checksum-mismatch","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}