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
.
Re-exports§
pub use block::EthBlocks;
pub use block::LoadBlock;
pub use blocking_task::SpawnBlocking;
pub use call::Call;
pub use call::EthCall;
pub use fee::EthFees;
pub use fee::LoadFee;
pub use pending_block::LoadPendingBlock;
pub use receipt::LoadReceipt;
pub use signer::AddDevSigners;
pub use signer::EthSigner;
pub use spec::EthApiSpec;
pub use state::EthState;
pub use state::LoadState;
pub use trace::Trace;
pub use transaction::EthTransactions;
pub use transaction::LoadTransaction;
Modules§
- Database access for
eth_
block RPC methods. Loads block and receipt data w.r.t. network. - Spawns a blocking task. CPU heavy tasks are executed with the
rayon
library. IO heavy tasks are executed on thetokio
runtime. - Loads a pending block from database. Helper trait for
eth_
transaction, call and trace RPC methods. - Estimate gas needed implementation
- Loads fee history from database. Helper trait for
eth_
fee and transaction RPC methods. - Loads a pending block from database. Helper trait for
eth_
block, transaction, call and trace RPC methods. - Loads a receipt from database. Helper trait for
eth_
block and transaction RPC methods, that loads receipt data w.r.t. network. - An abstraction over ethereum signers.
- Loads chain metadata.
- Loads a pending block from database. Helper trait for
eth_
block, transaction, call and trace RPC methods. - Loads a pending block from database. Helper trait for
eth_
call and trace RPC methods. - Database access for
eth_
transaction RPC methods. Loads transaction and receipt data w.r.t. network.
Traits§
- Helper trait to unify all
eth
rpc server building block traits, for simplicity. - Extension trait that bundles traits needed for tracing transactions.