reth
reth copied to clipboard
RPC: Batch tx submissions to insert into the mempool together
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.