Skip to content

Etherlink: Implement txpool content rpc

Hantang Sun requested to merge hantang@evm@txpool_content_rpc into master

Context

Part of #7109.

This MR implements the txpool_content RPC that returns the content of the transaction pool https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool.

Prior to this MR, the txpool_content RPC was only a mockup which always returns an empty transaction pool. The RPC becomes more important due to recent effort to strength the transaction pool. As it enables us to examine the state of the pool which now has more complex logic.

Manually testing the MR

Run the tezt tests.

Switch for this RPC endpoint

It might be necessary to introduce a switch that enables turning on/off this RPC endpoint. There are 2 reasons why we may want it.

  • The RPC is very expensive
  • In Ethereum this RPC is not widely used except for doing MEV

I'd really like to hear some thought on this

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Rodi-Can Bozman

Merge request reports