nautechsystems/nautilus_trader · critical · anyhow::Error

No durable store configured; refusing to submit a…

Error message

No durable store configured; refusing to submit a transaction

What it means

transaction_executor() assembles the components needed to submit any on-chain transaction (wrap, approve, order submission, reconciliation). It requires cache.database (the durable store used to persist execution intents before submission) to be present; without durable persistence the client refuses to submit, since an in-flight transaction could become unreconcilable on crash.

Solutions

  1. Configure the durable cache database (postgres_cache_database_config) before connecting the client.
  2. Verify the client's connect() path populated cache.database; if not, fix cache configuration.
  3. Do not attempt live transaction submission with an ephemeral/in-memory-only cache.
  4. Check startup logs/config loading to confirm the database was constructed.

Example fix

// before
let config = ExecutionClientConfig { cache: CacheConfig::in_memory(), .. };
client.submit_order(order).await?;
// after
let config = ExecutionClientConfig {
    postgres_cache_database_config: Some(pg_config),
    ..Default::default()
};
client.connect().await?; // initializes cache.database
client.submit_order(order).await?;
Defensive patterns

Strategy: validation

Validate before calling

anyhow::ensure!(
    config.postgres_cache_database_config.is_some() || client.has_durable_cache(),
    "configure a durable store before transaction submission"
);

Try / catch

match client.submit_order(order).await {
    Err(e) if e.to_string().contains("No durable store configured") => {
        return Err(anyhow::anyhow!(
            "refusing to trade: durable cache database is required in live mode"
        ));
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling wrap(), approve(), submit_order(), or reconcile_unresolved_execution() on a client whose cache.database is None (no durable store configured and no Postgres cache config active).

Common situations: Running the execution client without Postgres cache configuration in live mode; forgetting to enable the cache database before sending orders; a config where only in-memory caching was requested.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

        PayloadKeySet::load(
            self.config.payload_key_env.as_deref(),
            &self.config.payload_key_retired_env,
            self.config.payload_deployment_id.as_deref(),
        )
    }

    fn payload_policy(&self) -> PayloadPolicy {
        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,
        }
    }

    fn transaction_executor(&self) -> anyhow::Result<TransactionExecutor> {
        let database = self.cache.database.clone().ok_or_else(|| {
            anyhow::anyhow!("No durable store configured; refusing to submit a transaction")
        })?;
        let signer = self
            .signer
            .clone()
            .ok_or_else(|| anyhow::anyhow!("Signer not initialized; connect the client first"))?;
        let payload_keys = self.payload_keys.clone().ok_or_else(|| {
            anyhow::anyhow!("Protected payload keys are not initialized; connect the client first")
        })?;
        let verification_config = self
            .config
            .verification
            .as_ref()
            .expect("verification config validated at construction");
        let identities = std::iter::once(&verification_config.authoritative)
            .chain(
                verification_config
                    .verifiers
                    .iter()

View on GitHub (pinned to 18893faf8b)