diff --git a/config/src/main/java/org/hyperledger/besu/config/experimental/ExperimentalEIPs.java b/config/src/main/java/org/hyperledger/besu/config/experimental/ExperimentalEIPs.java index e56156b38f..e745ea1f13 100644 --- a/config/src/main/java/org/hyperledger/besu/config/experimental/ExperimentalEIPs.java +++ b/config/src/main/java/org/hyperledger/besu/config/experimental/ExperimentalEIPs.java @@ -69,13 +69,7 @@ public class ExperimentalEIPs { hidden = true, names = {"--Xeip1559-decay-range"}, arity = "1") - public static Long decayRange = 800000L; - - @Option( - hidden = true, - names = {"--Xeip1559-gas-increment-amount"}, - arity = "1") - public static Long gasIncrementAmount = 10L; + public static Long decayRange = 1000000L; @Option( hidden = true, diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarket.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarket.java index 4f95de9c2a..a63e9e9689 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarket.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarket.java @@ -40,7 +40,6 @@ public interface FeeMarket { ExperimentalEIPs.targetGasUsed, ExperimentalEIPs.slackCoefficient, ExperimentalEIPs.decayRange, - ExperimentalEIPs.gasIncrementAmount, ExperimentalEIPs.initialBasefee, ExperimentalEIPs.perTxGasLimit); } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarketConfig.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarketConfig.java index 99b5f48f57..b5d8a95b46 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarketConfig.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/FeeMarketConfig.java @@ -18,26 +18,27 @@ public class FeeMarketConfig implements FeeMarket { private final long basefeeMaxChangeDenominator; private final long targetGasUsed; private final long decayRange; - private final long gasIncrementAmount; private final long initialBasefee; private final long perTxGaslimit; private final long slackCoefficient; + private final long maxGas; + private final long gasIncrementAmount; public FeeMarketConfig( final long basefeeMaxChangeDenominator, final long targetGasUsed, final long slackCoefficient, final long decayRange, - final long gasIncrementAmount, final long initialBasefee, final long perTxGaslimit) { this.basefeeMaxChangeDenominator = basefeeMaxChangeDenominator; this.targetGasUsed = targetGasUsed; this.slackCoefficient = slackCoefficient; this.decayRange = decayRange; - this.gasIncrementAmount = gasIncrementAmount; this.initialBasefee = initialBasefee; this.perTxGaslimit = perTxGaslimit; + this.maxGas = slackCoefficient * targetGasUsed; + this.gasIncrementAmount = this.maxGas / 2 / this.decayRange; } @Override @@ -52,7 +53,7 @@ public class FeeMarketConfig implements FeeMarket { @Override public long getMaxGas() { - return slackCoefficient * targetGasUsed; + return maxGas; } @Override