FuelLabs/fuel-core · error

The transaction estimation requires running of predicate mor

Error message

The transaction estimation requires running of predicate more than {} times

What it means

When estimatePredicates is true, the assembler runs predicate estimation; every time new inputs are added (e.g. coins to cover the fee) predicates consuming gas must be re-estimated. The node caps the number of estimation rounds at GraphQL config assemble_tx_estimate_predicates_limit (default 5, set in service/config.rs) and errors when assembly would need more rounds.

Source

Thrown at crates/fuel-core/src/schema/tx/assemble_tx.rs:666

    fn adjust_witness_limit(&mut self) {
        // If the user sets the `WitnessLimit` policy, we are only allowed to increase
        // it in the case if the transaction got more witnesses when we inserted new inputs.
        let mut witness_size = self.tx.witnesses().size_dynamic() as u64;
        witness_size = witness_size.max(self.original_witness_limit);
        self.tx.set_witness_limit(witness_size);
    }

    async fn estimate_predicates(mut self) -> anyhow::Result<Self> {
        if !self.arguments.estimate_predicates {
            return Ok(self)
        }

        if !self.has_predicates {
            return Ok(self)
        }

        if self.estimated_predicates_count >= self.arguments.estimate_predicates_limit {
            return Err(anyhow::anyhow!(
                "The transaction estimation requires running \
                of predicate more than {} times",
                self.arguments.estimate_predicates_limit
            ));
        }

        let memory = self.arguments.shared_memory_pool.get_memory().await;
        let chain_id = self.arguments.consensus_parameters.chain_id();
        self.tx
            .precompute(&chain_id)
            .map_err(|err| anyhow::anyhow!("{:?}", err))?;

        let parameters =
            CheckPredicateParams::from(self.arguments.consensus_parameters.as_ref());
        let read_view = self.arguments.read_view.clone();

        let mut tx_to_estimate = self.tx;
        let estimated_tx = tokio_rayon::spawn_fifo(move || {

View on GitHub (pinned to b9d4d170da)

Solutions

  1. Consolidate the fee-paying account's coins so one round of coin addition suffices
  2. Run a node with a higher --assemble-tx-estimate-predicates-limit (GraphQL config) if you control it
  3. Avoid enabling estimatePredicates when the tx's predicates have fixed gas usage, or pre-fund the account so fewer fee rounds are needed

Example fix

# before (node config)
# default: assemble_tx_estimate_predicates_limit = 5, tx keeps failing

# after (fuel-core node TOML)
[graphql]
assemble_tx_estimate_predicates_limit = 20
Defensive patterns

Strategy: retry

Validate before calling

// client-side: know the node's limit and the wallet's fragmentation before enabling estimation
const rounds = estimateFeeRounds(feeAccountCoins, estimatedFee); // coins needed / coins per round
if (estimatePredicates && rounds > NODE_ESTIMATE_PREDICATES_LIMIT /* default 5 */) {
  throw new Error('consolidate coins or raise assemble_tx_estimate_predicates_limit');
}

Try / catch

catch (e) { if (/running of predicate more than/.test(e.message)) { /* consolidate the predicate account's coins; if you run the node raise assemble_tx_estimate_predicates_limit; retry once */ } else throw e; }

Prevention

When it happens

Trigger: assembleTransaction with estimatePredicates: true on a tx where the fee-covering loop keeps adding coins, each addition triggering another predicate re-estimation, exceeding the configured round limit (5 by default).

Common situations: Predicate-based accounts with dusty base-asset coins (many add-then-re-estimate rounds); high gas price forcing several coin-fetch iterations; node operators who lowered the limit (fuel-core sets 1 in some test configs).

Related errors


AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16). Data as JSON: /api/errors/d2913605632f9609. Report an issue: GitHub.