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§
- account
- Minimal account
- block
- Block abstraction.
- constants
- Common constants. Ethereum protocol-related constants
- crypto
- Crypto utilities.
- header
- Common header types
- node
- Node traits
- receipt
- Receipt abstraction
- serde_
bincode_ compat serde-bincode-compat
- Bincode-compatible serde implementations for common abstracted types in Reth.
- size
- Heuristic size trait
- transaction
- Transaction abstraction
Structs§
- GotExpected
- A pair of values, one of which is expected and one of which is actual.
- GotExpected
Boxed - A pair of values, one of which is expected and one of which is actual.
- Header
- Ethereum Block header
- Log
- A log consists of an address, and some log data.
- LogData
- An Ethereum event log object.
- Storage
Entry - Account storage entry.
- With
Encoded - Generic wrapper with encoded Bytes, such as transaction data.
Traits§
- Maybe
Compact reth-codec
- Helper trait that requires database encoding implementation since
reth-codec
feature is enabled. - Maybe
Serde serde
- Helper trait that requires de-/serialize implementation since
serde
feature is enabled. - Maybe
Serde Bincode Compat serde-bincode-compat
- Helper trait that requires serde bincode compatibility implementation.
Functions§
- logs_
bloom - Compute the logs bloom filter for the given logs.