Fix BFT creating invalid blocks on London when zero base fee is used (#5276)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
pull/5196/head
Jason Frame 2 years ago committed by GitHub
parent a064a4a796
commit d3be9c87a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 5
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/feemarket/ZeroBaseFeeMarket.java
  3. 11
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/feemarket/ZeroBaseFeeMarketTest.java

@ -13,6 +13,7 @@
- Upgrade RocksDB version from 7.7.3 to 8.0.0. Besu Team [contributed](https://github.com/facebook/rocksdb/pull/11099) to this release to make disabling checksum verification work.
### Bug Fixes
- Fix QBFT and IBFT unable to propose blocks on London when zeroBaseFee is used [#5276](https://github.com/hyperledger/besu/pull/5276)
### Download Links

@ -38,9 +38,4 @@ public class ZeroBaseFeeMarket extends LondonFeeMarket {
public ValidationMode baseFeeValidationMode(final long blockNumber) {
return ValidationMode.NONE;
}
@Override
public boolean implementsDataFee() {
return true;
}
}

@ -18,6 +18,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.hyperledger.besu.crypto.KeyPair;
import org.hyperledger.besu.crypto.SignatureAlgorithmFactory;
import org.hyperledger.besu.datatypes.DataGas;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.core.TransactionTestFixture;
@ -138,4 +139,14 @@ public class ZeroBaseFeeMarketTest {
assertThat(zeroBaseFeeMarket.isBeforeForkBlock(10)).isFalse();
assertThat(zeroBaseFeeMarket.isBeforeForkBlock(11)).isFalse();
}
@Test
public void implementsDataFeedShouldReturnFalse() {
assertThat(zeroBaseFeeMarket.implementsDataFee()).isFalse();
}
@Test
public void dataPriceShouldReturnsZero() {
assertThat(zeroBaseFeeMarket.dataPrice(DataGas.ONE)).isEqualTo(Wei.ZERO);
}
}

Loading…
Cancel
Save