Skip to main content

Module primitives

Module primitives 

Source
Expand description

Re-exported primitive types

Modules§

account
Minimal account
arbitraryarbitrary
The Arbitrary trait crate.
arbitrum
Arbitrum hardfork starting points
block
Block abstraction.
constants
Common constants. Ethereum protocol-related constants
crypto
Crypto utilities.
dashmapdashmap
Re-exports of dashmap types with [alloy_primitives::map::DefaultHashBuilder] as the hasher.
error
Error types for the hardforks crate.
ethereum
Ethereum hardfork starting points
header
Common header types
node
Node traits
proofs
Helper function for calculating Merkle proofs and hashes.
rayonrayon
Rayon utilities Rayon parallel iterator utilities.
receipt
Receipt abstraction
sync
Lock synchronization primitives
test_utilsarbitrary or test-utils
Utilities for testing.
transaction
Transaction abstraction

Macros§

hardfork
Macro that defines different variants of a chain specific enum. See crate::Hardfork as an example.

Structs§

Account
An Ethereum account with chain-specific extension data.
AccountExtensionaccount-ext
Raw, unencoded account bytes with a one-pointer inline representation.
AccountExtensionsUnsupported
Returned when an operation requires an extensionless account representation.
Bytecode
Bytecode for an account.
ChainHardforks
Ordered list of a chain hardforks that implement Hardfork.
DisplayHardforks
A container for pretty-printing a list of hardforks.
EnrForkIdEntry
Re-exported EIP-2124 forkid types. Represents a forward-compatible ENR entry for including the forkid in a node record via EIP-868. Forward compatibility is achieved via EIP-8.
EthereumChainHardforks
A type allowing to configure activation ForkConditions for a given list of EthereumHardforks.
FastInstantquanta
Re-export of quanta::Instant for high-resolution timing with minimal overhead. A point-in-time wall-clock measurement.
ForkFilter
Re-exported EIP-2124 forkid types. Filter that describes the state of blockchain and can be used to check incoming ForkIds for compatibility.
ForkHash
Re-exported EIP-2124 forkid types. CRC32 hash of all previous forks starting from genesis block.
ForkId
Re-exported EIP-2124 forkid types. A fork identifier as defined by EIP-2124. Serves as the chain compatibility identifier.
ForkTransition
Re-exported EIP-2124 forkid types. Represents a transition from one fork to another
GotExpected
A pair of values, one of which is expected and one of which is actual.
GotExpectedBoxed
A pair of values, one of which is expected and one of which is actual.
Head
Re-exported EIP-2124 forkid types. Describes the current head block.
Header
Ethereum Block header
IndexedTx
Transaction with its index and block reference for efficient metadata access.
Log
A log consists of an address, and some log data.
LogData
An Ethereum event log object.
ParseHardforkError
Error type for hardfork related errors.
ReceiptWithBloom
A receipt paired with a precomputed logs bloom.
Recovered
A signed object paired with a previously recovered signer.
RecoveredBlock
A block with senders recovered from the block’s transactions.
SealedBlock
Sealed full block composed of the block’s header and body.
SealedBlockWith
A SealedBlock paired with associated data.
SealedHeader
Seals the header with the block hash.
StorageEntry
Account storage entry.
TransactionMeta
Additional fields in the context of a block that contains this mined transaction.
WithEncoded
A value paired with bytes presumed to be its exact EIP-2718 encoding.

Enums§

EthereumHardfork
The name of an Ethereum hardfork.
ForkCondition
The condition at which a fork is activated.
ForkFilterKey
Re-exported EIP-2124 forkid types. How to filter forks.
SealedOrRecoveredBlock
A block that is either sealed or sealed with recovered transaction senders.
ValidationError
Re-exported EIP-2124 forkid types. Reason for rejecting provided ForkId.

Statics§

DEV_HARDFORKS
Dev hardforks

Traits§

AlloyBlockHeader
Re-exported alias Trait for extracting specific Ethereum block data from a header
Block
Abstraction of block data type.
BlockBody
Abstraction for block’s body.
BlockHeader
Abstraction of a block header.
EthereumHardforks
Helper methods for Ethereum forks.
FillTxEnv
Loads transaction into execution environment.
FullBlock
Helper trait that unifies all behaviour required by block to support full node operations.
FullBlockBody
Helper trait that unifies all behaviour required by transaction to support full node operations.
FullBlockHeader
Helper trait that unifies all behaviour required by block header to support full node operations.
FullReceipt
Helper trait that unifies all behaviour required by receipt to support full node operations.
FullSignedTx
Helper trait that unifies all behaviour required by block to support full node operations.
FullTransaction
Helper trait that unifies all behaviour required by transaction to support full node operations.
Hardfork
Generic hardfork trait.
Hardforks
Generic trait over a set of ordered hardforks
InMemorySize
Heuristic size trait Trait for calculating a heuristic for the in-memory size of a struct.
MaybeCompactreth-codec
Helper trait that requires database encoding implementation since reth-codec feature is enabled.
MaybeSerdeserde
Helper trait that requires de-/serialize implementation since serde feature is enabled.
NodePrimitives
Configures all the primitive types of the node.
ParallelBridgeBufferedrayon
Extension trait for iterators to convert them to parallel iterators via collection.
Receipt
Abstraction of a receipt.
SignedTransaction
A signed transaction.
SignerRecoverable
A type that can recover the signer of a transaction.
Transaction
Abstraction of a transaction.
ValueWithSubKey
Trait for DupSort table values that contain a subkey.

Functions§

ensure_no_account_extensions
Rejects operations that cannot represent chain-specific account payloads.
format_gas
Returns a formatted gas log, showing either:
format_gas_throughput
Returns a formatted gas throughput log, showing either:
logs_bloom
Compute the logs bloom filter for the given logs.

Type Aliases§

BlockTy
Helper adapter type for accessing NodePrimitives block types.
BodyTy
Helper adapter type for accessing NodePrimitives block body types.
HeaderTy
Helper adapter type for accessing NodePrimitives block header types.
ReceiptTy
Helper adapter type for accessing NodePrimitives receipt types.
SealedHeaderFor
Type alias for SealedHeader generic over the BlockHeader type of NodePrimitives.
TxTy
Helper adapter type for accessing NodePrimitives signed transaction types.