---
title: "Linearization (Mempool) — definition | Nuri Glossary"
description: "Ordering related mempool transactions so the block captures as much fee as weight allows."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/linearization"
---

# Linearization (Mempool)

Ordering related mempool transactions so the block captures as much fee as weight allows.

## Basically

Linearisation puts related Bitcoin transactions in the order that collects the most fees. It keeps each block within its weight limit and puts every parent before its children.

## Key Takeaways

- Linearisation orders transactions within a cluster to maximise miner revenue by finding the most profitable sequence for including related transactions in a block while respecting parent-child dependencies.
- Chunks are the atomic units of a linearisation, grouped with strictly non-increasing feerate, and each chunk is mined or evicted as a single unit.
- Better linearisation improves fee estimation, block building and eviction accuracy because cluster mempool replaces conflicting heuristics with a unified ordering and a single consistent view of transaction priority.

## What Is Linearisation?

Linearisation is the process of arranging related mempool transactions into a topologically valid order that maximises the total fees a miner can capture within block weight constraints. A topologically valid order means every parent transaction appears before its children in the sequence.
The concept is central to cluster mempool, a redesign of how Bitcoin Core manages unconfirmed transactions. Connected transactions, meaning those linked by spending relationships, form a cluster, and linearisation determines the optimal mining order within each cluster. The result directly affects how blocks are built, which transactions get evicted when the mempool is full, and how accurately wallets can estimate fees.

## How It Works

The linearisation algorithm takes a cluster of related transactions and produces an ordered list. The process is iterative.
Each subset extracted at each step becomes a chunk. By always extracting the highest-feerate valid subset first, the resulting linearisation maximises fee revenue when transactions are mined in that order.

## Chunks and the Feerate Diagram

Chunks are the atomic units that emerge from linearisation. They are derived by plotting each prefix of the linearisation on a feerate diagram, with cumulative size on the X-axis and cumulative fee on the Y-axis, and computing the convex hull. Each segment of the convex hull corresponds to one chunk.
Chunks have key properties. The chunk-based view gives mining and eviction the same ordering.
The chunk-based view provides a single consistent ordering for both mining and eviction. Mining selects the highest-feerate chunks first, while eviction removes the lowest-feerate chunks first, eliminating the inconsistencies of the previous system.

## The Linearisation Algorithm

The core algorithm can be expressed at a high level. Its central task is to find the subset with the highest feerate.
The critical step is find_highest_feerate_subset. Finding the truly optimal subset was initially conjectured to be NP-hard, but researcher Stefan Richter demonstrated in 2025 that it reduces to the maximum-ratio closure problem, which is solvable in polynomial time via parametric min-cut algorithms. Despite this theoretical result, Bitcoin Core still uses heuristic approaches because the polynomial-time exact solution can be too slow for the microsecond-level time budgets required in real-time mempool management.
Bitcoin Core has iterated through several algorithm generations. The current implementation uses the SFL algorithm.
Bitcoin Core also employs a merge algorithm that combines two linearisations into an output that dominates both. A PostLinearize step further refines the result through front-to-back and back-to-front passes.

## Comparison with the Previous Approach

Before cluster mempool, Bitcoin Core used two separate orderings that could conflict. They were independent approximations with different failure modes.
The system could evict high-value transactions that should have been kept. It could also fail to correctly evaluate complex CPFP chains where multiple children pay for the same parent. Additionally, blunt limits of 25 ancestors and 25 descendants constrained legitimate transaction chains.
Cluster mempool replaces these conflicting heuristics with a single chunk-based ordering. Mining selects the highest-feerate chunks, while eviction removes the lowest-feerate chunks. The ancestor and descendant count limits are replaced by cluster-level limits, currently 64 transactions and 101 kvB per cluster, which are less restrictive for most use cases.

## Block Template Construction

With linearised clusters, building a block template becomes a straightforward merge across cluster chunks. The algorithm iterates through all clusters, picks the chunk with the highest available feerate, and adds it to the block until the block is full. When a chunk does not fit entirely in the remaining block space, sub-chunk granularity allows breaking it into smaller "absorption sets" to fill remaining space more efficiently.
Block revenue improvement from cluster mempool linearisation is estimated at 2-5% per block compared to the old ancestor-feerate approach. For more detail on how block construction works, see our research on block template construction.

## Fee Estimation

Accurate fee estimation depends on the competitive ordering of transactions in the mempool. Linearisation provides the actual order in which transactions are expected to be mined and accounts for the full chunk of transactions that would be included together, which is more faithful to miner behaviour than the old ancestor-feerate approximation and leads to more accurate fee predictions for wallet software. See our comparison of fee estimation algorithms for a deeper analysis.

## CPFP Handling

Linearisation naturally handles child-pays-for-parent scenarios. When a low-fee parent is paired with a high-fee child, they are grouped into the same cluster and typically the same chunk. The chunk feerate reflects their combined economics, so the child's high fee effectively pulls the parent into the block, while complex CPFP chains with multiple children paying for the same parent are evaluated correctly, which was a weakness of the old ancestor-feerate system.
The old CPFP carveout rule, which allowed one additional child to bypass descendant limits, was eliminated in Bitcoin Core 31.0 because the cluster framework handles these cases natively. For background on fee bumping strategies, see our guide to RBF and CPFP.

## Replace-By-Fee Evaluation

Linearisation enables more precise replace-by-fee evaluation. Bitcoin Core 31.0 requires that a replacement transaction strictly improves the mempool's overall feerate diagram. This stronger and more principled criterion replaces the previous set of ad hoc RBF rules and reduces the risk of transaction pinning attacks.

## Mempool Eviction

When the mempool reaches capacity, linearisation determines which transactions to remove. The system evicts the lowest-feerate chunks first, ensuring that the most economically valuable transactions are retained. Because eviction uses the same chunk ordering as mining, its decisions are fully consistent with block building priorities.

## Why It Matters

Linearisation is a foundational improvement to Bitcoin's fee market infrastructure. By providing a unified, consistent ordering for all mempool operations, it solves several long-standing issues.
For Layer 2 protocols like the Lightning Network and Spark, better linearisation translates to more predictable fee bumping for commitment transactions and more reliable on-chain settlement. The removal of ancestor and descendant count limits also benefits protocols that create complex transaction chains. For a comprehensive overview of the cluster mempool redesign, see our cluster mempool explainer.

## Computational Overhead

Linearisation adds computational work to mempool management. While the current SFL algorithm performs well on real mempool data, clusters with very high dependency density can still be expensive to linearise. Bitcoin Core mitigates this through cluster size limits and time budgets that bound worst-case computation.

## Cluster Size Limits

The cluster mempool design imposes limits of 64 transactions and 101 kvB per cluster. While less restrictive than the old 25/25 ancestor/descendant limits for most use cases, these constraints can still affect protocols that create large transaction graphs. Transactions that would exceed cluster limits are rejected from the mempool.

## Heuristic Approximations

Despite the theoretical possibility of exact polynomial-time solutions, Bitcoin Core relies on heuristic algorithms for practical performance. Linearisations are therefore near-optimal rather than guaranteed optimal. The merge and post-processing steps help close the gap, and the LIMO meta-algorithm ensures output quality never degrades below the ancestor-set baseline.

## Network-Wide Consistency

Different nodes may produce slightly different linearisations for the same cluster, since the heuristic algorithms are non-deterministic. Consensus is not affected because block validity is independent of mempool ordering. Fee estimation and relay behaviour can still vary across the network during the transition period as nodes upgrade.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
