{"record":{"id":"206eab5b38384197","repo":"nautechsystems/nautilus_trader","slug":"execution-payload-state-is-missing","errorCode":null,"errorMessage":"Execution payload state is missing","messagePattern":"Execution payload state is missing","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/cache/database.rs","lineNumber":5069,"sourceCode":"        .await\n        .context(\"failed to mark execution payload storage ready\")?;\n        Ok(())\n    }\n\n    async fn validate_execution_payload_ready(&self, keys: &PayloadKeySet) -> anyhow::Result<()> {\n        let mut transaction = self\n            .pool\n            .begin()\n            .await\n            .context(\"failed to start execution payload validation\")?;\n        let state_row = sqlx::query(\n            \"SELECT deployment_id, protocol_version, operation, active_key_id \\\n             FROM execution_payload_state WHERE component = 'signed_transactions' FOR SHARE\",\n        )\n        .fetch_optional(&mut *transaction)\n        .await\n        .context(\"failed to lock execution payload state\")?\n        .ok_or_else(|| anyhow::anyhow!(\"Execution payload state is missing\"))?;\n        let state = execution_payload_state_from_row(&state_row)?;\n        validate_execution_payload_state(&state, keys)?;\n        anyhow::ensure!(\n            state.operation == \"ready\",\n            \"Execution payload storage is not ready\"\n        );\n        let (payload_fence, payload_constraint) =\n            sqlx::query_as::<_, (bool, bool)>(EXECUTION_PAYLOAD_INFRASTRUCTURE_QUERY)\n                .fetch_one(&mut *transaction)\n                .await\n                .context(\"failed to inspect execution payload protection infrastructure\")?;\n        anyhow::ensure!(\n            payload_fence && payload_constraint,\n            \"Execution payload storage is marked ready without its write fence or constraint\"\n        );\n        validate_execution_payload_key_inventory(&mut transaction, keys).await?;\n        transaction\n            .commit()","sourceCodeStart":5051,"sourceCodeEnd":5087,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/database.rs#L5051-L5087","documentation":"The storage verification routine locks the execution_payload_state row (component = 'signed_transactions') with FOR SHARE and errors if no row exists. This means the protection/metadata row that tracks deployment, protocol version, operation, and active key has never been initialized.","triggerScenarios":"Calling storage inspection/promotion APIs before the execution payload protection scheme was initialized; the state row was deleted; connecting to a fresh or legacy database never migrated.","commonSituations":"Pointing the node at an empty/new database without running initialization; restoring a partial backup that omitted execution_payload_state; environment misconfiguration pointing at the wrong database.","solutions":["Run the execution payload storage initialization/migration to create the state row","Verify you are connected to the intended database/schema","Restore the execution_payload_state row from backup","Check deployment tooling actually ran the init step before starting the node"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let state: Option<(String,)> = sqlx::query_as(\"SELECT operation FROM execution_payload_state WHERE component = 'signed_transactions'\").fetch_optional(&mut conn).await?;\nif state.is_none() { initialize_payload_storage(&mut conn).await?; }","typeGuard":null,"tryCatchPattern":"match err.downcast_ref::<String>() {\n    Some(msg) if msg.contains(\"Execution payload state is missing\") => initialize_storage().await,\n    _ => return Err(err),\n}","preventionTips":["Always run storage initialization before starting the node","Confirm the DSN points at the intended database/schema","Include execution_payload_state in backup/restore procedures","Health-check the state row at startup"],"tags":["database","missing-state","initialization"],"backgroundTag":"record-not-found","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"}