nautechsystems/nautilus_trader · error · anyhow::Error

Execution payload protocol version

Error message

Execution payload protocol version {} is not supported

What it means

This ensure! check validates that a deserialized ExecutionPayloadState row was written with the same EXECUTION_PAYLOAD_PROTOCOL_VERSION the current code supports. A payload stored by a newer (or older, unsupported) schema version of the software cannot be safely decoded, so the load is refused.

Solutions

  1. Run the binary version that wrote the payload, or upgrade to a version matching the stored protocol_version
  2. Migrate or rebuild the cache database so payloads are stored with the supported protocol version
  3. Point the node at a cache database created by the same software version
Defensive patterns

Strategy: validation

Validate before calling

if stored.protocol_version != EXECUTION_PAYLOAD_PROTOCOL_VERSION {
    return Err(format!("payload written by incompatible version (protocol {})", stored.protocol_version));
}

Prevention

When it happens

Trigger: Loading an execution payload row whose stored protocol_version differs from EXECUTION_PAYLOAD_PROTOCOL_VERSION — typically after rolling back to an older build or pointing the cache at a database written by a newer release.

Common situations: Downgrading the binary while keeping an existing cache database; sharing one Postgres cache between nodes running different versions; restoring a snapshot from another deployment.

Related errors


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

Appendix: source

Thrown at crates/adapters/blockchain/src/cache/database.rs:7484

    }
}

fn execution_payload_state_from_row(
    row: &sqlx::postgres::PgRow,
) -> anyhow::Result<ExecutionPayloadState> {
    Ok(ExecutionPayloadState {
        deployment_id: row.try_get("deployment_id")?,
        protocol_version: row.try_get("protocol_version")?,
        operation: row.try_get("operation")?,
        active_key_id: row.try_get("active_key_id")?,
    })
}

fn validate_execution_payload_state(
    state: &ExecutionPayloadState,
    keys: &PayloadKeySet,
) -> anyhow::Result<()> {
    anyhow::ensure!(
        state.protocol_version == EXECUTION_PAYLOAD_PROTOCOL_VERSION,
        "Execution payload protocol version {} is not supported",
        state.protocol_version
    );
    anyhow::ensure!(
        state.deployment_id == keys.deployment_id(),
        "Execution payload deployment ID does not match this database"
    );
    anyhow::ensure!(
        state.active_key_id.as_slice() == keys.active_key_id(),
        "Configured active payload key does not match the database active key"
    );
    Ok(())
}

async fn lock_execution_payload_operation(
    transaction: &mut Transaction<'_, Postgres>,
) -> anyhow::Result<()> {

View on GitHub (pinned to 18893faf8b)