diff --git a/packages/protocol/contracts/L2/LibL2Config.sol b/packages/protocol/contracts/L2/LibL2Config.sol index 990124f59d..9c1e316d88 100644 --- a/packages/protocol/contracts/L2/LibL2Config.sol +++ b/packages/protocol/contracts/L2/LibL2Config.sol @@ -17,6 +17,8 @@ library LibL2Config { // We need to monitor L2 state growth and lower this value when necessary. config_.gasTargetPerL1Block = 60_000_000; config_.basefeeAdjustmentQuotient = 8; - config_.gasExcessMinValue = 18_000_000_000; + + // We pick this value to make the min base fee 0.1gwei + config_.gasExcessMinValue = 18_440_000_000; } } diff --git a/packages/protocol/test/L2/Lib1559Math.t.sol b/packages/protocol/test/L2/Lib1559Math.t.sol index 8697e72b51..d474ac438c 100644 --- a/packages/protocol/test/L2/Lib1559Math.t.sol +++ b/packages/protocol/test/L2/Lib1559Math.t.sol @@ -14,19 +14,10 @@ contract TestLib1559Math is TaikoTest { uint256 i; baseFee = Lib1559Math.basefee(config.gasExcessMinValue, adjustmentFactor); - assertEq(baseFee, 40_253_331); // about 0.04gwei + assertEq(baseFee, 100_671_168); // about 0.1gwei console2.log("gasExcessMinValue:", config.gasExcessMinValue); console2.log("min base fee:", baseFee); - for (; baseFee < 1 gwei / 10; ++i) { - baseFee = Lib1559Math.basefee(config.gasTargetPerL1Block * i, adjustmentFactor); - console2.log("base fee:", i, baseFee); - } - - // base fee will reach 1 gwei if gasExcess > 18540000000 - console2.log("base fee will reach 0.1 gwei if gasExcess >", config.gasTargetPerL1Block * i); - assertEq(i, 309); - for (; baseFee < 1 gwei; ++i) { baseFee = Lib1559Math.basefee(config.gasTargetPerL1Block * i, adjustmentFactor); console2.log("base fee:", i, baseFee);