Skip to content

Commit

Permalink
Fix BFT creating invalid blocks on London when zero base fee is used (h…
Browse files Browse the repository at this point in the history
…yperledger#5276)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
  • Loading branch information
jframe authored and elenduuche committed Aug 16, 2023
1 parent 9220bb8 commit b22645c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@ public Wei computeBaseFee(
public ValidationMode baseFeeValidationMode(final long blockNumber) {
return ValidationMode.NONE;
}

@Override
public boolean implementsDataFee() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;
Expand Down Expand Up @@ -138,4 +139,14 @@ public void isBeforeForkBlockShouldBeFalse() {
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);
}
}

0 comments on commit b22645c

Please sign in to comment.