nautechsystems/nautilus_trader · error

Signed transaction gas limit {} exceeds configured ceiling {

Error message

Signed transaction gas limit {} exceeds configured ceiling {}

What it means

validate_signed_transaction checks a signed EVM transaction against the policy ceilings declared in its intent. This error fires when the signed transaction's gas limit exceeds the intent's configured gas_limit ceiling. It exists to ensure builder-produced or user-signed transactions can never spend more gas than the strategy authorized.

Source

Thrown at crates/adapters/blockchain/src/execution/transaction.rs:308

        "Signed transaction destination {} does not match persisted destination {}",
        tx.to,
        intent.to
    );
    anyhow::ensure!(
        tx.value == intent.value,
        "Signed transaction value does not match persisted value"
    );
    anyhow::ensure!(
        tx.input == intent.input,
        "Signed transaction calldata does not match persisted calldata"
    );
    anyhow::ensure!(
        tx.gas_limit <= intent.gas_limit,
        "Signed transaction gas limit {} exceeds configured ceiling {}",
        tx.gas_limit,
        intent.gas_limit
    );
    anyhow::ensure!(
        tx.max_fee_per_gas <= u128::from(intent.max_fee_per_gas),
        "Signed transaction max fee per gas {} wei exceeds configured ceiling {} wei",
        tx.max_fee_per_gas,
        intent.max_fee_per_gas
    );
    anyhow::ensure!(
        tx.max_priority_fee_per_gas <= tx.max_fee_per_gas,
        "Signed transaction priority fee per gas {} wei exceeds max fee per gas {} wei",
        tx.max_priority_fee_per_gas,
        tx.max_fee_per_gas
    );

    Ok(())
}

/// Applies `gas_buffer_bps` over the `eth_estimateGas` result.
///
/// A buffered estimate above `gas_limit` rejects the transaction rather than clamping to the

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Raise the intent's gas_limit ceiling to cover the transaction's estimated gas, with headroom
  2. Re-generate the signed transaction with gas_limit set at or below the intent ceiling
  3. Check why gas estimation inflated (new contract code, increased loop iterations) and adjust policy
  4. Verify the intent used for signing is the current one, not a stale/replayed one

Example fix

// before
intent.gas_limit = 50_000; // too low for the swap
// after
intent.gas_limit = 120_000; // ceiling >= estimated gas with headroom
Defensive patterns

Strategy: validation

Validate before calling

if let Some(tx) = decoded_tx {
    assert!(tx.gas_limit <= intent.gas_limit, "tx gas_limit {} exceeds ceiling {}", tx.gas_limit, intent.gas_limit);
}

Type guard

fn within_gas_ceiling(tx_gas_limit: u64, intent_gas_limit: u64) -> bool {
    tx_gas_limit <= intent_gas_limit
}

Prevention

When it happens

Trigger: A signed transaction is decoded in validate_signed_transaction and its tx.gas_limit is strictly greater than intent.gas_limit; raised via anyhow::ensure! before the transaction is accepted (authenticate_payload_identity_with_signer path).

Common situations: A transaction builder estimates gas higher than the ceiling configured in the intent; a signer wallet auto-estimates and raises the gas limit; the intent's gas ceiling was set too low for the current contract workload; stale intents replayed after gas costs grew.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


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