@@ -47,13 +47,8 @@ pub const BEACON_NONCE: u64 = 0u64;
47
47
/// See <https://github.com/paradigmxyz/reth/issues/3233>.
48
48
/// WVM: we set 300kk gas limit
49
49
pub const ETHEREUM_BLOCK_GAS_LIMIT : LazyCell < u64 > = LazyCell :: new ( || {
50
- let env_gas_limit = std:: env:: var ( "ETHEREUM_BLOCK_GAS_LIMIT" ) ;
51
- if let Ok ( gas_limit) = env_gas_limit {
52
- gas_limit. as_str ( ) . parse :: < u64 > ( ) . unwrap ( )
53
- } else {
54
- 300_000_000
55
- }
56
- } ) ; // WVM: 300_000_000 gas limit
50
+ 500_000_000
51
+ } ) ; // WVM: 500_000_000 gas limit
57
52
58
53
/// The minimum tx fee below which the txpool will reject the transaction.
59
54
///
@@ -66,14 +61,19 @@ pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| {
66
61
/// significant harm in leaving this setting as is.
67
62
// pub const MIN_PROTOCOL_BASE_FEE: u64 = 7;
68
63
69
- pub static MIN_PROTOCOL_BASE_FEE : LazyLock < AtomicU64 > = LazyLock :: new ( || AtomicU64 :: new ( 7 ) ) ;
64
+ // WVM: min base fee 7 => 500k
65
+ pub static MIN_PROTOCOL_BASE_FEE : LazyLock < AtomicU64 > = LazyLock :: new ( || AtomicU64 :: new ( 500_000u64 ) ) ;
70
66
71
67
pub ( crate ) static WVM_FEE_MANAGER : LazyLock < Arc < WvmFeeManager > > = LazyLock :: new ( || {
72
68
let fee = WvmFee :: new ( Some ( Box :: new ( move |price| {
73
69
let original_price = price as f64 / 1_000_000_000f64 ;
74
70
let lowest_possible_gas_price_in_gwei =
75
71
raw_calculate_lowest_possible_gas_price ( original_price, * ETHEREUM_BLOCK_GAS_LIMIT ) ;
76
- let to_wei = lowest_possible_gas_price_in_gwei * 1e9 ;
72
+ let mut to_wei = lowest_possible_gas_price_in_gwei * 1e9 ;
73
+ // WVM: minimum fee check
74
+ if to_wei < 500_000f64 {
75
+ to_wei = 500_000f64 ;
76
+ }
77
77
MIN_PROTOCOL_BASE_FEE . store ( to_wei as u64 , SeqCst ) ;
78
78
Ok ( ( ) )
79
79
} ) ) ) ;
0 commit comments