Expand description
Commonly used types and traits in Reth.
This crate contains various primitive traits used across reth’s components.
It provides the Block
trait which is used to represent a block and all its components.
A Block
is composed of a Header
and a BlockBody
. In ethereum (and optimism), a block
body consists of a list of transactions, a list of uncle headers, and a list of withdrawals. For
optimism, uncle headers and withdrawals are always empty lists.
§Feature Flags
arbitrary
: Addsproptest
andarbitrary
support for primitive types.op
: Implements the traits for various op-alloy types.reth-codec
: Enables db codec support for reth types including zstd compression for certain types.serde
: Adds serde support for all types.secp256k1
: Adds secp256k1 support for transaction signing/recovery. (By default the no-std friendlyk256
is used)
Re-exports§
pub use constants::gas_units::format_gas;
pub use constants::gas_units::format_gas_throughput;
pub use account::Account;
pub use account::Bytecode;
pub use receipt::FullReceipt;
pub use receipt::Receipt;
pub use transaction::execute::FillTxEnv;
pub use transaction::signed::FullSignedTx;
pub use transaction::signed::SignedTransaction;
pub use transaction::FullTransaction;
pub use transaction::Transaction;
pub use block::body::BlockBody;
pub use block::body::FullBlockBody;
pub use block::header::BlockHeader;
pub use block::header::FullBlockHeader;
pub use block::Block;
pub use block::FullBlock;
pub use header::test_utils;
arbitrary
ortest-utils
pub use header::HeaderError;
pub use header::SealedHeader;
pub use size::InMemorySize;
pub use node::BodyTy;
pub use node::FullNodePrimitives;
pub use node::HeaderTy;
pub use node::NodePrimitives;
pub use node::ReceiptTy;
Modules§
- Minimal account
- Block abstraction.
- Common constants. Ethereum protocol-related constants
- Crypto utilities.
- Common header types
- Node traits
- Receipt abstraction
- serde_
bincode_ compat serde-bincode-compat
Bincode-compatible serde implementations for common abstracted types in Reth. - Heuristic size trait
- Transaction abstraction
Structs§
- A pair of values, one of which is expected and one of which is actual.
- A pair of values, one of which is expected and one of which is actual.
- Ethereum Block header
- A log consists of an address, and some log data.
- An Ethereum event log object.
- Account storage entry.
- Generic wrapper with encoded Bytes, such as transaction data.
Traits§
- Maybe
Compact reth-codec
Helper trait that requires database encoding implementation sincereth-codec
feature is enabled. - Maybe
Serde serde
Helper trait that requires de-/serialize implementation sinceserde
feature is enabled. - Maybe
Serde Bincode Compat serde-bincode-compat
Helper trait that requires serde bincode compatibility implementation.
Functions§
- Compute the logs bloom filter for the given logs.