Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
42 changes: 23 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ alloy-primitives = { version = "1.2.0", default-features = false }
alloy-rlp = { version = "0.3.12", default-features = false }
alloy-sol-types = { version = "1.2.0", default-features = false }
alloy-consensus = { version = "1.0.12", default-features = false }
alloy-eips = { version = "1.0.12", default-features = false }
alloy-eips = { version = "1.0.17", default-features = false }
alloy-provider = { version = "1.0.12", default-features = false }
alloy-signer = { version = "1.0.12", default-features = false }
alloy-signer-local = { version = "1.0.12", default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions crates/context/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ database-interface.workspace = true
state.workspace = true
alloy-eip7702 = { workspace = true, features = ["k256"] }
alloy-eip2930.workspace = true
alloy-eips.workspace = true

# misc
auto_impl.workspace = true
Expand All @@ -41,6 +42,7 @@ std = [
"serde?/std",
"alloy-eip7702/std",
"alloy-eip2930/std",
"alloy-eips/std",
"database-interface/std",
"primitives/std",
"state/std",
Expand All @@ -52,6 +54,7 @@ serde = [
"state/serde",
"alloy-eip7702/serde",
"alloy-eip2930/serde",
"alloy-eips/serde",
"database-interface/serde",
"either/serde",
]
Expand Down
31 changes: 3 additions & 28 deletions crates/context/interface/src/block/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
//! excess blob gas.
//!
//! [`BlobExcessGasAndPrice`] is used to store the blob gas price and excess blob gas.s
use primitives::{
eip4844::{GAS_PER_BLOB, MIN_BLOB_GASPRICE},
eip7918,
};
use alloy_eips::eip7840::BLOB_BASE_COST;
use primitives::eip4844::{GAS_PER_BLOB, MIN_BLOB_GASPRICE};

/// Structure holding block blob excess gas and it calculates blob fee
///
Expand Down Expand Up @@ -39,29 +37,6 @@ impl BlobExcessGasAndPrice {
blob_gasprice,
}
}

/// Calculate this block excess gas and price from the parent excess gas and gas used
/// and the target blob gas per block.
///
/// These fields will be used to calculate `excess_blob_gas` with [`calc_excess_blob_gas`] func.
#[deprecated(
note = "Use `calc_excess_blob_gas` and `BlobExcessGasAndPrice::new` instead. Only works for forks before Osaka."
)]
pub fn from_parent_and_target(
parent_excess_blob_gas: u64,
parent_blob_gas_used: u64,
parent_target_blob_gas_per_block: u64,
blob_base_fee_update_fraction: u64,
) -> Self {
Self::new(
calc_excess_blob_gas(
parent_excess_blob_gas,
parent_blob_gas_used,
parent_target_blob_gas_per_block,
),
blob_base_fee_update_fraction,
)
}
}

/// Calculates the `excess_blob_gas` from the parent header's `blob_gas_used` and `excess_blob_gas`.
Expand Down Expand Up @@ -113,7 +88,7 @@ pub fn calc_excess_blob_gas_osaka(
return 0;
}

if (eip7918::BLOB_BASE_COST.saturating_mul(parent_base_fee_per_gas) as u128)
if (BLOB_BASE_COST.saturating_mul(parent_base_fee_per_gas) as u128)
> (GAS_PER_BLOB as u128).saturating_mul(get_base_fee_per_blob_gas(
parent_blob_base_fee_per_gas,
parent_blob_base_fee_update_fraction,
Expand Down
6 changes: 0 additions & 6 deletions crates/primitives/src/eip7918.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub mod eip7702;
pub mod eip7823;
pub mod eip7825;
pub mod eip7907;
pub mod eip7918;
pub mod hardfork;
mod once_lock;

Expand Down
Loading