Module helpers
Expand description
Behaviour needed to serve eth_
RPC requests, divided into general database reads and
specific database access.
Traits with Load
prefix, read atomic data from database, e.g. a block or transaction. Any
database read done in more than one default Eth
trait implementation, is defined in a Load
trait.
Traits with Eth
prefix, compose specific data needed to serve RPC requests in the eth
namespace. They use Load
traits as building blocks. EthTransactions
also writes data
(submits transactions). Based on the eth_
request method semantics, request methods are
divided into: EthTransactions
, EthBlocks
, EthFees
, EthState
and EthCall
.
Default implementation of the Eth
traits, is done w.r.t. L1.
EthApiServer
, is implemented for any type that implements
all the Eth
traits, e.g. reth_rpc::EthApi
.
Modules§
- block
- Database access for
eth_
block RPC methods. Loads block and receipt data w.r.t. network. - blocking_
task - Spawns a blocking task. CPU heavy tasks are executed with the
rayon
library. IO heavy tasks are executed on thetokio
runtime. - call
- Loads a pending block from database. Helper trait for
eth_
transaction, call and trace RPC methods. - estimate
- Estimate gas needed implementation
- fee
- Loads fee history from database. Helper trait for
eth_
fee and transaction RPC methods. - pending_
block - Loads a pending block from database. Helper trait for
eth_
block, transaction, call and trace RPC methods. - receipt
- Loads a receipt from database. Helper trait for
eth_
block and transaction RPC methods, that loads receipt data w.r.t. network. - signer
- An abstraction over ethereum signers.
- spec
- Loads chain metadata.
- state
- Loads a pending block from database. Helper trait for
eth_
block, transaction, call and trace RPC methods. - trace
- Loads a pending block from database. Helper trait for
eth_
call and trace RPC methods. - transaction
- Database access for
eth_
transaction RPC methods. Loads transaction and receipt data w.r.t. network.
Traits§
- AddDev
Signers - Adds 20 random dev signers for access via the API. Used in dev mode.
- Call
- Executes code on state.
- EthApi
Spec Eth
API trait.- EthBlocks
- Block related functions for the
EthApiServer
trait in theeth_
namespace. - EthCall
- Execution related functions for the
EthApiServer
trait in theeth_
namespace. - EthFees
- Fee related functions for the
EthApiServer
trait in theeth_
namespace. - EthSigner
- An Ethereum Signer used via RPC.
- EthState
- Helper methods for
eth_
methods relating to state (accounts). - EthTransactions
- Transaction related functions for the
EthApiServer
trait in theeth_
namespace. - Full
EthApi - Helper trait to unify all
eth
rpc server building block traits, for simplicity. - Load
Block - Loads a block from database.
- LoadFee
- Loads fee from database.
- Load
Pending Block - Loads a pending block from database.
- Load
Receipt - Assembles transaction receipt data w.r.t to network.
- Load
State - Loads state from database.
- Load
Transaction - Loads a transaction from database.
- Spawn
Blocking - Executes code on a blocking thread.
- Trace
- Executes CPU heavy tasks.
- Trace
Ext - Extension trait that bundles traits needed for tracing transactions.