[go: up one dir, main page]

etherlink: the sequencer uses tx queue

Checklist

  • Provide automatic testing.
  • Add an item in the changelog

What

meta-issue #7785

With this MR the sequencer uses the tx_queue to retrieve transaction and produce block. The included transaction for a blocks are the transaction received in order in the tx_queue. If a user submit transaction in the incorrect order, then only the one in correct order are going to be included in a block.

Why

With this the main take is removing the 1M contraint.

How

I've reused the logic of the tx_pool with two new request pop_transactions an confirm_transaction.

With Pop_transactions the block producer fetches transactions in a certain limit from the tx_queue in order and mark them as accepted. Being accepted means that they enter the pending state, i.e. they needs to still be included in a block. Then when the block producer finishes to produce a block, all transactions that are included are marked as confirmed in the tx_queue and the rest are dropped.

Manually testing the MR

Submit two transactions with nonce in order, then produce a block, both transactions are going to be included. The test of the tx_queue are updated to reflect that.

Summary by CodeRabbit

  • New Features

    • Enhanced transaction management with an advanced queuing mechanism to streamline transaction processing and confirmation.
    • Added configurable options to enable or disable the new transaction queue feature, offering a more flexible handling method.
    • Integrated optional verification for specific transaction confirmations and improved error reporting for missing transaction details.
  • Tests

    • Introduced a test case to validate transaction queue limits per address, ensuring robust and reliable behavior.
Edited by Ghost User

Merge request reports

Loading