revm_specification/
eip4844.rs

1//! EIP-4844 constants
2//!
3
4/// First version of the blob
5pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01;
6
7/// Gas consumption of a single data blob (== blob byte size)
8pub const GAS_PER_BLOB: u64 = 1 << 17;
9
10/// Min blob gas price
11pub const MIN_BLOB_GASPRICE: u64 = 1;
12
13/// Target number of the blob per block
14pub const TARGET_BLOB_NUMBER_PER_BLOCK_CANCUN: u64 = 3;
15
16/// Max number of blobs per block
17pub const MAX_BLOB_NUMBER_PER_BLOCK_CANCUN: u64 = 2 * TARGET_BLOB_NUMBER_PER_BLOCK_CANCUN;
18
19/// Maximum consumable blob gas for data blobs per block
20pub const MAX_BLOB_GAS_PER_BLOCK_CANCUN: u64 = MAX_BLOB_NUMBER_PER_BLOCK_CANCUN * GAS_PER_BLOB;
21
22/// Target consumable blob gas for data blobs per block (for 1559-like pricing)
23pub const TARGET_BLOB_GAS_PER_BLOCK_CANCUN: u64 =
24    TARGET_BLOB_NUMBER_PER_BLOCK_CANCUN * GAS_PER_BLOB;
25
26/// Controls the maximum rate of change for blob gas price
27pub const BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN: u64 = 3338477;
28
29/// Target number of the blob per block
30pub const TARGET_BLOB_NUMBER_PER_BLOCK_PRAGUE: u64 = 6;
31
32/// Max number of blobs per block
33pub const MAX_BLOB_NUMBER_PER_BLOCK_PRAGUE: u64 = 9;
34
35/// Maximum consumable blob gas for data blobs per block
36pub const MAX_BLOB_GAS_PER_BLOCK_PRAGUE: u64 = MAX_BLOB_NUMBER_PER_BLOCK_PRAGUE * GAS_PER_BLOB;
37
38/// Target consumable blob gas for data blobs per block (for 1559-like pricing)
39pub const TARGET_BLOB_GAS_PER_BLOCK_PRAGUE: u64 =
40    TARGET_BLOB_NUMBER_PER_BLOCK_PRAGUE * GAS_PER_BLOB;
41
42/// Controls the maximum rate of change for blob gas price
43pub const BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE: u64 = 5007716;