If you evaluate the architecture of next-generation, high-throughput networks — Sui, Aptos, or advanced modular sequencers — you will notice a fundamental shiftIf you evaluate the architecture of next-generation, high-throughput networks — Sui, Aptos, or advanced modular sequencers — you will notice a fundamental shift

Disaggregating the Mempool: The Memory Architecture of DAG Consensus

2026/06/21 01:06
6분 읽기
이 콘텐츠에 대한 의견이나 우려 사항이 있으시면 [email protected]으로 연락주시기 바랍니다

If you evaluate the architecture of next-generation, high-throughput networks — Sui, Aptos, or advanced modular sequencers — you will notice a fundamental shift in how they handle state. They have entirely abandoned the traditional monolithic block-building process.

Instead of a single leader proposing a block of transactions over a synchronous gossip network, these systems utilize protocols inspired by Narwhal, Bullshark, and more recently, Mysticeti. They separate data dissemination from consensus ordering. Nodes continuously stream transaction batches to each other, building a Directed Acyclic Graph (DAG) of causal history entirely in system memory. Consensus is then run purely on the structural metadata (the references within the graph) rather than the payload itself.

From a theoretical standpoint, this solves the leader bottleneck and allows throughput to scale linearly with bandwidth. But as an infrastructure advisor, I don’t look at the theory. I look at the implementation.

When you shift the entire transaction dissemination layer into a continuous, ever-expanding graph structure, you introduce a massive systems engineering hurdle: Memory Management and Concurrent State Traversal. If you misconfigure the garbage collection of a DAG mempool, your 256GB RAM validator will hit an Out-Of-Memory (OOM) panic and crash in minutes.

Here is the engineering teardown of how high-performance DAG mempools manage memory boundaries, the shift toward uncertified graphs, and exactly where the implementations bottleneck under load.

1. The DAG Paradigm: Causal History in RAM

In a traditional blockchain, consensus and data availability are bundled into one linear process. In a DAG-based system, validators do not wait for a block time. They constantly ingest user transactions, package them into “vertices” (or batches), and broadcast them.

When a validator creates a new vertex for the current Round (let’s say, Round $R$), that vertex must include cryptographic pointers to a quorum of vertices from the previous round (Round $R-1$).

In older models like Narwhal, these were Certified DAGs, meaning every vertex required $2f+1$ signatures (a certificate) before it could be referenced, heavily taxing the CPU with signature verification. Bleeding-edge protocols like Mysticeti utilize Uncertified DAGs, completely dropping the reliable broadcast phase. Vertices are simply linked via “strong edges” (references to $f+1$ previous vertices).

This creates a dense, interlocking, and highly complex web of causal history resident entirely in the node’s system RAM. Because the network is asynchronous, different nodes will see different parts of the graph at different times. The node must hold this entire structure in memory so that when the consensus engine “commits” a specific leader vertex, the node can deterministically traverse the graph backward to sequence all the transactions that led to it.

2. The Unbounded Graph and the OOM Threat

Herein lies the architectural danger: a DAG naturally grows unboundedly.

If a network is processing 100,000 transactions per second, it is generating thousands of vertices and tens of thousands of edge connections in memory every few seconds. In the actual node codebase (usually written in Rust), this is represented across three parallel memory structures:

  1. The DAG Map: A massive concurrent hash map keyed by {validator_id, round} pointing to the vertex metadata.
  2. The Batch Store: The actual raw transaction payloads referenced by the DAG.
  3. The Pending Transactions Map: User transactions waiting to be packed into a vertex.

If the node does not aggressively and safely prune these three structures, the memory heap balloons. A malicious actor can execute an Equivocation DoS Attack. By intentionally broadcasting conflicting uncertified vertices, the attacker forces honest nodes to store multiple branching histories in RAM. Because the protocol cannot immediately discard equivocations without violating liveness, the graph bloats exponentially, triggering the OS OOM killer and crashing the validator.

3. Watermark Garbage Collection (The Implementation Subtlety)

You cannot simply delete a vertex from memory just because the consensus thread successfully ordered it. Because the network is asynchronous, a slower, honest validator might still be constructing a path that references that exact vertex. If you drop it from RAM prematurely, you break the causal history for your peers, effectively acting as a Byzantine (faulty) node.

To safely prune the graph without breaking the network, elite implementations use Watermark Garbage Collection.

The memory manager must track the state across the graph using two strict boundaries:

  • The High Watermark: The latest round that the consensus engine has successfully committed locally.
  • The Low Watermark: The oldest round that is still needed by the slowest honest validator to maintain liveness.

The node must continuously calculate the progress of $f+1$ honest validators. The mathematical invariant is strict: Never GC below the $f+1$ honest validators’ watermarks. Only when the protocol mathematically guarantees that a vertex falls definitively below the Low Watermark can the memory manager safely unlink the pointers, deallocate the structs from the DAG Map, and hand the memory back to the OS.

4. The Concurrency Nightmare: Traversal vs. Pruning

Even with a perfect watermark algorithm, the physical act of freeing memory introduces a severe multithreading bottleneck.

A DAG mempool is a highly concurrent environment. It is constantly being mutated by ingress threads (adding new vertices from peers), traversed by the consensus thread (running topological sorts to commit transactions), and purged by the GC thread.

If the implementation relies on standard Read-Write locks (RwLock)—for example, locking the entire DAG Map during a GC sweep to prevent data races—the node's throughput will periodically plummet to zero. When the GC thread takes the write-lock to delete Round $R-50$, the consensus thread is blocked from reading Round $R$, stalling the entire sequencing pipeline.

To survive mainnet traffic, protocols must abandon standard mutexes and implement Lock-Free Concurrent Data Structures combined with advanced memory reclamation strategies like Epoch-Based Reclamation (EBR) or Hazard Pointers (commonly found in high-performance Rust crates like crossbeam-epoch).

These paradigms allow the consensus thread to traverse the graph using atomic pointers without ever blocking. When the GC thread identifies a vertex below the Low Watermark, it unlinks it atomically (Logical Unlink), but delays the actual physical memory deallocation until it can mathematically prove no active consensus thread is currently holding a reference to that specific memory address.

Follow me on X.


Disaggregating the Mempool: The Memory Architecture of DAG Consensus was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.

시장 기회
Constellation 로고
Constellation 가격(DAG)
$0.008398
$0.008398$0.008398
+4.94%
USD
Constellation (DAG) 실시간 가격 차트

World Cup Combo: Aim for 200x

World Cup Combo: Aim for 200xWorld Cup Combo: Aim for 200x

Combine up to 20 World Cup matches in one order

면책 조항: 본 사이트에 재게시된 글들은 공개 플랫폼에서 가져온 것으로 정보 제공 목적으로만 제공됩니다. 이는 반드시 MEXC의 견해를 반영하는 것은 아닙니다. 모든 권리는 원저자에게 있습니다. 제3자의 권리를 침해하는 콘텐츠가 있다고 판단될 경우, [email protected]으로 연락하여 삭제 요청을 해주시기 바랍니다. MEXC는 콘텐츠의 정확성, 완전성 또는 시의적절성에 대해 어떠한 보증도 하지 않으며, 제공된 정보에 기반하여 취해진 어떠한 조치에 대해서도 책임을 지지 않습니다. 본 콘텐츠는 금융, 법률 또는 기타 전문적인 조언을 구성하지 않으며, MEXC의 추천이나 보증으로 간주되어서는 안 됩니다.

$5M in SPCX Positions for Free

$5M in SPCX Positions for Free$5M in SPCX Positions for Free

0 fees, 100x leverage, daily prizes, 7K+ stocks/ETFs