{"record":{"id":"b4139f4a9d807b56","repo":"nautechsystems/nautilus_trader","slug":"postgres-execution-requires-protected-payload-stor-b4139f","errorCode":null,"errorMessage":"Postgres execution requires protected payload storage","messagePattern":"Postgres execution requires protected payload storage","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":5911,"sourceCode":"            self.cache.initialize_chain().await;\n            self.cache.ensure_execution_transaction_schema().await?;\n            let check = self\n                .cache\n                .database\n                .as_ref()\n                .expect(\"database was attached\")\n                .check_execution_payload_storage(\n                    Some(keys),\n                    Some(PayloadPolicy {\n                        chain_id: self.chain.chain_id,\n                        signer: self.wallet_address,\n                        gas_limit: self.config.gas_limit,\n                        max_fee_per_gas: self.config.max_fee_per_gas_wei,\n                    }),\n                    100,\n                )\n                .await?;\n            anyhow::ensure!(\n                check.protected,\n                \"Postgres execution requires protected payload storage\"\n            );\n        } else {\n            log::warn!(\n                \"No Postgres cache database configured; transactions will be refused (no durable store)\"\n            );\n        }\n        self.payload_keys = payload_keys;\n\n        let verification = self\n            .config\n            .verification\n            .as_ref()\n            .expect(\"verification config validated at construction\");\n        let position = if let Some(database) = self.cache.database.as_ref() {\n            database\n                .load_execution_verification_position(","sourceCodeStart":5893,"sourceCodeEnd":5929,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L5893-L5929","documentation":"After connecting to the Postgres cache database, the client runs a protection check against the durable payload store (with gas limit and fee parameters) and requires check.protected to be true. This verifies the storage enforces protections (e.g., that stored payloads cannot be tampered with or replayed across deployments). If the store reports unprotected, startup aborts so transactions are never executed without durable, protected storage.","triggerScenarios":"Starting with a Postgres cache database whose payload storage check returns protected=false — e.g. a database initialized by an older schema/version, a manually created or migrated schema missing protection metadata, or pointing at a database not initialized by this client.","commonSituations":"Upgrading the client against a legacy database that predates the protected-storage feature; running against a database from another environment/deployment; a failed migration leaving the schema half-initialized; connecting to a fresh DB that was never initialized by the client's setup/migration path.","solutions":["Run the database setup/migration path to (re)initialize the payload store with protection metadata enabled","Verify you are pointing at the correct database for this deployment — not a legacy or foreign environment's DB","Check the client/database version compatibility and upgrade the schema via the supported migration tooling","If the check still reports unprotected after migration, recreate the database and let the client initialize it from scratch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// confirm the store is initialized and protected before startup\nlet check = payload_store.protection_check(gas_limit, max_fee_per_gas).await?;\nassert!(check.protected, \"payload storage not protected; run schema migration first\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run the client's database initialization/migration before first use, including after upgrades","Keep client and database schema versions compatible; migrate before rolling new binaries","Never point a deployment at another environment's database","Recreate and reinitialize the database if protection metadata is missing"],"tags":["postgres","payload-storage","safety","schema"],"backgroundTag":"schema-validation-failed","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"}