From 7ec17b6080a77f96a801135c3f90ea13d700cd07 Mon Sep 17 00:00:00 2001 From: Karim Taam Date: Wed, 10 Jul 2024 10:19:56 +0200 Subject: [PATCH] clean code Signed-off-by: Karim Taam --- .../org/hyperledger/besu/cli/BesuCommand.java | 3 +- .../options/stable/DataStorageOptions.java | 12 +- .../controller/BesuControllerBuilder.java | 7 +- .../CliqueBesuControllerBuilder.java | 2 +- .../controller/IbftBesuControllerBuilder.java | 2 +- .../MainnetBesuControllerBuilder.java | 2 +- .../MergeBesuControllerBuilder.java | 2 +- .../controller/QbftBesuControllerBuilder.java | 2 +- .../besu/cli/CommandTestAbstract.java | 2 +- .../clique/CliqueProtocolSchedule.java | 8 +- .../bft/BaseBftProtocolScheduleBuilder.java | 4 +- .../BaseBftProtocolScheduleBuilderTest.java | 3 +- .../ibft/IbftProtocolScheduleBuilder.java | 8 +- .../merge/MergeProtocolSchedule.java | 8 +- .../merge/TransitionProtocolSchedule.java | 10 +- .../qbft/QbftProtocolScheduleBuilder.java | 12 +- .../FixedDifficultyProtocolSchedule.java | 12 +- .../mainnet/AbstractBlockProcessor.java | 29 ++--- .../mainnet/ClassicBlockProcessor.java | 4 +- .../mainnet/ClassicProtocolSpecs.java | 78 +++++-------- .../mainnet/MainnetBlockProcessor.java | 4 +- .../mainnet/MainnetProtocolSchedule.java | 18 +-- .../mainnet/MainnetProtocolSpecFactory.java | 103 ++++++------------ .../mainnet/MainnetProtocolSpecs.java | 101 ++++++++--------- .../mainnet/ProtocolScheduleBuilder.java | 18 +-- .../besu/ethereum/mainnet/ProtocolSpec.java | 12 +- .../ethereum/mainnet/ProtocolSpecBuilder.java | 12 +- ...lelizedConcurrentTransactionProcessor.java | 17 +-- ... => NoopBonsaiCachedMerkleTrieLoader.java} | 12 +- .../DiffBasedWorldStateUpdateAccumulator.java | 29 ++++- .../worldstate/DataStorageConfiguration.java | 2 +- .../mainnet/AbstractBlockProcessorTest.java | 4 +- .../mainnet/DifficultyCalculatorTests.java | 28 ++--- .../NoRewardProtocolScheduleWrapper.java | 4 +- 34 files changed, 267 insertions(+), 307 deletions(-) rename ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/{LazyBonsaiCachedMerkleTrieLoader.java => NoopBonsaiCachedMerkleTrieLoader.java} (86%) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index ba329c5e9be..5bbaf950eae 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -1905,8 +1905,7 @@ public BesuControllerBuilder getControllerBuilder() { .pkiBlockCreationConfiguration(maybePkiBlockCreationConfiguration()) .clock(Clock.systemUTC()) .isRevertReasonEnabled(isRevertReasonEnabled) - .isParallelPreloadTxEnabled( - dataStorageConfiguration.getUnstable().isParallelPreloadTxEnabled()) + .isParallelTxEnabled(dataStorageConfiguration.getUnstable().isParallelTxEnabled()) .storageProvider(storageProvider) .gasLimitCalculator( miningParametersSupplier.get().getTargetGasLimit().isPresent() diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java index 9aadfa47bc2..788ddb1b8f6 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java @@ -124,11 +124,11 @@ public static class Unstable { @CommandLine.Option( hidden = true, - names = {"--Xbonsai-parallel-preload-tx-enabled"}, + names = {"--Xbonsai-parallel-tx-enabled"}, arity = "1", description = - "Enables parallel preloading of transactions to optimize processing speed by concurrently loading and executing necessary data in advance. (default: ${DEFAULT-VALUE})") - private Boolean isParallelPreloadTxEnabled = false; + "Enables parallelization of transactions to optimize processing speed by concurrently loading and executing necessary data in advance. (default: ${DEFAULT-VALUE})") + private Boolean isParallelTxEnabled = false; /** Default Constructor. */ Unstable() {} @@ -188,7 +188,7 @@ public void validate(final CommandLine commandLine, final SyncMode syncMode) { } } } else { - if (unstableOptions.isParallelPreloadTxEnabled) { + if (unstableOptions.isParallelTxEnabled) { throw new CommandLine.ParameterException( commandLine, "Transaction parallelization is not supported unless operating in a 'diffbased' mode, such as Bonsai."); @@ -214,8 +214,8 @@ public static DataStorageOptions fromConfig(final DataStorageConfiguration domai domainObject.getUnstable().getBonsaiFullFlatDbEnabled(); dataStorageOptions.unstableOptions.bonsaiCodeUsingCodeHashEnabled = domainObject.getUnstable().getBonsaiCodeStoredByCodeHashEnabled(); - dataStorageOptions.unstableOptions.isParallelPreloadTxEnabled = - domainObject.getUnstable().isParallelPreloadTxEnabled(); + dataStorageOptions.unstableOptions.isParallelTxEnabled = + domainObject.getUnstable().isParallelTxEnabled(); return dataStorageOptions; } diff --git a/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java index 742b48fd2fb..f6e4cc1d4b8 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java @@ -208,7 +208,7 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides private int numberOfBlocksToCache = 0; - protected boolean isParallelPreloadTxEnabled; + protected boolean isParallelTxEnabled; /** Instantiates a new Besu controller builder. */ protected BesuControllerBuilder() {} @@ -531,9 +531,8 @@ public BesuControllerBuilder randomPeerPriority(final Boolean randomPeerPriority return this; } - public BesuControllerBuilder isParallelPreloadTxEnabled( - final boolean isParallelPreloadTxEnabled) { - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + public BesuControllerBuilder isParallelTxEnabled(final boolean isParallelTxEnabled) { + this.isParallelTxEnabled = isParallelTxEnabled; return this; } diff --git a/besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java index 2b879a958d4..d9c6bdab7c8 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java @@ -137,7 +137,7 @@ protected ProtocolSchedule createProtocolSchedule() { evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/besu/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java index a3885250c75..c876939ad54 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java @@ -292,7 +292,7 @@ protected ProtocolSchedule createProtocolSchedule() { evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/besu/src/main/java/org/hyperledger/besu/controller/MainnetBesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/MainnetBesuControllerBuilder.java index 8f74300747e..38bac0df023 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/MainnetBesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/MainnetBesuControllerBuilder.java @@ -100,7 +100,7 @@ protected ProtocolSchedule createProtocolSchedule() { evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/besu/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java index c342adfe6b1..c0dc1428159 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java @@ -178,7 +178,7 @@ protected ProtocolSchedule createProtocolSchedule() { isRevertReasonEnabled, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/besu/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java index 03cc044abbb..5ae6f898b50 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java @@ -336,7 +336,7 @@ protected ProtocolSchedule createProtocolSchedule() { evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java b/besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java index 3e75b99d3d7..a45729b2bb2 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java @@ -303,7 +303,7 @@ public void initMocks() throws Exception { when(mockControllerBuilder.cacheLastBlocks(any())).thenReturn(mockControllerBuilder); when(mockControllerBuilder.genesisStateHashCacheEnabled(any())) .thenReturn(mockControllerBuilder); - when(mockControllerBuilder.isParallelPreloadTxEnabled(false)).thenReturn(mockControllerBuilder); + when(mockControllerBuilder.isParallelTxEnabled(false)).thenReturn(mockControllerBuilder); // doReturn used because of generic BesuController doReturn(mockController).when(mockControllerBuilder).build(); diff --git a/consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueProtocolSchedule.java b/consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueProtocolSchedule.java index 80388281e45..afd1160ce58 100644 --- a/consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueProtocolSchedule.java +++ b/consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/CliqueProtocolSchedule.java @@ -75,7 +75,7 @@ public static ProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { final CliqueConfigOptions cliqueConfig = config.getCliqueConfigOptions(); @@ -112,7 +112,7 @@ public static ProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .createProtocolSchedule(); } @@ -137,7 +137,7 @@ public static ProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, forksSchedule, @@ -147,7 +147,7 @@ public static ProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } private static ProtocolSpecBuilder applyCliqueSpecificModifications( diff --git a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilder.java b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilder.java index 439e6c35bd2..807c6279dd6 100644 --- a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilder.java +++ b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilder.java @@ -69,7 +69,7 @@ public BftProtocolSchedule createProtocolSchedule( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { final Map> specMap = new HashMap<>(); forksSchedule @@ -92,7 +92,7 @@ public BftProtocolSchedule createProtocolSchedule( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .createProtocolSchedule(); return new BftProtocolSchedule((DefaultProtocolSchedule) protocolSchedule); } diff --git a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilderTest.java b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilderTest.java index 9b05bd7a365..9cc77f75dc9 100644 --- a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilderTest.java +++ b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/BaseBftProtocolScheduleBuilderTest.java @@ -245,7 +245,8 @@ protected BlockHeaderValidator.Builder createBlockHeaderRuleset( bftExtraDataCodec, EvmConfiguration.DEFAULT, MiningParameters.MINING_DISABLED, - new BadBlockManager()); + new BadBlockManager(), + false); } private BftConfigOptions createBftConfig(final BigInteger blockReward) { diff --git a/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/IbftProtocolScheduleBuilder.java b/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/IbftProtocolScheduleBuilder.java index 0412565188d..5edfe0f2642 100644 --- a/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/IbftProtocolScheduleBuilder.java +++ b/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/IbftProtocolScheduleBuilder.java @@ -57,7 +57,7 @@ public static BftProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return new IbftProtocolScheduleBuilder() .createProtocolSchedule( config, @@ -68,7 +68,7 @@ public static BftProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -89,7 +89,7 @@ public static BftProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, forksSchedule, @@ -99,7 +99,7 @@ public static BftProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/MergeProtocolSchedule.java b/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/MergeProtocolSchedule.java index a5f55b6f0b7..b45448a1721 100644 --- a/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/MergeProtocolSchedule.java +++ b/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/MergeProtocolSchedule.java @@ -56,14 +56,14 @@ public static ProtocolSchedule create( final boolean isRevertReasonEnabled, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, PrivacyParameters.DEFAULT, isRevertReasonEnabled, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -82,7 +82,7 @@ public static ProtocolSchedule create( final boolean isRevertReasonEnabled, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { Map> postMergeModifications = new HashMap<>(); @@ -102,7 +102,7 @@ public static ProtocolSchedule create( EvmConfiguration.DEFAULT, miningParameters, badBlockManager, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .createProtocolSchedule(); } diff --git a/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionProtocolSchedule.java b/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionProtocolSchedule.java index 43ebcfdd9db..080e98f4c12 100644 --- a/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionProtocolSchedule.java +++ b/consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionProtocolSchedule.java @@ -71,17 +71,13 @@ public static TransitionProtocolSchedule fromConfig( final GenesisConfigOptions genesisConfigOptions, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { ProtocolSchedule preMergeProtocolSchedule = MainnetProtocolSchedule.fromConfig( - genesisConfigOptions, miningParameters, badBlockManager, isParallelPreloadTxEnabled); + genesisConfigOptions, miningParameters, badBlockManager, isParallelTxEnabled); ProtocolSchedule postMergeProtocolSchedule = MergeProtocolSchedule.create( - genesisConfigOptions, - false, - miningParameters, - badBlockManager, - isParallelPreloadTxEnabled); + genesisConfigOptions, false, miningParameters, badBlockManager, isParallelTxEnabled); return new TransitionProtocolSchedule( preMergeProtocolSchedule, postMergeProtocolSchedule, PostMergeContext.get()); } diff --git a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftProtocolScheduleBuilder.java b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftProtocolScheduleBuilder.java index daab7da7d63..abf66f4f442 100644 --- a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftProtocolScheduleBuilder.java +++ b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftProtocolScheduleBuilder.java @@ -61,7 +61,7 @@ public static BftProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return new QbftProtocolScheduleBuilder() .createProtocolSchedule( config, @@ -72,7 +72,7 @@ public static BftProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -93,7 +93,7 @@ public static BftProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, qbftForksSchedule, @@ -103,7 +103,7 @@ public static BftProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -124,7 +124,7 @@ public static ProtocolSchedule create( final BftExtraDataCodec bftExtraDataCodec, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, qbftForksSchedule, @@ -134,7 +134,7 @@ public static ProtocolSchedule create( EvmConfiguration.DEFAULT, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } @Override diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/difficulty/fixed/FixedDifficultyProtocolSchedule.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/difficulty/fixed/FixedDifficultyProtocolSchedule.java index 3435985b351..9a95bb33b63 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/difficulty/fixed/FixedDifficultyProtocolSchedule.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/difficulty/fixed/FixedDifficultyProtocolSchedule.java @@ -33,7 +33,7 @@ public static ProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return new ProtocolScheduleBuilder( config, ProtocolSpecAdapters.create( @@ -45,7 +45,7 @@ public static ProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .createProtocolSchedule(); } @@ -55,7 +55,7 @@ public static ProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, PrivacyParameters.DEFAULT, @@ -63,7 +63,7 @@ public static ProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public static ProtocolSchedule create( @@ -71,7 +71,7 @@ public static ProtocolSchedule create( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return create( config, PrivacyParameters.DEFAULT, @@ -79,6 +79,6 @@ public static ProtocolSchedule create( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java index 2c05d46b4f8..e5d6cd18d0f 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java @@ -69,7 +69,7 @@ TransactionReceipt create( static final int MAX_GENERATION = 6; protected final MainnetTransactionProcessor transactionProcessor; - private final boolean isParallelPreloadTxEnabled; + private final boolean isParallelTxEnabled; protected final AbstractBlockProcessor.TransactionReceiptFactory transactionReceiptFactory; @@ -86,10 +86,10 @@ protected AbstractBlockProcessor( final Wei blockReward, final MiningBeneficiaryCalculator miningBeneficiaryCalculator, final boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, final ProtocolSchedule protocolSchedule) { this.transactionProcessor = transactionProcessor; - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + this.isParallelTxEnabled = isParallelTxEnabled; this.transactionReceiptFactory = transactionReceiptFactory; this.blockReward = blockReward; this.miningBeneficiaryCalculator = miningBeneficiaryCalculator; @@ -130,17 +130,17 @@ public BlockProcessingResult processBlock( calculateExcessBlobGasForParent(protocolSpec, parentHeader))) .orElse(Wei.ZERO); - Optional preloadConcurrentTransactionProcessor = - Optional.empty(); - if (isParallelPreloadTxEnabled) { + Optional + parallelizedConcurrentTransactionProcessor = Optional.empty(); + if (isParallelTxEnabled) { if ((worldState instanceof DiffBasedWorldState)) { - preloadConcurrentTransactionProcessor = + parallelizedConcurrentTransactionProcessor = Optional.of(new ParallelizedConcurrentTransactionProcessor(transactionProcessor)); - // runAsyncPreloadBlock, if activated, facilitates the non-blocking parallel execution of + // runAsyncBlock, if activated, facilitates the non-blocking parallel execution of // transactions in the background through an optimistic strategy. - preloadConcurrentTransactionProcessor + parallelizedConcurrentTransactionProcessor .get() - .runAsyncPreloadBlock( + .runAsyncBlock( worldState, blockHeader, transactions, @@ -160,13 +160,14 @@ public BlockProcessingResult processBlock( TransactionProcessingResult transactionProcessingResult = null; - if (isParallelPreloadTxEnabled && preloadConcurrentTransactionProcessor.isPresent()) { - // applyPreloadBlockResult, if activated, fetch the results of transactions processed by + if (isParallelTxEnabled && parallelizedConcurrentTransactionProcessor.isPresent()) { + // applyParallelizedTransactionResult, if activated, fetch the results of transactions + // processed by // background threads. transactionProcessingResult = - preloadConcurrentTransactionProcessor + parallelizedConcurrentTransactionProcessor .get() - .applyPreloadBlockResult(worldState, miningBeneficiary, transaction, i) + .applyParallelizedTransactionResult(worldState, miningBeneficiary, transaction, i) .orElse(null); } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicBlockProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicBlockProcessor.java index 1a0c6315079..c14877e20ac 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicBlockProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicBlockProcessor.java @@ -41,7 +41,7 @@ public ClassicBlockProcessor( final Wei blockReward, final MiningBeneficiaryCalculator miningBeneficiaryCalculator, final boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, final OptionalLong eraLen, final ProtocolSchedule protocolSchedule) { super( @@ -50,7 +50,7 @@ public ClassicBlockProcessor( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - isParallelPreloadTxEnabled, + isParallelTxEnabled, protocolSchedule); eraLength = eraLen.orElse(DEFAULT_ERA_LENGTH); } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicProtocolSpecs.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicProtocolSpecs.java index 6b01c6e88b8..03092ab7fee 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicProtocolSpecs.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ClassicProtocolSpecs.java @@ -54,8 +54,8 @@ private ClassicProtocolSpecs() { } public static ProtocolSpecBuilder classicRecoveryInitDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { - return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { + return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelTxEnabled) .blockHeaderValidatorBuilder( feeMarket -> MainnetBlockHeaderValidator.createClassicValidator()) .name("ClassicRecoveryInit"); @@ -64,8 +64,8 @@ public static ProtocolSpecBuilder classicRecoveryInitDefinition( public static ProtocolSpecBuilder tangerineWhistleDefinition( final Optional chainId, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelTxEnabled) .isReplayProtectionSupported(true) .gasCalculator(TangerineWhistleGasCalculator::new) .transactionValidatorFactoryBuilder( @@ -78,8 +78,8 @@ public static ProtocolSpecBuilder tangerineWhistleDefinition( public static ProtocolSpecBuilder dieHardDefinition( final Optional chainId, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return tangerineWhistleDefinition(chainId, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return tangerineWhistleDefinition(chainId, evmConfiguration, isParallelTxEnabled) .gasCalculator(DieHardGasCalculator::new) .difficultyCalculator(ClassicDifficultyCalculators.DIFFICULTY_BOMB_PAUSED) .name("DieHard"); @@ -89,8 +89,8 @@ public static ProtocolSpecBuilder gothamDefinition( final Optional chainId, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return dieHardDefinition(chainId, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return dieHardDefinition(chainId, evmConfiguration, isParallelTxEnabled) .blockReward(MAX_BLOCK_REWARD) .difficultyCalculator(ClassicDifficultyCalculators.DIFFICULTY_BOMB_DELAYED) .blockProcessorBuilder( @@ -99,7 +99,7 @@ public static ProtocolSpecBuilder gothamDefinition( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - parallelPreloadTxEnabled, + parallelTxEnabled, protocolSchedule) -> new ClassicBlockProcessor( transactionProcessor, @@ -107,7 +107,7 @@ public static ProtocolSpecBuilder gothamDefinition( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - parallelPreloadTxEnabled, + parallelTxEnabled, ecip1017EraRounds, protocolSchedule)) .name("Gotham"); @@ -117,9 +117,8 @@ public static ProtocolSpecBuilder defuseDifficultyBombDefinition( final Optional chainId, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return gothamDefinition( - chainId, ecip1017EraRounds, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return gothamDefinition(chainId, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .difficultyCalculator(ClassicDifficultyCalculators.DIFFICULTY_BOMB_REMOVED) .transactionValidatorFactoryBuilder( (evm, gasLimitCalculator, feeMarket) -> @@ -133,9 +132,8 @@ public static ProtocolSpecBuilder atlantisDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return gothamDefinition( - chainId, ecip1017EraRounds, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return gothamDefinition(chainId, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .evmBuilder(MainnetEVMs::byzantium) .evmConfiguration(evmConfiguration) .gasCalculator(SpuriousDragonGasCalculator::new) @@ -175,13 +173,9 @@ public static ProtocolSpecBuilder aghartaDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return atlantisDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .evmBuilder(MainnetEVMs::constantinople) .gasCalculator(PetersburgGasCalculator::new) .evmBuilder(MainnetEVMs::constantinople) @@ -194,13 +188,9 @@ public static ProtocolSpecBuilder phoenixDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return aghartaDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .gasCalculator(IstanbulGasCalculator::new) .evmBuilder( (gasCalculator, evmConfig) -> @@ -215,13 +205,9 @@ public static ProtocolSpecBuilder thanosDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return phoenixDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .blockHeaderValidatorBuilder( feeMarket -> MainnetBlockHeaderValidator.createPgaBlockHeaderValidator( @@ -258,13 +244,9 @@ public static ProtocolSpecBuilder magnetoDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return thanosDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .gasCalculator(BerlinGasCalculator::new) .transactionValidatorFactoryBuilder( (evm, gasLimitCalculator, feeMarket) -> @@ -286,13 +268,9 @@ public static ProtocolSpecBuilder mystiqueDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return magnetoDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) .gasCalculator(LondonGasCalculator::new) .contractCreationProcessorBuilder( evm -> @@ -306,13 +284,9 @@ public static ProtocolSpecBuilder spiralDefinition( final boolean enableRevertReason, final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return mystiqueDefinition( - chainId, - enableRevertReason, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled) + chainId, enableRevertReason, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled) // EIP-3860 .gasCalculator(ShanghaiGasCalculator::new) // EIP-3855 diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetBlockProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetBlockProcessor.java index dfbbe2bc28b..603ca089b08 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetBlockProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetBlockProcessor.java @@ -36,7 +36,7 @@ public MainnetBlockProcessor( final Wei blockReward, final MiningBeneficiaryCalculator miningBeneficiaryCalculator, final boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, final ProtocolSchedule protocolSchedule) { super( transactionProcessor, @@ -44,7 +44,7 @@ public MainnetBlockProcessor( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - isParallelPreloadTxEnabled, + isParallelTxEnabled, protocolSchedule); } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSchedule.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSchedule.java index e09efd886bd..2cffc6de311 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSchedule.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSchedule.java @@ -49,7 +49,7 @@ public static ProtocolSchedule fromConfig( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { if (FixedDifficultyCalculators.isFixedDifficultyInConfig(config)) { return FixedDifficultyProtocolSchedule.create( config, @@ -58,7 +58,7 @@ public static ProtocolSchedule fromConfig( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } return new ProtocolScheduleBuilder( config, @@ -69,7 +69,7 @@ public static ProtocolSchedule fromConfig( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .createProtocolSchedule(); } @@ -90,7 +90,7 @@ public static ProtocolSchedule fromConfig( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return fromConfig( config, PrivacyParameters.DEFAULT, @@ -98,7 +98,7 @@ public static ProtocolSchedule fromConfig( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -116,7 +116,7 @@ public static ProtocolSchedule fromConfig( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return fromConfig( config, PrivacyParameters.DEFAULT, @@ -124,7 +124,7 @@ public static ProtocolSchedule fromConfig( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -140,7 +140,7 @@ public static ProtocolSchedule fromConfig( final GenesisConfigOptions config, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return fromConfig( config, PrivacyParameters.DEFAULT, @@ -148,6 +148,6 @@ public static ProtocolSchedule fromConfig( EvmConfiguration.DEFAULT, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecFactory.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecFactory.java index 3743a360431..d86fcbee921 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecFactory.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecFactory.java @@ -30,7 +30,7 @@ public class MainnetProtocolSpecFactory { private final EvmConfiguration evmConfiguration; private final MiningParameters miningParameters; - private final boolean isParallelPreloadTxEnabled; + private final boolean isParallelTxEnabled; public MainnetProtocolSpecFactory( final Optional chainId, @@ -38,71 +38,69 @@ public MainnetProtocolSpecFactory( final OptionalLong ecip1017EraRounds, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { this.chainId = chainId; this.isRevertReasonEnabled = isRevertReasonEnabled; this.ecip1017EraRounds = ecip1017EraRounds; this.evmConfiguration = evmConfiguration; this.miningParameters = miningParameters; - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + this.isParallelTxEnabled = isParallelTxEnabled; } public ProtocolSpecBuilder frontierDefinition() { - return MainnetProtocolSpecs.frontierDefinition(evmConfiguration, isParallelPreloadTxEnabled); + return MainnetProtocolSpecs.frontierDefinition(evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder homesteadDefinition() { - return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelPreloadTxEnabled); + return MainnetProtocolSpecs.homesteadDefinition(evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder daoRecoveryInitDefinition() { - return MainnetProtocolSpecs.daoRecoveryInitDefinition( - evmConfiguration, isParallelPreloadTxEnabled); + return MainnetProtocolSpecs.daoRecoveryInitDefinition(evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder daoRecoveryTransitionDefinition() { return MainnetProtocolSpecs.daoRecoveryTransitionDefinition( - evmConfiguration, isParallelPreloadTxEnabled); + evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder tangerineWhistleDefinition() { - return MainnetProtocolSpecs.tangerineWhistleDefinition( - evmConfiguration, isParallelPreloadTxEnabled); + return MainnetProtocolSpecs.tangerineWhistleDefinition(evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder spuriousDragonDefinition() { return MainnetProtocolSpecs.spuriousDragonDefinition( - chainId, evmConfiguration, isParallelPreloadTxEnabled); + chainId, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder byzantiumDefinition() { return MainnetProtocolSpecs.byzantiumDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder constantinopleDefinition() { return MainnetProtocolSpecs.constantinopleDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder petersburgDefinition() { return MainnetProtocolSpecs.petersburgDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder istanbulDefinition() { return MainnetProtocolSpecs.istanbulDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder muirGlacierDefinition() { return MainnetProtocolSpecs.muirGlacierDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder berlinDefinition() { return MainnetProtocolSpecs.berlinDefinition( - chainId, isRevertReasonEnabled, evmConfiguration, isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder londonDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -112,7 +110,7 @@ public ProtocolSpecBuilder londonDefinition(final GenesisConfigOptions genesisCo genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder arrowGlacierDefinition( @@ -123,7 +121,7 @@ public ProtocolSpecBuilder arrowGlacierDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder grayGlacierDefinition( @@ -134,7 +132,7 @@ public ProtocolSpecBuilder grayGlacierDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder parisDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -144,7 +142,7 @@ public ProtocolSpecBuilder parisDefinition(final GenesisConfigOptions genesisCon genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder shanghaiDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -154,7 +152,7 @@ public ProtocolSpecBuilder shanghaiDefinition(final GenesisConfigOptions genesis genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder cancunDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -164,7 +162,7 @@ public ProtocolSpecBuilder cancunDefinition(final GenesisConfigOptions genesisCo genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder cancunEOFDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -174,7 +172,7 @@ public ProtocolSpecBuilder cancunEOFDefinition(final GenesisConfigOptions genesi genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder pragueDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -184,7 +182,7 @@ public ProtocolSpecBuilder pragueDefinition(final GenesisConfigOptions genesisCo genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolSpecBuilder pragueEOFDefinition(final GenesisConfigOptions genesisConfigOptions) { @@ -194,7 +192,7 @@ public ProtocolSpecBuilder pragueEOFDefinition(final GenesisConfigOptions genesi genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -215,7 +213,7 @@ public ProtocolSpecBuilder futureEipsDefinition(final GenesisConfigOptions genes genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } /** @@ -236,87 +234,58 @@ public ProtocolSpecBuilder experimentalEipsDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } //////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// // Classic Protocol Specs public ProtocolSpecBuilder dieHardDefinition() { - return ClassicProtocolSpecs.dieHardDefinition( - chainId, evmConfiguration, isParallelPreloadTxEnabled); + return ClassicProtocolSpecs.dieHardDefinition(chainId, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder gothamDefinition() { return ClassicProtocolSpecs.gothamDefinition( - chainId, ecip1017EraRounds, evmConfiguration, isParallelPreloadTxEnabled); + chainId, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder defuseDifficultyBombDefinition() { return ClassicProtocolSpecs.defuseDifficultyBombDefinition( - chainId, ecip1017EraRounds, evmConfiguration, isParallelPreloadTxEnabled); + chainId, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder atlantisDefinition() { return ClassicProtocolSpecs.atlantisDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder aghartaDefinition() { return ClassicProtocolSpecs.aghartaDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder phoenixDefinition() { return ClassicProtocolSpecs.phoenixDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder thanosDefinition() { return ClassicProtocolSpecs.thanosDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder magnetoDefinition() { return ClassicProtocolSpecs.magnetoDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder mystiqueDefinition() { return ClassicProtocolSpecs.mystiqueDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } public ProtocolSpecBuilder spiralDefinition() { return ClassicProtocolSpecs.spiralDefinition( - chainId, - isRevertReasonEnabled, - ecip1017EraRounds, - evmConfiguration, - isParallelPreloadTxEnabled); + chainId, isRevertReasonEnabled, ecip1017EraRounds, evmConfiguration, isParallelTxEnabled); } } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java index b6564bb631f..f44ef21a7fe 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java @@ -102,7 +102,7 @@ public abstract class MainnetProtocolSpecs { private MainnetProtocolSpecs() {} public static ProtocolSpecBuilder frontierDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { return new ProtocolSpecBuilder() .gasCalculator(FrontierGasCalculator::new) .gasLimitCalculatorBuilder(feeMarket -> new FrontierTargetingGasLimitCalculator()) @@ -153,7 +153,7 @@ public static ProtocolSpecBuilder frontierDefinition( .transactionReceiptFactory(MainnetProtocolSpecs::frontierTransactionReceiptFactory) .blockReward(FRONTIER_BLOCK_REWARD) .skipZeroBlockRewards(false) - .isParallelPreloadTxEnabled(isParallelPreloadTxEnabled) + .isParallelTxEnabled(isParallelTxEnabled) .blockProcessorBuilder(MainnetBlockProcessor::new) .blockValidatorBuilder(MainnetProtocolSpecs.blockValidatorBuilder()) .blockImporterBuilder(MainnetBlockImporter::new) @@ -176,8 +176,8 @@ public static BlockValidatorBuilder blockValidatorBuilder() { } public static ProtocolSpecBuilder homesteadDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { - return frontierDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { + return frontierDefinition(evmConfiguration, isParallelTxEnabled) .gasCalculator(HomesteadGasCalculator::new) .evmBuilder(MainnetEVMs::homestead) .contractCreationProcessorBuilder( @@ -193,8 +193,8 @@ public static ProtocolSpecBuilder homesteadDefinition( } public static ProtocolSpecBuilder daoRecoveryInitDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { - return homesteadDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { + return homesteadDefinition(evmConfiguration, isParallelTxEnabled) .blockHeaderValidatorBuilder(feeMarket -> MainnetBlockHeaderValidator.createDaoValidator()) .blockProcessorBuilder( (transactionProcessor, @@ -202,7 +202,7 @@ public static ProtocolSpecBuilder daoRecoveryInitDefinition( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - parallelPreloadTxEnabled, + parallelTxEnabled, protocolSchedule) -> new DaoBlockProcessor( new MainnetBlockProcessor( @@ -211,21 +211,21 @@ public static ProtocolSpecBuilder daoRecoveryInitDefinition( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - parallelPreloadTxEnabled, + parallelTxEnabled, protocolSchedule))) .name("DaoRecoveryInit"); } public static ProtocolSpecBuilder daoRecoveryTransitionDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { - return daoRecoveryInitDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { + return daoRecoveryInitDefinition(evmConfiguration, isParallelTxEnabled) .blockProcessorBuilder(MainnetBlockProcessor::new) .name("DaoRecoveryTransition"); } public static ProtocolSpecBuilder tangerineWhistleDefinition( - final EvmConfiguration evmConfiguration, final boolean isParallelPreloadTxEnabled) { - return homesteadDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final EvmConfiguration evmConfiguration, final boolean isParallelTxEnabled) { + return homesteadDefinition(evmConfiguration, isParallelTxEnabled) .gasCalculator(TangerineWhistleGasCalculator::new) .name("TangerineWhistle"); } @@ -233,8 +233,8 @@ public static ProtocolSpecBuilder tangerineWhistleDefinition( public static ProtocolSpecBuilder spuriousDragonDefinition( final Optional chainId, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return tangerineWhistleDefinition(evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return tangerineWhistleDefinition(evmConfiguration, isParallelTxEnabled) .isReplayProtectionSupported(true) .gasCalculator(SpuriousDragonGasCalculator::new) .skipZeroBlockRewards(true) @@ -279,8 +279,8 @@ public static ProtocolSpecBuilder byzantiumDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return spuriousDragonDefinition(chainId, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return spuriousDragonDefinition(chainId, evmConfiguration, isParallelTxEnabled) .gasCalculator(ByzantiumGasCalculator::new) .evmBuilder(MainnetEVMs::byzantium) .precompileContractRegistryBuilder(MainnetPrecompiledContractRegistries::byzantium) @@ -310,9 +310,8 @@ public static ProtocolSpecBuilder constantinopleDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return byzantiumDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return byzantiumDefinition(chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .difficultyCalculator(MainnetDifficultyCalculators.CONSTANTINOPLE) .gasCalculator(ConstantinopleGasCalculator::new) .evmBuilder(MainnetEVMs::constantinople) @@ -324,9 +323,9 @@ public static ProtocolSpecBuilder petersburgDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return constantinopleDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .gasCalculator(PetersburgGasCalculator::new) .name("Petersburg"); } @@ -335,9 +334,8 @@ public static ProtocolSpecBuilder istanbulDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return petersburgDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return petersburgDefinition(chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .gasCalculator(IstanbulGasCalculator::new) .evmBuilder( (gasCalculator, jdCacheConfig) -> @@ -359,9 +357,8 @@ static ProtocolSpecBuilder muirGlacierDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return istanbulDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return istanbulDefinition(chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .difficultyCalculator(MainnetDifficultyCalculators.MUIR_GLACIER) .name("MuirGlacier"); } @@ -370,9 +367,8 @@ static ProtocolSpecBuilder berlinDefinition( final Optional chainId, final boolean enableRevertReason, final EvmConfiguration evmConfiguration, - final boolean isParallelPreloadTxEnabled) { - return muirGlacierDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + final boolean isParallelTxEnabled) { + return muirGlacierDefinition(chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .gasCalculator(BerlinGasCalculator::new) .transactionValidatorFactoryBuilder( (evm, gasLimitCalculator, feeMarket) -> @@ -395,7 +391,7 @@ static ProtocolSpecBuilder londonDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { final long londonForkBlockNumber = genesisConfigOptions.getLondonBlockNumber().orElse(Long.MAX_VALUE); final BaseFeeMarket londonFeeMarket; @@ -409,8 +405,7 @@ static ProtocolSpecBuilder londonDefinition( londonFeeMarket = FeeMarket.london(londonForkBlockNumber, genesisConfigOptions.getBaseFeePerGas()); } - return berlinDefinition( - chainId, enableRevertReason, evmConfiguration, isParallelPreloadTxEnabled) + return berlinDefinition(chainId, enableRevertReason, evmConfiguration, isParallelTxEnabled) .feeMarket(londonFeeMarket) .gasCalculator(LondonGasCalculator::new) .gasLimitCalculatorBuilder( @@ -476,14 +471,14 @@ static ProtocolSpecBuilder arrowGlacierDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return londonDefinition( chainId, enableRevertReason, genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .difficultyCalculator(MainnetDifficultyCalculators.ARROW_GLACIER) .name("ArrowGlacier"); } @@ -494,14 +489,14 @@ static ProtocolSpecBuilder grayGlacierDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return arrowGlacierDefinition( chainId, enableRevertReason, genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .difficultyCalculator(MainnetDifficultyCalculators.GRAY_GLACIER) .name("GrayGlacier"); } @@ -512,7 +507,7 @@ static ProtocolSpecBuilder parisDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return grayGlacierDefinition( chainId, @@ -520,7 +515,7 @@ static ProtocolSpecBuilder parisDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .evmBuilder( (gasCalculator, jdCacheConfig) -> MainnetEVMs.paris(gasCalculator, chainId.orElse(BigInteger.ZERO), evmConfiguration)) @@ -538,14 +533,14 @@ static ProtocolSpecBuilder shanghaiDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return parisDefinition( chainId, enableRevertReason, genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) // gas calculator has new code to support EIP-3860 limit and meter initcode .gasCalculator(ShanghaiGasCalculator::new) // EVM has a new operation for EIP-3855 PUSH0 instruction @@ -595,7 +590,7 @@ static ProtocolSpecBuilder cancunDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { final long londonForkBlockNumber = genesisConfigOptions.getLondonBlockNumber().orElse(0L); final BaseFeeMarket cancunFeeMarket; if (genesisConfigOptions.isZeroBaseFee()) { @@ -615,7 +610,7 @@ static ProtocolSpecBuilder cancunDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .feeMarket(cancunFeeMarket) // gas calculator for EIP-4844 blob gas .gasCalculator(CancunGasCalculator::new) @@ -673,7 +668,7 @@ static ProtocolSpecBuilder cancunEOFDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { ProtocolSpecBuilder protocolSpecBuilder = cancunDefinition( @@ -682,7 +677,7 @@ static ProtocolSpecBuilder cancunEOFDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); return addEOF(chainId, evmConfiguration, protocolSpecBuilder).name("CancunEOF"); } @@ -692,7 +687,7 @@ static ProtocolSpecBuilder pragueDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { final Address depositContractAddress = genesisConfigOptions.getDepositContractAddress().orElse(DEFAULT_DEPOSIT_CONTRACT_ADDRESS); @@ -703,7 +698,7 @@ static ProtocolSpecBuilder pragueDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) // EIP-3074 AUTH and AUTCALL gas .gasCalculator(PragueGasCalculator::new) // EIP-3074 AUTH and AUTCALL @@ -731,7 +726,7 @@ static ProtocolSpecBuilder pragueEOFDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { ProtocolSpecBuilder protocolSpecBuilder = pragueDefinition( @@ -740,7 +735,7 @@ static ProtocolSpecBuilder pragueEOFDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); return addEOF(chainId, evmConfiguration, protocolSpecBuilder).name("PragueEOF"); } @@ -773,14 +768,14 @@ static ProtocolSpecBuilder futureEipsDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return pragueEOFDefinition( chainId, enableRevertReason, genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) // Use Future EIP configured EVM .evmBuilder( (gasCalculator, jdCacheConfig) -> @@ -806,7 +801,7 @@ static ProtocolSpecBuilder experimentalEipsDefinition( final GenesisConfigOptions genesisConfigOptions, final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { return futureEipsDefinition( chainId, @@ -814,7 +809,7 @@ static ProtocolSpecBuilder experimentalEipsDefinition( genesisConfigOptions, evmConfiguration, miningParameters, - isParallelPreloadTxEnabled) + isParallelTxEnabled) .evmBuilder( (gasCalculator, jdCacheConfig) -> MainnetEVMs.experimentalEips( diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java index 7c5ca82b89c..6147cf332af 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java @@ -46,7 +46,7 @@ public class ProtocolScheduleBuilder { private final MiningParameters miningParameters; private final BadBlockManager badBlockManager; - private final boolean isParallelPreloadTxEnabled; + private final boolean isParallelTxEnabled; public ProtocolScheduleBuilder( final GenesisConfigOptions config, @@ -57,7 +57,7 @@ public ProtocolScheduleBuilder( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { this( config, Optional.of(defaultChainId), @@ -67,7 +67,7 @@ public ProtocolScheduleBuilder( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } public ProtocolScheduleBuilder( @@ -78,7 +78,7 @@ public ProtocolScheduleBuilder( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { this( config, Optional.empty(), @@ -88,7 +88,7 @@ public ProtocolScheduleBuilder( evmConfiguration, miningParameters, badBlockManager, - isParallelPreloadTxEnabled); + isParallelTxEnabled); } private ProtocolScheduleBuilder( @@ -100,7 +100,7 @@ private ProtocolScheduleBuilder( final EvmConfiguration evmConfiguration, final MiningParameters miningParameters, final BadBlockManager badBlockManager, - final boolean isParallelPreloadTxEnabled) { + final boolean isParallelTxEnabled) { this.config = config; this.protocolSpecAdapters = protocolSpecAdapters; this.privacyParameters = privacyParameters; @@ -109,7 +109,7 @@ private ProtocolScheduleBuilder( this.defaultChainId = defaultChainId; this.miningParameters = miningParameters; this.badBlockManager = badBlockManager; - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + this.isParallelTxEnabled = isParallelTxEnabled; } public ProtocolSchedule createProtocolSchedule() { @@ -130,7 +130,7 @@ private void initSchedule( evmConfiguration.overrides( config.getContractSizeLimit(), OptionalInt.empty(), config.getEvmStackSize()), miningParameters, - isParallelPreloadTxEnabled); + isParallelTxEnabled); validateForkOrdering(); @@ -213,7 +213,7 @@ private void initSchedule( BuilderMapEntry.MilestoneType.BLOCK_NUMBER, classicBlockNumber, ClassicProtocolSpecs.classicRecoveryInitDefinition( - evmConfiguration, isParallelPreloadTxEnabled), + evmConfiguration, isParallelTxEnabled), Function.identity()); protocolSchedule.putBlockNumberMilestone( classicBlockNumber + 1, originalProtocolSpec); diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpec.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpec.java index 0e7d9004819..9f41fc96491 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpec.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpec.java @@ -70,7 +70,7 @@ public class ProtocolSpec { private final boolean skipZeroBlockRewards; - private final boolean isParallelPreloadTxEnabled; + private final boolean isParallelTxEnabled; private final PrivateTransactionProcessor privateTransactionProcessor; @@ -107,7 +107,7 @@ public class ProtocolSpec { * @param miningBeneficiaryCalculator determines to whom mining proceeds are paid * @param precompileContractRegistry all the pre-compiled contracts added * @param skipZeroBlockRewards should rewards be skipped if it is zero - * @param isParallelPreloadTxEnabled indicates whether parallel transaction preloading is enabled. + * @param isParallelTxEnabled indicates whether parallel transaction is enabled. * @param gasCalculator the gas calculator to use. * @param gasLimitCalculator the gas limit calculator to use. * @param feeMarket an {@link Optional} wrapping {@link FeeMarket} class if appropriate. @@ -139,7 +139,7 @@ public ProtocolSpec( final MiningBeneficiaryCalculator miningBeneficiaryCalculator, final PrecompileContractRegistry precompileContractRegistry, final boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, final GasCalculator gasCalculator, final GasLimitCalculator gasLimitCalculator, final FeeMarket feeMarket, @@ -169,7 +169,7 @@ public ProtocolSpec( this.miningBeneficiaryCalculator = miningBeneficiaryCalculator; this.precompileContractRegistry = precompileContractRegistry; this.skipZeroBlockRewards = skipZeroBlockRewards; - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + this.isParallelTxEnabled = isParallelTxEnabled; this.gasCalculator = gasCalculator; this.gasLimitCalculator = gasLimitCalculator; this.feeMarket = feeMarket; @@ -324,8 +324,8 @@ public boolean isSkipZeroBlockRewards() { return skipZeroBlockRewards; } - public boolean isParallelPreloadTxEnabled() { - return isParallelPreloadTxEnabled; + public boolean isParallelTxEnabled() { + return isParallelTxEnabled; } public MiningBeneficiaryCalculator getMiningBeneficiaryCalculator() { diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpecBuilder.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpecBuilder.java index 02e92dff06d..cb94ae53adc 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpecBuilder.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpecBuilder.java @@ -72,7 +72,7 @@ public class ProtocolSpecBuilder { private BlockValidatorBuilder blockValidatorBuilder; private BlockImporterBuilder blockImporterBuilder; - private boolean isParallelPreloadTxEnabled = false; + private boolean isParallelTxEnabled = false; private String name; private MiningBeneficiaryCalculator miningBeneficiaryCalculator; private PrivacyParameters privacyParameters; @@ -146,8 +146,8 @@ public ProtocolSpecBuilder blockHeaderValidatorBuilder( return this; } - public ProtocolSpecBuilder isParallelPreloadTxEnabled(final boolean isParallelPreloadTxEnabled) { - this.isParallelPreloadTxEnabled = isParallelPreloadTxEnabled; + public ProtocolSpecBuilder isParallelTxEnabled(final boolean isParallelTxEnabled) { + this.isParallelTxEnabled = isParallelTxEnabled; return this; } @@ -402,7 +402,7 @@ public ProtocolSpec build(final ProtocolSchedule protocolSchedule) { miningBeneficiaryCalculator, precompileContractRegistry, skipZeroBlockRewards, - isParallelPreloadTxEnabled, + isParallelTxEnabled, gasCalculator, gasLimitCalculator, feeMarket, @@ -460,7 +460,7 @@ private BlockProcessor createBlockProcessor( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - isParallelPreloadTxEnabled, + isParallelTxEnabled, protocolSchedule); } @@ -500,7 +500,7 @@ BlockProcessor apply( Wei blockReward, MiningBeneficiaryCalculator miningBeneficiaryCalculator, boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, ProtocolSchedule protocolSchedule); } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java index 73c512ff1fd..59163b77063 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java @@ -23,7 +23,7 @@ import org.hyperledger.besu.ethereum.mainnet.TransactionValidationParams; import org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater; import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult; -import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.cache.LazyBonsaiCachedMerkleTrieLoader; +import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.cache.NoopBonsaiCachedMerkleTrieLoader; import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.worldview.BonsaiWorldState; import org.hyperledger.besu.ethereum.trie.diffbased.common.worldview.DiffBasedWorldState; import org.hyperledger.besu.ethereum.trie.diffbased.common.worldview.accumulator.DiffBasedWorldStateUpdateAccumulator; @@ -47,7 +47,7 @@ * checks for potential conflicts among transactions to ensure data integrity before applying the * results to the world state. */ -@SuppressWarnings({"unchecked", "rawtypes", "unused"}) +@SuppressWarnings({"unchecked", "rawtypes"}) public class ParallelizedConcurrentTransactionProcessor { private static final int NCPU = Runtime.getRuntime().availableProcessors(); @@ -91,7 +91,7 @@ public ParallelizedConcurrentTransactionProcessor( * @param blobGasPrice Gas price for blob transactions. * @param privateMetadataUpdater Updater for private transaction metadata. */ - public void runAsyncPreloadBlock( + public void runAsyncBlock( final MutableWorldState worldState, final BlockHeader blockHeader, final List transactions, @@ -133,7 +133,7 @@ public void runTransaction( final Wei blobGasPrice, final PrivateMetadataUpdater privateMetadataUpdater) { final DiffBasedWorldState roundWorldState = - new BonsaiWorldState((BonsaiWorldState) worldState, new LazyBonsaiCachedMerkleTrieLoader()); + new BonsaiWorldState((BonsaiWorldState) worldState, new NoopBonsaiCachedMerkleTrieLoader()); final ParallelizedTransactionContext.Builder contextBuilder = new ParallelizedTransactionContext.Builder(); @@ -193,7 +193,8 @@ public void traceTransactionBeforeMiningReward( } /** - * Applies the results of preloaded transactions to the world state after checking for conflicts. + * Applies the results of parallelized transactions to the world state after checking for + * conflicts. * *

If a transaction was executed optimistically without any detected conflicts, its result is * directly applied to the world state. If there is a conflict, this method does not apply the @@ -210,7 +211,7 @@ public void traceTransactionBeforeMiningReward( * @return Optional containing the transaction processing result if applied, or empty if the * transaction needs to be replayed due to a conflict. */ - public Optional applyPreloadBlockResult( + public Optional applyParallelizedTransactionResult( final MutableWorldState worldState, final Address miningBeneficiary, final Transaction transaction, @@ -236,12 +237,12 @@ public Optional applyPreloadBlockResult( .getOrCreate(miningBeneficiary) .incrementBalance(parallelizedTransactionContext.miningBeneficiaryReward()); - blockAccumulator.cloneFromUpdaterWithPreloader(transactionAccumulator); + blockAccumulator.importStateChangesFromSource(transactionAccumulator); confirmedParallelizedTransaction++; return Optional.of(transactionProcessingResult); } else { - blockAccumulator.clonePriorFromUpdater(transactionAccumulator); + blockAccumulator.importPriorStateFromSource(transactionAccumulator); conflictingButCachedTransaction++; // If there is a conflict, we return an empty result to signal the block processor to // re-execute the transaction. diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/LazyBonsaiCachedMerkleTrieLoader.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/NoopBonsaiCachedMerkleTrieLoader.java similarity index 86% rename from ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/LazyBonsaiCachedMerkleTrieLoader.java rename to ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/NoopBonsaiCachedMerkleTrieLoader.java index 44a5f82bc54..8f58e697fee 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/LazyBonsaiCachedMerkleTrieLoader.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/bonsai/cache/NoopBonsaiCachedMerkleTrieLoader.java @@ -20,9 +20,9 @@ import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.storage.BonsaiWorldStateKeyValueStorage; import org.hyperledger.besu.metrics.noop.NoOpMetricsSystem; -public class LazyBonsaiCachedMerkleTrieLoader extends BonsaiCachedMerkleTrieLoader { +public class NoopBonsaiCachedMerkleTrieLoader extends BonsaiCachedMerkleTrieLoader { - public LazyBonsaiCachedMerkleTrieLoader() { + public NoopBonsaiCachedMerkleTrieLoader() { super(new NoOpMetricsSystem()); } @@ -30,11 +30,15 @@ public LazyBonsaiCachedMerkleTrieLoader() { public void preLoadAccount( final BonsaiWorldStateKeyValueStorage worldStateKeyValueStorage, final Hash worldStateRootHash, - final Address account) {} + final Address account) { + // noop + } @Override public void preLoadStorageSlot( final BonsaiWorldStateKeyValueStorage worldStateKeyValueStorage, final Address account, - final StorageSlotKey slotKey) {} + final StorageSlotKey slotKey) { + // noop + } } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/worldview/accumulator/DiffBasedWorldStateUpdateAccumulator.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/worldview/accumulator/DiffBasedWorldStateUpdateAccumulator.java index 0e5e2b4e2fe..c28bb731b5b 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/worldview/accumulator/DiffBasedWorldStateUpdateAccumulator.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/worldview/accumulator/DiffBasedWorldStateUpdateAccumulator.java @@ -100,8 +100,17 @@ public void cloneFromUpdater(final DiffBasedWorldStateUpdateAccumulator this.isAccumulatorStateChanged = true; } - @SuppressWarnings("UseBulkOperation") - public void cloneFromUpdaterWithPreloader( + /** + * Integrates prior state changes from an external source into the current state. This method + * retrieves state modifications from the specified source and adds them to the current state's + * list of modifications. It does not remove any existing elements in the current state's + * modification list. If a modification has been made in both the current state and the source, + * the modification from the source will be taken. This approach ensures that the source's state + * changes are prioritized and overrides any conflicting changes in the current state. + * + * @param source The source accumulator + */ + public void importStateChangesFromSource( final DiffBasedWorldStateUpdateAccumulator source) { source .getAccountsToUpdate() @@ -143,12 +152,24 @@ public void cloneFromUpdaterWithPreloader( uInt256DiffBasedValue.getPrior(), uInt256DiffBasedValue.getUpdated())); }); }); - source.storageToClear.forEach(storageToClear::add); + storageToClear.addAll(source.storageToClear); this.isAccumulatorStateChanged = true; } - public void clonePriorFromUpdater(final DiffBasedWorldStateUpdateAccumulator source) { + /** + * Imports unchanged state data from an external source into the current state. This method + * focuses on integrating state data from the specified source that has been read but not + * modified. + * + *

The method ensures that only new, unmodified data from the source is added to the current + * state. If a state data has already been read or modified in the current state, it will not be + * added again to avoid overwriting any existing modifications. + * + * @param source The source accumulator + */ + public void importPriorStateFromSource( + final DiffBasedWorldStateUpdateAccumulator source) { source .getAccountsToUpdate() diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/worldstate/DataStorageConfiguration.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/worldstate/DataStorageConfiguration.java index 05080de29ab..49657c6ec9e 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/worldstate/DataStorageConfiguration.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/worldstate/DataStorageConfiguration.java @@ -104,7 +104,7 @@ default boolean getBonsaiCodeStoredByCodeHashEnabled() { } @Value.Default - default boolean isParallelPreloadTxEnabled() { + default boolean isParallelTxEnabled() { return DEFAULT_PARALLEL_PRELOAD_TRX_ENABLED; } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessorTest.java index aa4a47857d9..f8ed0352e04 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessorTest.java @@ -142,7 +142,7 @@ protected TestBlockProcessor( final Wei blockReward, final MiningBeneficiaryCalculator miningBeneficiaryCalculator, final boolean skipZeroBlockRewards, - final boolean isParallelPreloadTxEnabled, + final boolean isParallelTxEnabled, final ProtocolSchedule protocolSchedule) { super( transactionProcessor, @@ -150,7 +150,7 @@ protected TestBlockProcessor( blockReward, miningBeneficiaryCalculator, skipZeroBlockRewards, - isParallelPreloadTxEnabled, + isParallelTxEnabled, protocolSchedule); } diff --git a/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java b/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java index 6377b1ae3ba..9ecc8526f66 100644 --- a/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java +++ b/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java @@ -59,64 +59,64 @@ public static Stream getTestParametersForConfig() throws IOException MainnetProtocolSchedule.fromConfig( GenesisConfigFile.mainnet() .getConfigOptions(postMergeOverrides), - EvmConfiguration.DEFAULT, MiningParameters.newDefault(), new BadBlockManager())), + EvmConfiguration.DEFAULT, MiningParameters.newDefault(), new BadBlockManager(), false)), Arguments.of( "/DifficultyTests/dfGrayGlacier/difficultyGrayGlacierForkBlock.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfGrayGlacier/difficultyGrayGlacierTimeDiff1.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfGrayGlacier/difficultyGrayGlacierTimeDiff2.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().grayGlacierBlock(15050000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfArrowGlacier/difficultyArrowGlacierForkBlock.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfArrowGlacier/difficultyArrowGlacierTimeDiff1.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfArrowGlacier/difficultyArrowGlacierTimeDiff2.json", MainnetProtocolSchedule.fromConfig( - new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager()) + new StubGenesisConfigOptions().arrowGlacierBlock(13773000), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfByzantium/difficultyByzantium.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().byzantiumBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().byzantiumBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfConstantinople/difficultyConstantinople.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().constantinopleBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().constantinopleBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfEIP2384/difficultyEIP2384.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfEIP2384/difficultyEIP2384_random.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfEIP2384/difficultyEIP2384_random_to20M.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().muirGlacierBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfFrontier/difficultyFrontier.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions(), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions(), MiningParameters.newDefault(), new BadBlockManager(), false) ), Arguments.of( "/DifficultyTests/dfHomestead/difficultyHomestead.json", - MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().homesteadBlock(0), MiningParameters.newDefault(), new BadBlockManager()) + MainnetProtocolSchedule.fromConfig(new StubGenesisConfigOptions().homesteadBlock(0), MiningParameters.newDefault(), new BadBlockManager(), false) )); } diff --git a/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/NoRewardProtocolScheduleWrapper.java b/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/NoRewardProtocolScheduleWrapper.java index 83bb8b6d894..760b7985245 100644 --- a/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/NoRewardProtocolScheduleWrapper.java +++ b/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/NoRewardProtocolScheduleWrapper.java @@ -55,7 +55,7 @@ public ProtocolSpec getByBlockHeader(final ProcessableBlockHeader blockHeader) { Wei.ZERO, original.getMiningBeneficiaryCalculator(), original.isSkipZeroBlockRewards(), - original.isParallelPreloadTxEnabled(), + original.isParallelTxEnabled(), delegate); final BlockValidator noRewardBlockValidator = new MainnetBlockValidator( @@ -83,7 +83,7 @@ public ProtocolSpec getByBlockHeader(final ProcessableBlockHeader blockHeader) { original.getMiningBeneficiaryCalculator(), original.getPrecompileContractRegistry(), original.isSkipZeroBlockRewards(), - original.isParallelPreloadTxEnabled(), + original.isParallelTxEnabled(), original.getGasCalculator(), original.getGasLimitCalculator(), original.getFeeMarket(),