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§
- Blob
AndProof V1 - Blob type returned in responses to
engine_getBlobsV1
: https://github.com/ethereum/execution-apis/pull/559 - Blob
AndProof V2 - Blob type returned in responses to
engine_getBlobsV2
: https://github.com/ethereum/execution-apis/pull/630 - Blob
Transaction Sidecar - This represents a set of blobs, and its corresponding commitments and proofs.
- Blob
Transaction Sidecar Item - A single blob sidecar.
- Heap
Blob - A heap allocated blob that serializes as 0x-prefixed hex string
- Indexed
Blob Hash - A Blob hash
- Invalid
Blob Length - 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_ BLOCK Deprecated - 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_ BLOCK Deprecated - 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_ BLOCK Deprecated - 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_ BLOCK Deprecated - 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’sblob_gas_used
andexcess_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.