From c434e5263218269b8919c79b7ddf4b5ceb47db58 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:04:15 +0200 Subject: [PATCH] primitives: rm `alloy_eips::eip1559::calc_next_block_base_fee` reexport (#11177) --- Cargo.lock | 2 ++ crates/primitives/src/basefee.rs | 5 ----- crates/primitives/src/lib.rs | 1 - crates/rpc/rpc-eth-api/Cargo.toml | 1 + crates/rpc/rpc-eth-api/src/helpers/call.rs | 2 +- crates/rpc/rpc-eth-types/Cargo.toml | 1 + crates/rpc/rpc-eth-types/src/fee_history.rs | 2 +- 7 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 crates/primitives/src/basefee.rs diff --git a/Cargo.lock b/Cargo.lock index edf96ad8ac..3072281fb7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8593,6 +8593,7 @@ name = "reth-rpc-eth-api" version = "1.0.7" dependencies = [ "alloy-dyn-abi", + "alloy-eips", "alloy-json-rpc", "alloy-network", "alloy-primitives", @@ -8633,6 +8634,7 @@ name = "reth-rpc-eth-types" version = "1.0.7" dependencies = [ "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rpc-types", "alloy-rpc-types-eth", diff --git a/crates/primitives/src/basefee.rs b/crates/primitives/src/basefee.rs deleted file mode 100644 index aa52b02a03..0000000000 --- a/crates/primitives/src/basefee.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Helpers for working with EIP-1559 base fee - -// re-export -#[doc(inline)] -pub use alloy_eips::eip1559::calc_next_block_base_fee; diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 6c8e6b17c8..1ef0d0253d 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -23,7 +23,6 @@ extern crate alloc; #[cfg(feature = "alloy-compat")] mod alloy_compat; -pub mod basefee; mod block; #[cfg(feature = "reth-codec")] mod compression; diff --git a/crates/rpc/rpc-eth-api/Cargo.toml b/crates/rpc/rpc-eth-api/Cargo.toml index a551ff0b51..88cff48c2e 100644 --- a/crates/rpc/rpc-eth-api/Cargo.toml +++ b/crates/rpc/rpc-eth-api/Cargo.toml @@ -40,6 +40,7 @@ alloy-primitives.workspace = true alloy-rpc-types-eth.workspace = true alloy-rpc-types.workspace = true alloy-rpc-types-mev.workspace = true +alloy-eips.workspace = true # rpc jsonrpsee = { workspace = true, features = ["server", "macros"] } diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 416b29df04..b9b7e45a7c 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -4,6 +4,7 @@ use crate::{ AsEthApiError, FromEthApiError, FromEvmError, FullEthApiTypes, IntoEthApiError, RpcBlock, }; +use alloy_eips::eip1559::calc_next_block_base_fee; use alloy_primitives::{Bytes, TxKind, B256, U256}; use alloy_rpc_types::{ simulate::{SimBlock, SimulatePayload, SimulatedBlock}, @@ -15,7 +16,6 @@ use futures::Future; use reth_chainspec::{EthChainSpec, MIN_TRANSACTION_GAS}; use reth_evm::{ConfigureEvm, ConfigureEvmEnv}; use reth_primitives::{ - basefee::calc_next_block_base_fee, revm_primitives::{ BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ExecutionResult, HaltReason, ResultAndState, TransactTo, TxEnv, diff --git a/crates/rpc/rpc-eth-types/Cargo.toml b/crates/rpc/rpc-eth-types/Cargo.toml index 9d913b2858..1e2265589f 100644 --- a/crates/rpc/rpc-eth-types/Cargo.toml +++ b/crates/rpc/rpc-eth-types/Cargo.toml @@ -38,6 +38,7 @@ revm-inspectors.workspace = true revm-primitives = { workspace = true, features = ["dev"] } alloy-rpc-types.workspace = true alloy-serde.workspace = true +alloy-eips.workspace = true # rpc jsonrpsee-core.workspace = true diff --git a/crates/rpc/rpc-eth-types/src/fee_history.rs b/crates/rpc/rpc-eth-types/src/fee_history.rs index f413797682..c5afa2013a 100644 --- a/crates/rpc/rpc-eth-types/src/fee_history.rs +++ b/crates/rpc/rpc-eth-types/src/fee_history.rs @@ -6,6 +6,7 @@ use std::{ sync::{atomic::Ordering::SeqCst, Arc}, }; +use alloy_eips::eip1559::calc_next_block_base_fee; use alloy_primitives::B256; use alloy_rpc_types::TxGasAndReward; use futures::{ @@ -16,7 +17,6 @@ use metrics::atomics::AtomicU64; use reth_chain_state::CanonStateNotification; use reth_chainspec::{ChainSpecProvider, EthChainSpec}; use reth_primitives::{ - basefee::calc_next_block_base_fee, eip4844::{calc_blob_gasprice, calculate_excess_blob_gas}, Receipt, SealedBlock, TransactionSigned, };