Crate reth_primitives_traits

Source
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: Adds proptest and arbitrary 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 friendly k256 is used)

Re-exports§

Modules§

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§

  • MaybeCompactreth-codec
    Helper trait that requires database encoding implementation since reth-codec feature is enabled.
  • Helper trait that requires de-/serialize implementation since serde feature is enabled.
  • MaybeSerdeBincodeCompatserde-bincode-compat
    Helper trait that requires serde bincode compatibility implementation.

Functions§

  • Compute the logs bloom filter for the given logs.