nautechsystems/nautilus_trader · critical

Postgres execution requires protected payload storage

Error message

Postgres execution requires protected payload storage

What it means

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.

Source

Thrown at crates/adapters/blockchain/src/execution/client.rs:5911

            self.cache.initialize_chain().await;
            self.cache.ensure_execution_transaction_schema().await?;
            let check = self
                .cache
                .database
                .as_ref()
                .expect("database was attached")
                .check_execution_payload_storage(
                    Some(keys),
                    Some(PayloadPolicy {
                        chain_id: self.chain.chain_id,
                        signer: self.wallet_address,
                        gas_limit: self.config.gas_limit,
                        max_fee_per_gas: self.config.max_fee_per_gas_wei,
                    }),
                    100,
                )
                .await?;
            anyhow::ensure!(
                check.protected,
                "Postgres execution requires protected payload storage"
            );
        } else {
            log::warn!(
                "No Postgres cache database configured; transactions will be refused (no durable store)"
            );
        }
        self.payload_keys = payload_keys;

        let verification = self
            .config
            .verification
            .as_ref()
            .expect("verification config validated at construction");
        let position = if let Some(database) = self.cache.database.as_ref() {
            database
                .load_execution_verification_position(

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Run the database setup/migration path to (re)initialize the payload store with protection metadata enabled
  2. Verify you are pointing at the correct database for this deployment — not a legacy or foreign environment's DB
  3. Check the client/database version compatibility and upgrade the schema via the supported migration tooling
  4. If the check still reports unprotected after migration, recreate the database and let the client initialize it from scratch
Defensive patterns

Strategy: validation

Validate before calling

// confirm the store is initialized and protected before startup
let check = payload_store.protection_check(gas_limit, max_fee_per_gas).await?;
assert!(check.protected, "payload storage not protected; run schema migration first");

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/b4139f4a9d807b56. Report an issue: GitHub.