DAG-Based Mempool Architecture
- DAG-based mempool architecture is a structured system that indexes pending transactions in a graph, enabling scalable and secure distributed ledger operations.
- It integrates composite data structures like hashtables and red-black trees to optimize direct, random, and sorted access for effective transaction selection.
- The design balances honest miner strategies against fee-based approaches, ensuring throughput, reducing collisions, and supporting large-scale simulation and deployment.
A Directed Acyclic Graph (DAG)-based mempool architecture organizes, indexes, and manages the pool of unconfirmed transactions in distributed ledger protocols that eschew linear blockchain structures in favor of graph-based designs. The architecture of the mempool in such systems is fundamental for achieving scalable, high-throughput transaction processing and supporting efficient, fair, and secure transaction inclusion, particularly under adversarial conditions and large-scale deployments. The following sections detail the key principles, representative designs, algorithmic trade-offs, and implications for both simulation and real-world implementations.
1. Structural Principles of DAG-Based Mempool Architectures
In DAG-based protocols, such as PHANTOM, GHOSTDAG, or IOTA, the mempool is not simply a FIFO queue but a complex structure tracking the set of pending transactions (“tip set” or “candidate set”) that may be included in multiple possible paths through the DAG. This stands in contrast to linear blockchains, where the mempool is a queue from which each new block or mini-block is deterministically formed.
Transactions in a DAG-based mempool can be selected via different strategies, including random selection or fee-based prioritization. The mempool must efficiently support three core access patterns:
- Direct Access: Retrieval by transaction ID, essential for validation and client servicing.
- Random Access: Selection of transactions uniformly at random, supporting honest miner behavior characteristic of certain DAG protocols.
- Sorted Access: Selection by order of fee or other incentive-aligned metric, which is exploitable by rational or adversarial miners to maximize profit, potentially at throughput’s expense.
To efficiently realize these, hybrid data structures are required that combine complementary algorithmic properties.
2. Composite Mempool Structures: Hashtable + Red-Black Tree
A critical innovation is the design and benchmarking of a composite mempool combining a hashtable and a red-black tree (Perešíni et al., 2023):
- Hashtable:
- direct access by ID.
- expected time for random access, using random index probing.
- for sorted access.
- Red-Black Tree:
- access for sorted or range queries.
- for random or direct ID-based access.
- Composite Structure:
- Retains direct access (from hashtable).
- random access (hashtable logic).
- sorted access (tree logic).
This structure is diagrammatically described as two parallel data stores—transactions are inserted, removed, or updated in both simultaneously. The design enables efficient support for both honest (random selection) and adversarial (fee-sorted selection) mining strategies in large-scale environments (7000+ nodes, each with tens of thousands of transactions), as required for realistic simulation and deployment scenarios.
<table> <thead> <tr><th>Access method</th> <th>Hashtable</th> <th>Red-black tree</th> <th>Combination</th></tr> </thead> <tbody> <tr><td>Direct</td> <td></td> <td></td> <td></td></tr> <tr><td>Random</td> <td></td> <td></td> <td></td></tr> <tr><td>Sorted</td> <td></td> <td></td> <td></td></tr> </tbody> </table>
For the table/bucket count and the actual number of items, random access is optimized in the composite by exploiting sparsity and efficient probing.
3. Transaction Selection Algorithms and Adversarial Impact
The mempool architecture must accommodate miner strategies:
- Honest strategies (random selection): Protocols like GHOSTDAG require miners to select transactions uniformly at random from the mempool. The composite mempool enables efficient random probes—hash-based initial bucket selection followed by sequential probing to discover non-empty locations.
- Fee-based (“malicious” or rational) strategies: Here, miners always choose the highest-fee transactions, leveraging the sorted access of the red-black tree. While this maximizes individual profit, simulation at massive scale shows that it increases transaction duplication (collisions) across miners, reducing overall throughput (Perešíni et al., 2023).
Empirical evidence confirms that fee-greedy selection in DAG-based protocols degrades system throughput and increases duplicate transactions, validating theoretical predictions from small-scale studies at realistic scale (7000+ nodes).
4. Implications for Performance, Scalability, and System Design
Mempool data structure engineering is directly linked to the feasibility of performing simulations and real-world deployments at Bitcoin-network scale. For example, in DAG-Sword (Perešíni et al., 2023), pure hashtable designs reach memory or computational limits for 7000+ nodes with 10,000 transactions per node, whereas the composite structure maintains tractability:
- Memory usage: Composite structure (10.6 GB for 7592 nodes × 10k txs) is higher than pure hashtable but necessary for system-wide scalability and supporting all access patterns.
- Simulation feasibility: The structure enables tractable experiments with adversarial selection strategies, throughput, profit, and collision metrics at global scale.
- Deployment guidance: Real DAG-based systems must adopt similarly flexible, composite architectures to ensure system-level performance does not degrade under realistic workloads or adversarial behaviors.
For real deployments, this suggests that supporting both random and sorted access patterns in mempool design is essential to balance honest throughput and resilience to incentive-driven attacks (e.g., duplicate transaction inclusion).
5. Random Access Optimization and Algorithmic Details
For random selection, an efficient algorithm is used:
- Choose a random initial index in the hashtable.
- If the bucket is non-empty, select a random element.
- If empty, probe sequentially (wrapping around) until a non-empty bucket is found.
- Average-case complexity is —this is highly efficient when the table is moderately sized with respect to .
This direct approach guarantees true randomness and efficiency for simulating honest miner selection in protocols such as PHANTOM or GHOSTDAG.
6. Broader Mempool Architecture Considerations and Research Directions
- Access Pattern Support: Systems must simultaneously support all patterns—this is a unique requirement of DAG-based pools due to the concurrency of block/miner proposals and diverse miner objectives.
- Attack Resistance: Protocol designers must analyze not just consensus mechanisms, but also mempool vulnerabilities to incentive manipulations (e.g., excessive duplication, performance-reducing collusion).
- Resource Constraints: At significant scale, memory and computational limits directly impact feasible protocol engineering; composite designs alleviate bottlenecks, at the cost of increased per-node resource consumption.
- Benchmarking: Open-source platforms like DAG-Sword provide standardized frameworks for benchmarking new mempool algorithms, protocol variants, and attack surfaces under resource-intensive distributed settings.
7. Summary
DAG-based mempool architectures require composite data structures to efficiently support both random and sorted transaction selection at high scale, directly impacting system throughput and fairness under heterogeneous miner behaviors. The hashtable + red-black tree composite, as detailed in (Perešíni et al., 2023), offers an empirically validated foundation that enables both tractable simulation of Bitcoin-scale environments and practical guidance for production deployments. Efficient random access algorithms, together with fast sorted selection, are central for both honest protocol operation and adversarial robustness. The choice and engineering of mempool architecture thus become primary determinants of system scalability, performance, and resilience in large-scale DAG-based blockchain networks.
Sponsored by Paperpile, the PDF & BibTeX manager trusted by top AI labs.
Get 30 days free