Skip to content

Commit 4ffbfe5

Browse files
committed
Merge remote-tracking branch 'upstream/main' into operand-stack-growth-strategy
2 parents dd2d8ae + a65e02e commit 4ffbfe5

File tree

77 files changed

+2527
-976
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2527
-976
lines changed

CHANGELOG.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
2+
23
## Unreleased
4+
5+
### Breaking Changes
6+
7+
### Upcoming Breaking Changes
8+
9+
### Additions and Improvements
10+
11+
#### Fusaka
12+
13+
### Bug fixes
14+
15+
16+
## 25.7.0
317
### Breaking Changes
418
- Changes in Maven coordinates of Besu artifacts to avoid possible collisions with other libraries when packaging plugins. See [Appendix A](#appendix-a) for a mapping. [#8589](https://github.com/hyperledger/besu/pull/8589) [#8746](https://github.com/hyperledger/besu/pull/8746)
519
- `BesuContext` is removed, since deprecated in favor of `ServiceManager` since `24.12.0`
@@ -11,27 +25,46 @@
1125
- Sunsetting features - for more context on the reasoning behind the deprecation of these features, including alternative options, read [this blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu)
1226
- Stratum mining has been removed (part of PoW) [#8802](https://github.com/hyperledger/besu/pull/8802)
1327
- PoW RPCs removed: `eth_getWork`, `eth_submitWork`, `eth_getHashrate`, `eth_submitHashrate`, `eth_hashrate`
28+
- Introduce history expiry behaviour for mainnet [8875](https://github.com/hyperledger/besu/pull/8875)
29+
- SNAP sync will now download only headers for pre-checkpoint (pre-merge) blocks
30+
- `--snapsync-synchronizer-pre-checkpoint-headers-only-enabled` can be set to false to force SNAP sync to download pre-checkpoint (pre-merge) blocks
31+
- `--history-expiry-prune` can be used to enable online pruning of pre-checkpoint (pre-merge) blocks as well as modifying database garbage collection parameters to free up disk space from the pruned blocks
1432

1533
### Upcoming Breaking Changes
1634
- `--Xbonsai-parallel-tx-processing-enabled` is deprecated, use `--bonsai-parallel-tx-processing-enabled` instead.
35+
- `--Xsnapsync-server-enabled` is deprecated, use `--snapsync-server-enabled` instead [#8512](https://github.com/hyperledger/besu/pull/8512)
1736
- Sunsetting features - for more context on the reasoning behind the deprecation of these features, including alternative options, read [this blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu)
1837
- Proof of Work consensus (PoW)
1938
- Fast Sync
2039
- Support for block creation on networks running a pre-Byzantium fork is deprecated for removal in a future release, after that to update Besu on nodes that build blocks, your network needs to be upgraded at least to the Byzantium fork. The main reason is to simplify world state management during block creation, since before Byzantium for each selected transaction, the receipt must contain the root hash of the modified world state, and this does not play well with the new plugin features and future work on parallelism.
40+
- `--Xsnapsync-synchronizer-pre-merge-headers-only-enabled` is deprecated and will be removed in a future release. Use `--snapsync-synchronizer-pre-checkpoint-headers-only-enabled` instead.
41+
- `--Xhistory-expiry-prune` is deprecated and will be removed in a future release. Use `--history-expiry-prune` instead.
2142

2243
### Additions and Improvements
2344
- Introduce the `TransactionValidatorService` to allow plugins to add custom validation rules [#8793](https://github.com/hyperledger/besu/pull/8793)
2445
- Implement rewardPercentile cap in eth_feeHistory [#8748](https://github.com/hyperledger/besu/pull/8748)
25-
- Enable parallel tx processing by default if Bonsai is used [#8668](https://github.com/hyperledger/besu/pull/8668)
26-
- Increase mainnet gas limit to 45M [#8824](https://github.com/hyperledger/besu/pull/8824)
2746
- Expose a method to get blob gas price from plugins [#8843](https://github.com/hyperledger/besu/pull/8843)
2847
- Experimental Bonsai Archive support [#7475](https://github.com/hyperledger/besu/pull/7475)
2948
- Use eth/69 by default [#8858](https://github.com/hyperledger/besu/pull/8858)
49+
- `--snapsync-server-enabled` New option to enable serving snap sync data [#8512](https://github.com/hyperledger/besu/pull/8512)
50+
- Introduce history expiry behaviour [#8875](https://github.com/hyperledger/besu/pull/8875)
51+
- SNAP sync will now download only headers for pre-checkpoint (pre-merge) blocks
52+
- `--snapsync-synchronizer-pre-checkpoint-headers-only-enabled` can be set to false to force SNAP sync to download pre-checkpoint (pre-merge) blocks
53+
- `--history-expiry-prune` can be used to enable online pruning of pre-checkpoint (pre-merge) blocks as well as modifying database garbage collection parameters to free up disk space from the pruned blocks
3054

31-
#### Fusaka
55+
### Performance
56+
- Increase mainnet gas limit to 45M [#8824](https://github.com/hyperledger/besu/pull/8824)
57+
- Enable parallel tx processing by default if Bonsai is used [#8668](https://github.com/hyperledger/besu/pull/8668)
58+
- Remove redundant serialization of json params [#8847](https://github.com/hyperledger/besu/pull/8847)
59+
- Improve ExtCodeHash performance [#8811](https://github.com/hyperledger/besu/pull/8811)
60+
- Improve ModExp precompile performance [#8868](https://github.com/hyperledger/besu/pull/8868)
61+
62+
#### Fusaka (SFI'd and CFI'd)
3263
- EIP-7825 - Transaction gas limit cap [#8700](https://github.com/hyperledger/besu/pull/8700)
3364
- EIP-7823 - Modexp upper bounds [#8632](https://github.com/hyperledger/besu/pull/8632)
3465
- EIP-7892 - Max number of blobs per transaction [#8761](https://github.com/hyperledger/besu/pull/8761)
66+
- EIP-7934 - RLP Execution Block Size Limit [#8765](https://github.com/hyperledger/besu/pull/8765)
67+
- EIP-7951 - Precompile for secp256r1 Curve Support [#8750](https://github.com/hyperledger/besu/pull/8750)
3568

3669
### Bug fixes
3770

acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueMiningAcceptanceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void shouldMineBlocksOnlyWhenTransactionsArePresentWhenCreateEmptyBlocksI
8383
}
8484

8585
@Test
86-
@Disabled // too flaky
86+
@Disabled("flaky see https://github.com/hyperledger/besu/issues/8862")
8787
public void shouldMineTransactionsOnMultipleNodes() throws IOException {
8888
final BesuNode minerNode1 = besu.createCliqueNode("miner1");
8989
final BesuNode minerNode2 = besu.createCliqueNode("miner2");
@@ -135,6 +135,7 @@ private void startClusterAndVerifyProducingBlocks(
135135
}
136136

137137
@Test
138+
@Disabled("flaky see https://github.com/hyperledger/besu/issues/8862")
138139
public void shouldStillMineWhenANodeFailsAndHasSufficientValidators() throws IOException {
139140
final BesuNode minerNode1 = besu.createCliqueNode("miner1");
140141
final BesuNode minerNode2 = besu.createCliqueNode("miner2");

app/src/main/java/org/hyperledger/besu/RunnerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ public Runner build() {
721721
.getBlockchain()
722722
.observeBlockAdded(
723723
blockAddedEvent -> {
724-
if (protocolSchedule.isOnMilestoneBoundary(blockAddedEvent.getBlock().getHeader())) {
724+
if (protocolSchedule.isOnMilestoneBoundary(blockAddedEvent.getHeader())) {
725725
network.updateNodeRecord();
726726
}
727727
});

app/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public String build() {
417417
}
418418

419419
if (isSnapServerEnabled) {
420-
lines.add("Experimental Snap Sync server enabled");
420+
lines.add("Snap Sync server enabled");
421421
}
422422

423423
if (isHighSpec) {

app/src/main/java/org/hyperledger/besu/cli/options/SynchronizerOptions.java

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
6464
private static final String WORLD_STATE_TASK_CACHE_SIZE_FLAG =
6565
"--Xsynchronizer-world-state-task-cache-size";
6666

67+
// Regular (stable) flag
68+
private static final String SNAP_SERVER_ENABLED_FLAG = "--snapsync-server-enabled";
69+
// Deprecated experimental flag
70+
private static final String SNAP_SERVER_ENABLED_EXPERIMENTAL_FLAG = "--Xsnapsync-server-enabled";
71+
6772
private static final String SNAP_PIVOT_BLOCK_WINDOW_VALIDITY_FLAG =
6873
"--Xsnapsync-synchronizer-pivot-block-window-validity";
6974
private static final String SNAP_PIVOT_BLOCK_DISTANCE_BEFORE_CACHING_FLAG =
@@ -83,12 +88,10 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
8388
private static final String SNAP_FLAT_STORAGE_HEALED_COUNT_PER_REQUEST_FLAG =
8489
"--Xsnapsync-synchronizer-flat-slot-healed-count-per-request";
8590

86-
private static final String SNAP_SERVER_ENABLED_FLAG = "--Xsnapsync-server-enabled";
87-
8891
private static final String CHECKPOINT_POST_MERGE_FLAG = "--Xcheckpoint-post-merge-enabled";
8992

90-
private static final String SNAP_SYNC_SAVE_PRE_MERGE_HEADERS_ONLY_FLAG =
91-
"--Xsnapsync-synchronizer-pre-merge-headers-only-enabled";
93+
private static final String SNAP_SYNC_SAVE_PRE_CHECKPOINT_HEADERS_ONLY_FLAG =
94+
"--snapsync-synchronizer-pre-checkpoint-headers-only-enabled";
9295

9396
/**
9497
* Parse block propagation range.
@@ -294,12 +297,15 @@ public void parseBlockPropagationRange(final String arg) {
294297
private int snapsyncFlatStorageHealedCountPerRequest =
295298
SnapSyncConfiguration.DEFAULT_LOCAL_FLAT_STORAGE_COUNT_TO_HEAL_PER_REQUEST;
296299

300+
// TODO --Xsnapsync-server-enabled is deprecated, remove in a future release
301+
@SuppressWarnings("ExperimentalCliOptionMustBeCorrectlyDisplayed")
297302
@CommandLine.Option(
298-
names = SNAP_SERVER_ENABLED_FLAG,
299-
hidden = true,
303+
names = {SNAP_SERVER_ENABLED_FLAG, SNAP_SERVER_ENABLED_EXPERIMENTAL_FLAG},
300304
paramLabel = "<Boolean>",
301305
arity = "0..1",
302-
description = "Snap sync server enabled (default: ${DEFAULT-VALUE})")
306+
fallbackValue = "true",
307+
description =
308+
"Enable snap sync server capability. Note: --Xsnapsync-server-enabled is deprecated and will be removed in a future release. --snapsync-server-enabled is used instead. (default: ${DEFAULT-VALUE})")
303309
private Boolean snapsyncServerEnabled = SnapSyncConfiguration.DEFAULT_SNAP_SERVER_ENABLED;
304310

305311
@CommandLine.Option(
@@ -325,14 +331,19 @@ public void parseBlockPropagationRange(final String arg) {
325331
private Boolean snapTransactionIndexingEnabled =
326332
SnapSyncConfiguration.DEFAULT_SNAP_SYNC_TRANSACTION_INDEXING_ENABLED;
327333

334+
@SuppressWarnings("ExperimentalCliOptionMustBeCorrectlyDisplayed")
328335
@CommandLine.Option(
329-
names = SNAP_SYNC_SAVE_PRE_MERGE_HEADERS_ONLY_FLAG,
336+
names = {
337+
"--Xsnapsync-synchronizer-pre-merge-headers-only-enabled",
338+
SNAP_SYNC_SAVE_PRE_CHECKPOINT_HEADERS_ONLY_FLAG
339+
},
330340
paramLabel = "<Boolean>",
331-
hidden = true,
332341
arity = "0..1",
333342
description =
334-
"Enable snap sync downloader to save only headers for blocks before the merge. (default: ${DEFAULT-VALUE})")
335-
private Boolean snapSyncSavePreMergeHeadersOnlyEnabled =
343+
"Enable snap sync downloader to save only headers (not block bodies) for blocks before the checkpoint. (default: ${DEFAULT-VALUE}) \"--Xsnapsync-synchronizer-pre-merge-headers-only-enabled\" is deprecated and will be removed in a future release. Use \""
344+
+ SNAP_SYNC_SAVE_PRE_CHECKPOINT_HEADERS_ONLY_FLAG
345+
+ "\" instead.")
346+
private Boolean snapSyncSavePreCheckpointHeadersOnlyEnabled =
336347
DEFAULT_SNAP_SYNC_SAVE_PRE_MERGE_HEADERS_ONLY_ENABLED;
337348

338349
private SynchronizerOptions() {}
@@ -407,8 +418,8 @@ public static SynchronizerOptions fromConfig(final SynchronizerConfiguration con
407418
options.snapsyncServerEnabled = config.getSnapSyncConfiguration().isSnapServerEnabled();
408419
options.snapTransactionIndexingEnabled =
409420
config.getSnapSyncConfiguration().isSnapSyncTransactionIndexingEnabled();
410-
options.snapSyncSavePreMergeHeadersOnlyEnabled =
411-
config.isSnapSyncSavePreMergeHeadersOnlyEnabled();
421+
options.snapSyncSavePreCheckpointHeadersOnlyEnabled =
422+
config.isSnapSyncSavePreCheckpointHeadersOnlyEnabled();
412423
return options;
413424
}
414425

@@ -445,7 +456,8 @@ public SynchronizerConfiguration.Builder toDomainObject() {
445456
.build());
446457
builder.checkpointPostMergeEnabled(checkpointPostMergeSyncEnabled);
447458
builder.isPeerTaskSystemEnabled(isPeerTaskSystemEnabled);
448-
builder.snapSyncSavePreMergeHeadersOnlyEnabled(snapSyncSavePreMergeHeadersOnlyEnabled);
459+
builder.snapSyncSavePreCheckpointHeadersOnlyEnabled(
460+
snapSyncSavePreCheckpointHeadersOnlyEnabled);
449461
return builder;
450462
}
451463

@@ -503,8 +515,8 @@ public List<String> getCLIOptions() {
503515
OptionParser.format(snapsyncServerEnabled),
504516
SNAP_TRANSACTION_INDEXING_ENABLED_FLAG,
505517
OptionParser.format(snapTransactionIndexingEnabled),
506-
SNAP_SYNC_SAVE_PRE_MERGE_HEADERS_ONLY_FLAG,
507-
OptionParser.format(snapSyncSavePreMergeHeadersOnlyEnabled));
518+
SNAP_SYNC_SAVE_PRE_CHECKPOINT_HEADERS_ONLY_FLAG,
519+
OptionParser.format(snapSyncSavePreCheckpointHeadersOnlyEnabled));
508520
return value;
509521
}
510522
}

app/src/main/java/org/hyperledger/besu/cli/options/storage/DataStorageOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public class DataStorageOptions implements CLIOptions<DataStorageConfiguration>
4949
fallbackValue = "true")
5050
private Boolean receiptCompactionEnabled = DEFAULT_RECEIPT_COMPACTION_ENABLED;
5151

52+
@SuppressWarnings("ExperimentalCliOptionMustBeCorrectlyDisplayed")
5253
@CommandLine.Option(
53-
names = {"--Xhistory-expiry-prune"},
54-
hidden = true,
54+
names = {"--Xhistory-expiry-prune", "--history-expiry-prune"},
5555
description =
56-
"Convenience option to configure BlobDB garbage collection settings following a history expiry prune")
57-
private boolean historyExpiryPrune = false;
56+
"Convenience option to enable online history pruning and configure BlobDB garbage collection settings (default: ${DEFAULT-VALUE}). \"--Xhistory-expiry-prune\" is deprecated and will be removed in a future release. Use \"--history-expiry-prune\" instead.")
57+
private Boolean historyExpiryPrune = false;
5858

5959
/**
6060
* Options specific to path-based storage modes. Holds the necessary parameters to configure

app/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected MiningCoordinator createMiningCoordinator(
114114
o ->
115115
miningConfiguration.setBlockPeriodSeconds(
116116
forksSchedule
117-
.getFork(o.getBlock().getHeader().getNumber() + 1)
117+
.getFork(o.getHeader().getNumber() + 1)
118118
.getValue()
119119
.getBlockPeriodSeconds()));
120120

app/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ protected MiningCoordinator createMiningCoordinator(
247247
o ->
248248
miningConfiguration.setBlockPeriodSeconds(
249249
forksSchedule
250-
.getFork(o.getBlock().getHeader().getNumber() + 1)
250+
.getFork(o.getHeader().getNumber() + 1)
251251
.getValue()
252252
.getBlockPeriodSeconds()));
253253

app/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ protected MergeContext createConsensusContext(
224224
blockchain.observeBlockAdded(
225225
blockAddedEvent ->
226226
blockchain
227-
.getTotalDifficultyByHash(blockAddedEvent.getBlock().getHeader().getHash())
227+
.getTotalDifficultyByHash(blockAddedEvent.getHeader().getHash())
228228
.ifPresent(mergeContext::setIsPostMerge));
229229

230230
return mergeContext;

app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ protected MiningCoordinator createMiningCoordinator(
332332
o -> {
333333
miningConfiguration.setBlockPeriodSeconds(
334334
qbftForksSchedule
335-
.getFork(o.getBlock().getHeader().getNumber() + 1)
335+
.getFork(o.getHeader().getNumber() + 1)
336336
.getValue()
337337
.getBlockPeriodSeconds());
338338
miningConfiguration.setEmptyBlockPeriodSeconds(
339339
qbftForksSchedule
340-
.getFork(o.getBlock().getHeader().getNumber() + 1)
340+
.getFork(o.getHeader().getNumber() + 1)
341341
.getValue()
342342
.getEmptyBlockPeriodSeconds());
343343
});

0 commit comments

Comments
 (0)