Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't persist BFT proposed blocks, only committed ones #7204

Merged
merged 10 commits into from
Jun 13, 2024
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
- `admin_nodeInfo` JSON/RPC call returns the currently active EVM version [#7127](https://github.com/hyperledger/besu/pull/7127)
- Improve the selection of the most profitable built block [#7174](https://github.com/hyperledger/besu/pull/7174)
- Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658)

### Bug fixes
- Make `eth_gasPrice` aware of the base fee market [#7102](https://github.com/hyperledger/besu/pull/7102)
- Validation errors ignored in accounts-allowlist and empty list [#7138](https://github.com/hyperledger/besu/issues/7138)
- Fix "Invalid block detected" for BFT chains using Bonsai DB [#7204](https://github.com/hyperledger/besu/pull/7204)

## 24.5.2

### Upcoming Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 ConsenSys AG.
* Copyright contributors to Hyperledger Besu.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -150,7 +150,7 @@ private boolean validateBlock(final Block block) {

final var validationResult =
blockValidator.validateAndProcessBlock(
protocolContext, block, HeaderValidationMode.LIGHT, HeaderValidationMode.FULL);
protocolContext, block, HeaderValidationMode.LIGHT, HeaderValidationMode.FULL, false);

if (!validationResult.isSuccessful()) {
LOG.info(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 ConsenSys AG.
* Copyright contributors to Hyperledger Besu.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -111,7 +111,8 @@ QbftContext.class, emptyList(), bftExtraDataEncoder),
eq(protocolContext),
any(),
eq(HeaderValidationMode.LIGHT),
eq(HeaderValidationMode.FULL)))
eq(HeaderValidationMode.FULL),
eq(false)))
.thenReturn(new BlockProcessingResult(Optional.empty()));

when(protocolSchedule.getByBlockHeader(any())).thenReturn(protocolSpec);
Expand Down Expand Up @@ -168,7 +169,8 @@ public void validationFailsIfBlockIsInvalid() {
eq(protocolContext),
any(),
eq(HeaderValidationMode.LIGHT),
eq(HeaderValidationMode.FULL)))
eq(HeaderValidationMode.FULL),
eq(false)))
.thenReturn(new BlockProcessingResult("Failed"));

assertThat(roundItem.messageValidator.validate(proposal)).isFalse();
Expand Down
Loading