Module eip4844

Source
Expand description

EIP-4844 constants and helpers.

Modules§

builder
Builder and utils for the EIP-4844 Blob Transaction
utils
Utilities for working with EIP-4844 field elements and implementing SidecarCoder.

Structs§

BlobAndProofV1
Blob type returned in responses to engine_getBlobsV1: https://github.com/ethereum/execution-apis/pull/559
BlobAndProofV2
Blob type returned in responses to engine_getBlobsV2: https://github.com/ethereum/execution-apis/pull/630
BlobTransactionSidecar
This represents a set of blobs, and its corresponding commitments and proofs.
BlobTransactionSidecarItem
A single blob sidecar.
HeapBlob
A heap allocated blob that serializes as 0x-prefixed hex string
IndexedBlobHash
A Blob hash
InvalidBlobLength
Error indicating that the blob length is invalid.

Constants§

BLOB_GASPRICE_UPDATE_FRACTION
Determines the maximum rate of change for blob fee
BLOB_TX_MIN_BLOB_GASPRICE
Minimum gas price for a data blob
BLS_MODULUS
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.
BLS_MODULUS_BYTES
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.
BYTES_PER_BLOB
How many bytes are in a blob Same as DATA_GAS_PER_BLOB, but as an usize
BYTES_PER_COMMITMENT
How many bytes are in a commitment
BYTES_PER_PROOF
How many bytes are in a proof
DATA_GAS_PER_BLOB
Gas consumption of a single data blob.
FIELD_ELEMENTS_PER_BLOB
How many field elements are stored in a single data blob.
FIELD_ELEMENT_BYTES
Size a single field element in bytes.
FIELD_ELEMENT_BYTES_USIZE
Size a single field element in bytes.
MAX_BLOBS_PER_BLOCKDeprecated
Maximum number of data blobs in a single block.
MAX_BLOBS_PER_BLOCK_DENCUN
Maximum number of data blobs in a single block.
MAX_DATA_GAS_PER_BLOCKDeprecated
Maximum data gas for data blobs in a single block.
MAX_DATA_GAS_PER_BLOCK_DENCUN
Maximum data gas for data blobs in a single block.
TARGET_BLOBS_PER_BLOCKDeprecated
Target number of data blobs in a single block.
TARGET_BLOBS_PER_BLOCK_DENCUN
Target number of data blobs in a single block.
TARGET_DATA_GAS_PER_BLOCKDeprecated
Target data gas for data blobs in a single block.
TARGET_DATA_GAS_PER_BLOCK_DENCUN
Target data gas for data blobs in a single block.
USABLE_BITS_PER_FIELD_ELEMENT
Number of usable bits in a field element. The top two bits are always zero.
USABLE_BYTES_PER_BLOB
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.
VERSIONED_HASH_VERSION_KZG
Commitment version of a KZG commitment

Functions§

calc_blob_gasprice
Calculates the blob gas price from the header’s excess blob gas field.
calc_excess_blob_gas
Calculates the excess_blob_gas from the parent header’s blob_gas_used and excess_blob_gas.
deserialize_blob
Helper function to deserialize boxed blobs.
fake_exponential
Approximates factor * e ** (numerator / denominator) using Taylor expansion.
kzg_to_versioned_hash
Calculates the versioned hash for a KzgCommitment of 48 bytes.

Type Aliases§

Blob
A Blob serialized as 0x-prefixed hex string
Bytes48
A commitment/proof serialized as 0x-prefixed hex string