Crate alloy_consensus
source ·Expand description
§alloy-consensus
Ethereum consensus interface.
This crate contains constants, types, and functions for implementing Ethereum EL consensus and communication. This includes headers, blocks, transactions, EIP-2718 envelopes, EIP-2930, EIP-4844, and more.
In general a type belongs in this crate if it is committed to in the EL block header. This includes:
- transactions
- blocks
- headers
- receipts
- EIP-2718 envelopes.
§Provenance
Much of this code was ported from reth-primitives as part of ongoing alloy migrations.
Re-exports§
pub use transaction::SignableTransaction;
pub use transaction::Transaction;
pub use transaction::TxEip1559;
pub use transaction::TxEip2930;
pub use transaction::TxEip4844;
pub use transaction::TxEip4844Variant;
pub use transaction::TxEip4844WithSidecar;
pub use transaction::TxEnvelope;
pub use transaction::TxLegacy;
pub use transaction::TxType;
pub use transaction::TypedTransaction;
Modules§
- account 🔒
- Ethereum protocol-related constants
- header 🔒
- receipt 🔒
- request 🔒
- sealed 🔒
- signed 🔒
- Transaction types.
- Utilities for working with EIP-4844 field elements and implementing
SidecarCoder
.
Structs§
- Represents an Account in the account trie.
- Receipt envelope, as defined in EIP-2718.
- This represents a set of blobs, and its corresponding commitments and proofs.
- Ethereum Block header
- Receipt containing result of transaction execution.
Receipt
with calculated bloom filter.- A consensus hashable item, with its memoized hash.
- Build a
BlobTransactionSidecar
from an arbitrary amount of data. - A transaction with a signature and hash seal.
- Simple coder that only uses the last 31 bytes of each blob. This is the default coder for the
SidecarBuilder
.
Enums§
- An error that can occur when validating a BlobTransactionSidecar::validate.
- Captures the result of a transaction execution.
- KZG settings.
- Receipt envelope, as defined in EIP-2718.
- Ethereum execution layer requests.
Constants§
- Ommer root of empty list.
- Root hash of an empty trie.
Traits§
- Sealable objects.
- A strategy for coding and decoding data into sidecars. Coder instances are responsible for encoding and decoding data into and from the sidecar. They are called by the
SidecarBuilder
during theingest
,take
, and (ifc_kzg
feature enabled)build
methods. - Receipt is the result of a transaction execution.
Type Aliases§
- A Blob serialized as 0x-prefixed hex string
- A commitment/proof serialized as 0x-prefixed hex string