Expand description
The spec of an Ethereum network
Modules§
- arbitrary
- Re-export for convenience
The
Arbitrary
trait crate.
Macros§
- hardfork
- Re-export for convenience
Macro that defines different variants of a chain specific enum. See
crate::Hardfork
as an example.
Structs§
- Base
FeeParams - BaseFeeParams contains the config parameters that control block base fee computation
- Chain
- Either a known
NamedChain
or a EIP-155 chain ID. - Chain
Hardforks - Re-export for convenience
Ordered list of a chain hardforks that implement
Hardfork
. - Chain
Info - Current status of the blockchain’s head.
- Chain
Spec - An Ethereum chain specification.
- Chain
Spec Builder - A helper to build custom chain specs
- Deposit
Contract PoS
deposit contract details.- Display
Hardforks - Re-export for convenience A container for pretty-printing a list of hardforks.
- EnrFork
IdEntry - Re-export for convenience Represents a forward-compatible ENR entry for including the forkid in a node record via EIP-868. Forward compatibility is achieved via EIP-8.
- Ethereum
Chain Hardforks - Re-export for convenience
A type allowing to configure activation
ForkCondition
s for a given list ofEthereumHardfork
s. - Fork
Base FeeParams - A type alias to a vector of tuples of Hardfork and
BaseFeeParams
, sorted by Hardfork activation order. This is used to specify dynamic EIP-1559 parameters for chains like Optimism. - Fork
Filter - Re-export for convenience
Filter that describes the state of blockchain and can be used to check incoming
ForkId
s for compatibility. - Fork
Hash - Re-export for convenience
CRC32
hash of all previous forks starting from genesis block. - ForkId
- Re-export for convenience A fork identifier as defined by EIP-2124. Serves as the chain compatibility identifier.
- Fork
Transition - Re-export for convenience Represents a transition from one fork to another
- Hardfork
Blob Params - A container for hardforks that use eip-7804 blobs.
- Head
- Re-export for convenience Describes the current head block.
Enums§
- Base
FeeParams Kind - A wrapper around
BaseFeeParams
that allows for specifying constant or dynamic EIP-1559 parameters based on the active Hardfork. - Chain
Kind - The kind of chain. Returned by
Chain::kind
. Prefer usingChain
instead. - Ethereum
Hardfork - Re-export for convenience The name of an Ethereum hardfork.
- Fork
Condition - Re-export for convenience The condition at which a fork is activated.
- Fork
Filter Key - Re-export for convenience How to filter forks.
- Named
Chain - An Ethereum EIP-155 chain.
- Validation
Error - Re-export for convenience
Reason for rejecting provided
ForkId
.
Constants§
- MAINNET_
PRUNE_ DELETE_ LIMIT - Mainnet prune delete limit.
- MIN_
TRANSACTION_ GAS - Gas per transaction not creating a contract.
Statics§
- DEV
- Dev testnet specification
- DEV_
HARDFORKS - Re-export for convenience Dev hardforks
- HOLESKY
- The Holesky spec
- MAINNET
- The Ethereum mainnet spec
- SEPOLIA
- The Sepolia spec
Traits§
- Chain
Spec Provider - A trait for reading the current chainspec.
- EthChain
Spec - Trait representing type configuring a chain spec.
- Ethereum
Hardforks - Re-export for convenience Helper methods for Ethereum forks.
- Hardfork
- Re-export for convenience Generic hardfork trait.
- Hardforks
- Re-export for convenience Generic trait over a set of ordered hardforks
Functions§
- make_
genesis_ header - Helper method building a [
Header
] given [Genesis
] andChainHardforks
. - once_
cell_ set - Simple utility to create a thread-safe sync cell with a value set.
- test_
fork_ ids test-utils
- Verifies
ChainSpec
configuration against expected data in given cases.