MoveAndUp

The Path to Unifying Ethereum’s MemPool Sorting Order

In recent years, there has been a pressing need for a unified sorting order in Ethereum’s mempools. For those unfamiliar, mempool is a critical component of the Ethereum network, responsible for efficiently managing the incoming transactions and verifying their legitimacy.

Currently, different developers have proposed various sorting orders to optimize performance and reduce latency. However, these proposals often lack a crucial aspect: agreement on which transactions to prioritize when sorting the mempools. In this article, we will explore why the current approach is flawed and what’s missing in order to achieve a unified sorting order.

The Problem with Current Approaches

One of the main issues with existing sorting orders lies in their lack of clarity and consistency across different developers’ implementations. For instance:

  • Sorting Order Proposals: Different proposals suggest varying sorting orders, such as  » earliest-first, » « latest-first, » or even a custom algorithm that combines multiple factors.

  • Agreement on Priority: Developers may agree on certain priority rules, but not others, leading to inconsistencies and potential conflicts when sorting mempools.

The Proposed Solution: Sort by First N-Transactions (80%)

To address these issues, we propose an alternative approach:

  • Sorting Order: Sort mempool transactions in the first n-transactions (or 80% of transactions) that are at least 10 minutes old.

  • Confirmation: After sorting, confirm and broadcast the block header to all involved parties.

Benefits of This Approach

By adopting this unified approach, we can achieve several benefits:

  • Improved Performance

    Ethereum: When we can agree on mempool sorting order, we can just confirm first n-transactions that are at least 10 mins old. What's missing?

    : Sorting by first n-transactions reduces latency and minimizes contention between different developers’ implementations.

  • Increased Consistency: With a single sorting order, developers are more likely to agree on the prioritization rules, reducing conflicts and ensuring consistency across different mempool implementations.

  • Enhanced Security: By prioritizing transactions that have been at least 10 minutes old, we can reduce the likelihood of malicious actors attempting to exploit weak sorting orders.

Next Steps

To move towards a unified sorting order in Ethereum’s mempools, we recommend:

  • Collaborative Development: Encourage developers from different teams and communities to contribute to the discussion and development of a single, universally accepted sorting order.

  • Implementation Guidelines: Establish clear guidelines for implementing the proposed sorting order, including any necessary adjustments or modifications to existing codebases.

By working together and adopting this unified approach, we can create a more efficient, secure, and scalable Ethereum network that benefits all stakeholders involved.