diff --git a/crates/chainspec/src/constants.rs b/crates/chainspec/src/constants.rs index a2accd8272ba..bbe40ebc9a01 100644 --- a/crates/chainspec/src/constants.rs +++ b/crates/chainspec/src/constants.rs @@ -2,8 +2,8 @@ use crate::spec::DepositContract; use alloy_primitives::{address, b256}; /// Gas per transaction not creating a contract. -/// WVM: Raised from 21k to 500_000_000 -pub const MIN_TRANSACTION_GAS: u64 = 500_000_000u64; +/// WVM: Raised from 21k to 500_000 +pub const MIN_TRANSACTION_GAS: u64 = 500_000u64; /// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa` pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new( address!("00000000219ab540356cbb839cbe05303d7705fa"), diff --git a/crates/node/core/src/args/txpool.rs b/crates/node/core/src/args/txpool.rs index 16b918ab9e95..9e2fbeb864c4 100644 --- a/crates/node/core/src/args/txpool.rs +++ b/crates/node/core/src/args/txpool.rs @@ -47,8 +47,9 @@ pub struct TxPoolArgs { #[arg(long = "txpool.pricebump", default_value_t = DEFAULT_PRICE_BUMP)] pub price_bump: u128, + // WVM: 500_000 /// Minimum base fee required by the protocol. - #[arg(long = "txpool.minimal-protocol-fee", default_value_t = MIN_PROTOCOL_BASE_FEE.load(SeqCst))] + #[arg(long = "txpool.minimal-protocol-fee", default_value_t = 500_000)] pub minimal_protocol_basefee: u64, /// The default enforced gas limit for transactions entering the pool diff --git a/crates/primitives-traits/src/constants/mod.rs b/crates/primitives-traits/src/constants/mod.rs index 5bf5869b436a..d9f331051b40 100644 --- a/crates/primitives-traits/src/constants/mod.rs +++ b/crates/primitives-traits/src/constants/mod.rs @@ -46,9 +46,7 @@ pub const BEACON_NONCE: u64 = 0u64; // TODO: This should be a chain spec parameter. /// See . /// WVM: we set 300kk gas limit -pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell = LazyCell::new(|| { - 500_000_000 -}); // WVM: 500_000_000 gas limit +pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell = LazyCell::new(|| 500_000_000); // WVM: 500_000_000 gas limit /// The minimum tx fee below which the txpool will reject the transaction. /// @@ -62,7 +60,8 @@ pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell = LazyCell::new(|| { // pub const MIN_PROTOCOL_BASE_FEE: u64 = 7; // WVM: min base fee 7 => 500k -pub static MIN_PROTOCOL_BASE_FEE: LazyLock = LazyLock::new(|| AtomicU64::new(500_000u64)); +pub static MIN_PROTOCOL_BASE_FEE: LazyLock = + LazyLock::new(|| AtomicU64::new(500_000u64)); pub(crate) static WVM_FEE_MANAGER: LazyLock> = LazyLock::new(|| { let fee = WvmFee::new(Some(Box::new(move |price| { @@ -214,7 +213,6 @@ mod tests { #[tokio::test] pub async fn test_wvm_fee_manager() { - std::env::set_var("ETHEREUM_BLOCK_GAS_LIMIT", "500000000"); let init = &*WVM_FEE_MANAGER; tokio::time::sleep(Duration::from_secs(10)).await; let latest_gas = get_latest_min_protocol_base_fee(); @@ -225,7 +223,6 @@ mod tests { #[tokio::test] async fn min_protocol_sanity() { - std::env::set_var("ETHEREUM_BLOCK_GAS_LIMIT", "500000000"); let init = &*WVM_FEE_MANAGER; tokio::time::sleep(Duration::from_secs(10)).await; assert_eq!(MIN_PROTOCOL_BASE_FEE_U256.to::(), get_latest_min_protocol_base_fee()); diff --git a/crates/rpc/rpc-server-types/src/constants.rs b/crates/rpc/rpc-server-types/src/constants.rs index fdb823407ad9..5feee6d0c100 100644 --- a/crates/rpc/rpc-server-types/src/constants.rs +++ b/crates/rpc/rpc-server-types/src/constants.rs @@ -85,7 +85,8 @@ pub mod gas_oracle { /// This is different from the default to regular 30M block gas limit /// [`ETHEREUM_BLOCK_GAS_LIMIT`](reth_primitives::constants::ETHEREUM_BLOCK_GAS_LIMIT) to allow /// for more complex calls. - pub const RPC_DEFAULT_GAS_CAP: u64 = 50_000_000; + // WVM: 500_000_000 + pub const RPC_DEFAULT_GAS_CAP: u64 = 500_000_000; /// Allowed error ratio for gas estimation /// Taken from Geth's implementation in order to pass the hive tests