Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/eips/src/eip7840.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Comment on lines +81 to +90
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are likely incorrect because the asmterdam fields are still tbd

}

/// [`BlobParams`] for the [EIP-7892](https://eips.ethereum.org/EIPS/eip-7892) Blob parameter only hardfork BPO1.
pub const fn bpo1() -> Self {
Self {
Expand Down
3 changes: 3 additions & 0 deletions crates/eips/src/eip7892.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -55,6 +57,7 @@ impl BlobScheduleBlobParams {
cancun: BlobParams::cancun(),
prague: BlobParams::prague(),
osaka: BlobParams::osaka(),
amsterdam: BlobParams::amsterdam(),
scheduled: Default::default(),
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
}
}
Expand Down