-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(levm): implement EIP7691 - Blob throughput increase #1782
Changes from all commits
0be3ae9
88064a3
aae689c
6396778
2cd0cfc
af6b98b
5602e21
fd9fd43
57af4ed
f04ba07
1b97f6c
589fd8c
5cab5c3
7cdc8d5
4710529
4e6fe46
ab2bb71
af5bf01
1595df9
838ded7
bb86fea
2520586
812b37b
3c954e4
d2e4b85
0eee908
0b3d310
7aeef5e
d5e5280
a102aab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,13 +43,24 @@ pub mod create_opcode { | |
} | ||
|
||
pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01; | ||
pub const MAX_BLOB_NUMBER_PER_BLOCK: usize = 6; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This constant is not used in LEVM. However, there is an identical constant present here: https://github.com/lambdaclass/ethrex/blob/main/crates/blockchain/constants.rs#L51 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
// Blob constants | ||
pub const TARGET_BLOB_GAS_PER_BLOCK: U256 = U256([393216, 0, 0, 0]); // TARGET_BLOB_NUMBER_PER_BLOCK * GAS_PER_BLOB | ||
pub const TARGET_BLOB_GAS_PER_BLOCK_PECTRA: U256 = U256([786432, 0, 0, 0]); // TARGET_BLOB_NUMBER_PER_BLOCK * GAS_PER_BLOB | ||
|
||
pub const MIN_BASE_FEE_PER_BLOB_GAS: U256 = U256::one(); | ||
|
||
// WARNING: Do _not_ use the BLOB_BASE_FEE_UPDATE_FRACTION_* family of | ||
// constants as is. Use the `get_blob_base_fee_update_fraction_value` | ||
// function instead | ||
pub const BLOB_BASE_FEE_UPDATE_FRACTION: U256 = U256([3338477, 0, 0, 0]); | ||
pub const BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE: U256 = U256([5007716, 0, 0, 0]); // Defined in [EIP-7691](https://eips.ethereum.org/EIPS/eip-7691) | ||
|
||
// WARNING: Do _not_ use the MAX_BLOB_COUNT_* family of constants as | ||
// is. Use the `max_blobs_per_block` function instead | ||
pub const MAX_BLOB_COUNT: usize = 6; | ||
pub const MAX_BLOB_COUNT_ELECTRA: usize = 9; | ||
|
||
pub const VALID_BLOB_PREFIXES: [u8; 2] = [0x01, 0x02]; | ||
|
||
// Block constants | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All thanks to @fborello-lambda ;)