reth icon indicating copy to clipboard operation
reth copied to clipboard

RPC: Batch tx submissions to insert into the mempool together

Open hai-rise opened this issue 1 year ago • 5 comments
trafficstars

Describe the feature

Currently, the RPC server submits each transaction individually which competes for a write lock of the pool. This can be very congested for performance chains that expect 100k+ new transactions every second. Even more challenging if the block time is small -- canonical state changes also compete for the write lock several times a second.

Ideally, the RPC server would buffer transactions to insert in a batch when the pool write lock is unavailable, instead of competing for the write lock (and block anyway) for every insertion request.

Additional context

Related: #12806.

hai-rise avatar Nov 23 '24 16:11 hai-rise