diff --git a/crates/eips/src/eip7840.rs b/crates/eips/src/eip7840.rs index 1a187d63663..22b33285725 100644 --- a/crates/eips/src/eip7840.rs +++ b/crates/eips/src/eip7840.rs @@ -78,6 +78,18 @@ impl BlobParams { } } + /// Returns [`BlobParams`] configuration activated with Amsterdam hardfork. + pub const fn amsterdam() -> Self { + Self { + target_blob_count: eip7691::TARGET_BLOBS_PER_BLOCK_ELECTRA, + max_blob_count: eip7691::MAX_BLOBS_PER_BLOCK_ELECTRA, + update_fraction: eip7691::BLOB_GASPRICE_UPDATE_FRACTION_PECTRA, + min_blob_fee: eip4844::BLOB_TX_MIN_BLOB_GASPRICE, + max_blobs_per_tx: eip7594::MAX_BLOBS_PER_TX_FUSAKA, + blob_base_cost: BLOB_BASE_COST, + } + } + /// [`BlobParams`] for the [EIP-7892](https://eips.ethereum.org/EIPS/eip-7892) Blob parameter only hardfork BPO1. pub const fn bpo1() -> Self { Self { diff --git a/crates/eips/src/eip7892.rs b/crates/eips/src/eip7892.rs index 7ace9ed44bf..bc8f404f0ee 100644 --- a/crates/eips/src/eip7892.rs +++ b/crates/eips/src/eip7892.rs @@ -42,6 +42,8 @@ pub struct BlobScheduleBlobParams { pub prague: BlobParams, /// Configuration for blob-related calculations for the Osaka hardfork. pub osaka: BlobParams, + /// Configuration for blob-related calculations for the Amsterdam hardfork. + pub amsterdam: BlobParams, /// Time-based scheduled updates to blob parameters. /// /// These are ordered by activation timestamps in natural order. @@ -55,6 +57,7 @@ impl BlobScheduleBlobParams { cancun: BlobParams::cancun(), prague: BlobParams::prague(), osaka: BlobParams::osaka(), + amsterdam: BlobParams::amsterdam(), scheduled: Default::default(), } } diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index e12bdde5356..5734fe9d63f 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -881,6 +881,7 @@ impl ChainConfig { let mut cancun = None; let mut prague = None; let mut osaka = None; + let mut amsterdam = None; let mut scheduled = Vec::new(); for (key, params) in &self.blob_schedule { @@ -902,6 +903,7 @@ impl ChainConfig { .with_max_blobs_per_tx(eip7594::MAX_BLOBS_PER_TX_FUSAKA); match key.as_str() { + "amsterdam" => amsterdam = Some(params), "osaka" => osaka = Some(params), "bpo1" => { if let Some(timestamp) = self.bpo1_time { @@ -938,6 +940,7 @@ impl ChainConfig { cancun: cancun.unwrap_or_else(BlobParams::cancun), prague: prague.unwrap_or_else(BlobParams::prague), osaka: osaka.unwrap_or_else(BlobParams::osaka), + amsterdam: amsterdam.unwrap_or_else(BlobParams::amsterdam), scheduled, } }