Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBF Mempool #1509

Open
8 tasks
ninabarbakadze opened this issue Oct 7, 2024 · 0 comments
Open
8 tasks

RBF Mempool #1509

ninabarbakadze opened this issue Oct 7, 2024 · 0 comments

Comments

@ninabarbakadze
Copy link
Member

ninabarbakadze commented Oct 7, 2024

Description

proposing a set of modifications to the current mempools (priority and CAT) that are in use to improve the reliability of transaction submission

Proposed Modifications

To improve transaction submission reliability, we propose extending existing mempool implementation to become nonce aware. This approach aims to reduce transaction eviction likelihood as well as rejection for nonce failure.

Nonce aware mempool organizes transactions based on two main criteria:

  • Priority (fee)
  • Sender's nonce

The internal structure consists of:

  • A priority-ordered skip list for overall transaction sorting
  • Separate skip lists for each sender, ordered by transaction nonces

Transactions are partially ordered by both nonce and priority, ensuring high-priority transactions are processed sooner while maintaining nonce order.

In Addition

  • Consider getting rid of node’s local min gas price. This causes:
    • Fragmented fee policies: Transactions meet the minimum threshold for some nodes but not for others.
    • Unpredictable transaction inclusion makes it difficult for users to anticipate whether their transactions will be accepted.
  • Encourage users to include a ttl-num-blocks parameter when submitting transactions. This parameter specifies how many blocks a transaction can remain in node’s mempool
    • Allows users to set expiration times for their transactions
  • Consider increasing the mempool size, currently default is set to ~39.5MB. Faster block times and larger mempool will reduce the chance of transactions being evicted.

Tx Indexer

  • We can enhance our existing transaction indexer to provide a more detailed and fine-grained overview of the transaction's status including its current priority in the mempool.
  • Start tracking rejections in the mempool and extend tx status to index rejected transactions that are currently “unknown”.
  • Currently, when a transaction is included in a block, the consensus node informs you of its commitment without providing proof. In the future, we aim to verify all write paths with a tx commitment, ensuring that all shares are within the block.

Tasks tracking the work above

  1. WS: BestTxs
    ninabarbakadze
  2. WS: BestTxs
    ninabarbakadze
  3. WS: BestTxs
    ninabarbakadze
  4. WS: BestTxs
    ninabarbakadze
  5. WS: BestTxs
    ninabarbakadze
  6. WS: BestTxs low priority
    ninabarbakadze
  7. WS: BestTxs
    ninabarbakadze
  8. WS: BestTxs needs:triage
    ninabarbakadze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants