Skip to content

Commit 41304f6

Browse files
authored
Merge pull request #98 from weaveVM/dev
merge: dev to main
2 parents 2c19e16 + e7831e1 commit 41304f6

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

crates/chainspec/src/constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use crate::spec::DepositContract;
22
use alloy_primitives::{address, b256};
33

44
/// Gas per transaction not creating a contract.
5-
/// WVM: Raised from 21k to 500_000_000
6-
pub const MIN_TRANSACTION_GAS: u64 = 500_000_000u64;
5+
/// WVM: Raised from 21k to 500_000
6+
pub const MIN_TRANSACTION_GAS: u64 = 500_000u64;
77
/// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa`
88
pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new(
99
address!("00000000219ab540356cbb839cbe05303d7705fa"),

crates/node/core/src/args/txpool.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ pub struct TxPoolArgs {
4747
#[arg(long = "txpool.pricebump", default_value_t = DEFAULT_PRICE_BUMP)]
4848
pub price_bump: u128,
4949

50+
// WVM: 500_000
5051
/// Minimum base fee required by the protocol.
51-
#[arg(long = "txpool.minimal-protocol-fee", default_value_t = MIN_PROTOCOL_BASE_FEE.load(SeqCst))]
52+
#[arg(long = "txpool.minimal-protocol-fee", default_value_t = 500_000)]
5253
pub minimal_protocol_basefee: u64,
5354

5455
/// The default enforced gas limit for transactions entering the pool

crates/primitives-traits/src/constants/mod.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ pub const BEACON_NONCE: u64 = 0u64;
4646
// TODO: This should be a chain spec parameter.
4747
/// See <https://github.com/paradigmxyz/reth/issues/3233>.
4848
/// WVM: we set 300kk gas limit
49-
pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| {
50-
500_000_000
51-
}); // WVM: 500_000_000 gas limit
49+
pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| 500_000_000); // WVM: 500_000_000 gas limit
5250

5351
/// The minimum tx fee below which the txpool will reject the transaction.
5452
///
@@ -62,7 +60,8 @@ pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| {
6260
// pub const MIN_PROTOCOL_BASE_FEE: u64 = 7;
6361

6462
// WVM: min base fee 7 => 500k
65-
pub static MIN_PROTOCOL_BASE_FEE: LazyLock<AtomicU64> = LazyLock::new(|| AtomicU64::new(500_000u64));
63+
pub static MIN_PROTOCOL_BASE_FEE: LazyLock<AtomicU64> =
64+
LazyLock::new(|| AtomicU64::new(500_000u64));
6665

6766
pub(crate) static WVM_FEE_MANAGER: LazyLock<Arc<WvmFeeManager>> = LazyLock::new(|| {
6867
let fee = WvmFee::new(Some(Box::new(move |price| {
@@ -214,7 +213,6 @@ mod tests {
214213

215214
#[tokio::test]
216215
pub async fn test_wvm_fee_manager() {
217-
std::env::set_var("ETHEREUM_BLOCK_GAS_LIMIT", "500000000");
218216
let init = &*WVM_FEE_MANAGER;
219217
tokio::time::sleep(Duration::from_secs(10)).await;
220218
let latest_gas = get_latest_min_protocol_base_fee();
@@ -225,7 +223,6 @@ mod tests {
225223

226224
#[tokio::test]
227225
async fn min_protocol_sanity() {
228-
std::env::set_var("ETHEREUM_BLOCK_GAS_LIMIT", "500000000");
229226
let init = &*WVM_FEE_MANAGER;
230227
tokio::time::sleep(Duration::from_secs(10)).await;
231228
assert_eq!(MIN_PROTOCOL_BASE_FEE_U256.to::<u64>(), get_latest_min_protocol_base_fee());

crates/rpc/rpc-server-types/src/constants.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ pub mod gas_oracle {
8585
/// This is different from the default to regular 30M block gas limit
8686
/// [`ETHEREUM_BLOCK_GAS_LIMIT`](reth_primitives::constants::ETHEREUM_BLOCK_GAS_LIMIT) to allow
8787
/// for more complex calls.
88-
pub const RPC_DEFAULT_GAS_CAP: u64 = 50_000_000;
88+
// WVM: 500_000_000
89+
pub const RPC_DEFAULT_GAS_CAP: u64 = 500_000_000;
8990

9091
/// Allowed error ratio for gas estimation
9192
/// Taken from Geth's implementation in order to pass the hive tests

0 commit comments

Comments
 (0)