MP-1: Mempool data structure design
Goal
Design and implement the core mempool data structures used to store and manage transactions before they are included in a block.
This task focuses solely on defining the foundational in-memory structures. Transaction validation, prioritization, and replacement logic are intentionally deferred to later tasks (MP-2 ~ MP-4).
Scope
Included in this task:
- Define the main
Mempool / TxPool data structure
- Store transactions in memory with the following indices:
- Indexed by transaction hash
- Indexed by sender address (nonce-ordered)
- Track mempool size:
- Total transaction count
- Total memory usage (bytes)
- Enforce basic pool limits (count and/or size based)
Out of Scope
Explicitly excluded from this task:
- Transaction validation (nonce, gas, balance checks) — MP-2
- Gas price–based prioritization or selection — MP-3
- Transaction replacement logic — MP-4
- Pending vs queued transaction separation — MP-5
- Transaction removal after block execution
Design Notes
- The data structures should be designed with future extensions in mind:
- Gas-based priority queues
- Transaction replacement and eviction policies
- Pending/queued transaction separation
- No consensus (CL) or execution (EL) logic should be included at this stage.
Dependencies
This task provides the foundation required by all subsequent mempool tasks.
Acceptance Criteria
References
MP-1: Mempool data structure design
Goal
Design and implement the core mempool data structures used to store and manage transactions before they are included in a block.
This task focuses solely on defining the foundational in-memory structures. Transaction validation, prioritization, and replacement logic are intentionally deferred to later tasks (MP-2 ~ MP-4).
Scope
Included in this task:
Mempool/TxPooldata structureOut of Scope
Explicitly excluded from this task:
Design Notes
Dependencies
This task provides the foundation required by all subsequent mempool tasks.
Acceptance Criteria
Mempool/TxPool) data structure is implementedReferences
https://github.com/paradigmxyz/reth/tree/main/crates/transaction-pool
https://github.com/ethereum/go-ethereum/tree/master/core/txpool