-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: EIP-7691 * fix
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//! Contains constants and utility functions for [EIP-7691](https://eips.ethereum.org/EIPS/eip-7691) | ||
use crate::eip4844::{fake_exponential, BLOB_TX_MIN_BLOB_GASPRICE}; | ||
|
||
/// CL-enforced target blobs per block after Pectra hardfork activation. | ||
pub const TARGET_BLOBS_PER_BLOCK_ELECTRA: u64 = 6; | ||
|
||
/// CL-enforced maximum blobs per block after Pectra hardfork activation. | ||
pub const MAX_BLOBS_PER_BLOCK_ELECTRA: u64 = 9; | ||
|
||
/// Determines the maximum rate of change for blob fee after Pectra hardfork activation. | ||
pub const BLOB_GASPRICE_UPDATE_FRACTION_PECTRA: u128 = 5007716; | ||
|
||
/// Same as [`crate::eip4844::calc_blob_gasprice`] but uses the | ||
/// [`BLOB_GASPRICE_UPDATE_FRACTION_PECTRA`]. | ||
#[inline] | ||
pub fn calc_blob_gasprice(excess_blob_gas: u64) -> u128 { | ||
fake_exponential( | ||
BLOB_TX_MIN_BLOB_GASPRICE, | ||
excess_blob_gas as u128, | ||
BLOB_GASPRICE_UPDATE_FRACTION_PECTRA, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,8 @@ pub mod eip7251; | |
|
||
pub mod eip7685; | ||
|
||
pub mod eip7691; | ||
|
||
pub mod eip7702; | ||
|
||
pub mod eip7742; |