{"record":{"id":"470399c34068bde0","repo":"nautechsystems/nautilus_trader","slug":"execution-payload-protection-version-version-is","errorCode":null,"errorMessage":"Execution payload protection version {version} is newer than supported version {EXECUTION_PAYLOAD_PROTOCOL_VERSION}","messagePattern":"Execution payload protection version (.+?) is newer than supported version (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/adapters/blockchain/src/cache/database.rs","lineNumber":4617,"sourceCode":"        .await\n        .map_err(|e| anyhow::anyhow!(\"Failed to activate verification schema: {e}\"))?;\n\n        transaction\n            .commit()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to commit verification migration: {e}\"))?;\n        Ok(())\n    }\n\n    /// Activates or resumes protected signed-transaction storage for this database.\n    pub(crate) async fn ensure_execution_payload_storage(\n        &self,\n        keys: &PayloadKeySet,\n    ) -> anyhow::Result<()> {\n        let marker = self.execution_payload_marker().await?;\n        match marker {\n            None => self.activate_execution_payload_storage(keys).await?,\n            Some(version) => anyhow::ensure!(\n                version == EXECUTION_PAYLOAD_PROTOCOL_VERSION,\n                \"Execution payload protection version {version} is newer than supported version {EXECUTION_PAYLOAD_PROTOCOL_VERSION}\"\n            ),\n        }\n\n        loop {\n            let state = self.execution_payload_state().await?.ok_or_else(|| {\n                anyhow::anyhow!(\"Execution payload marker exists without durable state\")\n            })?;\n            validate_execution_payload_state(&state, keys)?;\n            match state.operation.as_str() {\n                \"migrate\" => {\n                    if self\n                        .migrate_execution_payload_batch(keys, EXECUTION_PAYLOAD_BATCH_SIZE)\n                        .await?\n                    {\n                        break;\n                    }","sourceCodeStart":4599,"sourceCodeEnd":4635,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/database.rs#L4599-L4635","documentation":"A guard in `ensure_execution_payload_storage`: the database already has an execution payload protection marker whose protocol version differs from the version this binary supports (EXECUTION_PAYLOAD_PROTOCOL_VERSION). Because the stored version is newer than (or simply not equal to) what this build understands, the node refuses to proceed rather than corrupting protected signed-transaction storage.","triggerScenarios":"Calling `ensure_execution_payload_storage` when `execution_payload_marker()` returns Some(version) and version != EXECUTION_PAYLOAD_PROTOCOL_VERSION — i.e. the database was initialized by a newer release with a bumped payload protection protocol and you then started an older binary against the same DB.","commonSituations":"Downgrade: running a previous release after a newer one upgraded the storage protocol; pointing a test/staging build at a production database initialized by a newer version; hot-swap between builds with different protocol constants.","solutions":["Upgrade to the release whose EXECUTION_PAYLOAD_PROTOCOL_VERSION matches the stored marker version","Check the stored version: SELECT version FROM execution_schema_version WHERE component = '<payload component>'","If a downgrade is truly required, restore a database backup taken with the old version — do not hand-edit the marker","Confirm you are pointing at the intended database (env/config DATABASE_URL)"],"exampleFix":"// before: old binary against upgraded DB\nlet db = Database::connect(config.postgres_url.as_str()).await?; // panics/errors: version mismatch\n// after: pin binary version compatible with the DB, or verify first\nlet stored: i16 = sqlx::query_scalar(\n    \"SELECT version FROM execution_schema_version WHERE component = $1\")\n    .bind(EXECUTION_PAYLOAD_COMPONENT).fetch_one(&pool).await?;\nassert_eq!(stored, EXECUTION_PAYLOAD_PROTOCOL_VERSION, \"update the node binary\");","handlingStrategy":"validation","validationCode":"let stored: Option<i16> = sqlx::query_scalar(\n    \"SELECT version FROM execution_schema_version WHERE component = $1\")\n    .bind(EXECUTION_PAYLOAD_COMPONENT).fetch_optional(&pool).await?;\nif let Some(v) = stored {\n    assert_eq!(v, EXECUTION_PAYLOAD_PROTOCOL_VERSION,\n        \"DB payload protocol {} incompatible with binary {}; update the node\",\n        v, EXECUTION_PAYLOAD_PROTOCOL_VERSION);\n}","typeGuard":"fn is_compatible_protocol(stored: Option<i16>, supported: i16) -> bool {\n    matches!(stored, None | Some(v) if v == supported)\n}","tryCatchPattern":"match ensure_execution_payload_storage(&db, &keys).await {\n    Err(e) if e.to_string().contains(\"newer than supported version\") => {\n        eprintln!(\"DB was upgraded by a newer release; upgrade this node binary before connecting\");\n        std::process::exit(78); // EX_CONFIG\n    }\n    other => other?,\n}","preventionTips":["Pin node binary versions per database; never downgrade below the version that last wrote the DB","Check the stored protocol version in deployment scripts before rollout","Use separate databases per binary version during canary rollouts","Alert on protocol-version mismatch in pre-flight health checks"],"tags":["version-mismatch","protocol","postgres","downgrade"],"backgroundTag":"incompatible-source-type","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"}