Module alloy_eips::eip4844
source · Expand description
EIP-4844 constants and helpers.
Modules§
- Builder and utils for the EIP-4844 Blob Transaction
- Utilities for working with EIP-4844 field elements and implementing
SidecarCoder
.
Structs§
- Blob type returned in responses to
engine_getBlobsV1
: https://github.com/ethereum/execution-apis/pull/559 - This represents a set of blobs, and its corresponding commitments and proofs.
- A single blob sidecar.
- A Blob hash
Constants§
- Determines the maximum rate of change for blob fee
- Minimum gas price for a data blob
- The modulus of the BLS group used in the KZG commitment scheme. All field elements contained in a blob MUST be STRICTLY LESS than this value.
- The modulus of the BLS group used in the KZG commitment scheme. All field elements contained in a blob MUST be STRICTLY LESS than this value.
- How many bytes are in a blob Same as DATA_GAS_PER_BLOB, but as an usize
- How many bytes are in a commitment
- How many bytes are in a proof
- Gas consumption of a single data blob.
- How many field elements are stored in a single data blob.
- Size a single field element in bytes.
- Size a single field element in bytes.
- Maximum number of data blobs in a single block.
- Maximum data gas for data blobs in a single block.
- Target number of data blobs in a single block.
- Target data gas for data blobs in a single block.
- Number of usable bits in a field element. The top two bits are always zero.
- The number of usable bytes in a single data blob. This is the number of bytes you can encode in a blob without any field element being >=
BLS_MODULUS
. - Commitment version of a KZG commitment
Functions§
- Calculates the blob gas price from the header’s excess blob gas field.
- Calculates the
excess_blob_gas
from the parent header’sblob_gas_used
andexcess_blob_gas
. - Helper function to deserialize boxed blobs.
- Approximates
factor * e ** (numerator / denominator)
using Taylor expansion. - Calculates the versioned hash for a KzgCommitment of 48 bytes.
Type Aliases§
- A Blob serialized as 0x-prefixed hex string
- A commitment/proof serialized as 0x-prefixed hex string