Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d31d63f
Add validations of new experimental flag
gfukushima Nov 25, 2022
5e73c6b
Add check to call MergeController without the using the TransitionCon…
gfukushima Nov 25, 2022
1bf75c0
Add experimental flag
gfukushima Nov 25, 2022
70bd193
Add parser
gfukushima Nov 25, 2022
acca61e
Add isNearHeadCheckpointSync method to interface
gfukushima Nov 25, 2022
3eb7015
Add isNearHeadCheckpointSync implementations
gfukushima Nov 25, 2022
9b38c51
Add attribute for the new flag
gfukushima Nov 25, 2022
1ce3021
Pass value to MergeContext
gfukushima Nov 25, 2022
d6480d2
Add unit tests
gfukushima Nov 25, 2022
e8ecdd8
Add resource for unit test
gfukushima Nov 25, 2022
98d107a
Add check for optional
gfukushima Nov 25, 2022
038105e
Spotless apply
gfukushima Nov 25, 2022
c69f15c
Use Default
gfukushima Nov 25, 2022
fa2c745
Add new field to be ignored
gfukushima Nov 25, 2022
bafebeb
Fix params order
gfukushima Nov 25, 2022
8e57f86
Change validation order
gfukushima Nov 25, 2022
06350eb
Refactor validation
gfukushima Nov 25, 2022
8a650c3
Spotless
gfukushima Nov 25, 2022
3fff7f3
Add extra unit test
gfukushima Nov 25, 2022
4861991
Rename variable
gfukushima Nov 27, 2022
03a9ec6
Remove parser
gfukushima Nov 29, 2022
3190822
Remove parser
gfukushima Nov 29, 2022
b5e2994
Change validation to use total difficulty
gfukushima Nov 30, 2022
f69d296
Change validation to use total difficulty
gfukushima Nov 30, 2022
5847166
Add validation for checkpoint config
gfukushima Dec 1, 2022
ce85fac
Refactor code to reflect current state of the feature.
gfukushima Dec 8, 2022
defaae8
Add unit test
gfukushima Dec 8, 2022
7c37113
spotless
gfukushima Dec 8, 2022
a4d44e4
Fix logic for isSyncing method covering possible NPE
gfukushima Dec 9, 2022
ba516c4
Add cover for TTD = TD of the checkpoint block (merge at genesis)
gfukushima Dec 9, 2022
c74bb2b
Remove field from test
gfukushima Dec 9, 2022
00bc42b
Fix unit test
gfukushima Dec 9, 2022
69b4874
Add build method and set syncState
gfukushima Dec 13, 2022
be2eb22
Fix possible NUll Reference Exception and unit test to validate that
gfukushima Dec 13, 2022
607e62d
Add edge case for merge at genesis and unit tests
gfukushima Dec 13, 2022
6f2fef8
Merge main into branch
gfukushima Dec 13, 2022
943aa80
Pass syncMode to BesuController.Builder to allow checkpointsync PoS
gfukushima Dec 20, 2022
ed5f29f
Fix difficulty of invalid genesis
gfukushima Dec 20, 2022
4658d7e
Add static method
gfukushima Dec 20, 2022
81245bd
Pass syncMode to BesuController builder
gfukushima Dec 20, 2022
9c194fd
spotless
gfukushima Dec 20, 2022
6f8b6b7
Resolve conflicts
gfukushima Dec 20, 2022
858fdfc
spotless
gfukushima Dec 20, 2022
56cfd7b
spotless
gfukushima Dec 20, 2022
fdc0a47
spotless
gfukushima Dec 20, 2022
a25e93b
Move invalid configuration check to BesuCommand
gfukushima Dec 21, 2022
7178173
Set default sync mode for PrivacyTest
gfukushima Dec 21, 2022
d768c87
Rename method
gfukushima Dec 21, 2022
5926fe3
Rename method
gfukushima Dec 21, 2022
5986580
Merge branch 'main' into PoS-checkpoint-sync
gfukushima Dec 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import java.io.File;
import java.nio.file.Path;
import java.time.Clock;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -147,8 +148,12 @@ public void startNode(final BesuNode node) {
.setBootNodes(bootnodes);
node.getConfiguration().getGenesisConfig().ifPresent(networkConfigBuilder::setGenesisConfig);
final EthNetworkConfig ethNetworkConfig = networkConfigBuilder.build();
final SynchronizerConfiguration synchronizerConfiguration =
new SynchronizerConfiguration.Builder().build();
final BesuControllerBuilder builder =
new BesuController.Builder().fromEthNetworkConfig(ethNetworkConfig);
new BesuController.Builder()
.fromEthNetworkConfig(
ethNetworkConfig, Collections.emptyMap(), synchronizerConfiguration.getSyncMode());

final KeyValueStorageProvider storageProvider =
new KeyValueStorageProviderBuilder()
Expand Down
50 changes: 49 additions & 1 deletion besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import org.hyperledger.besu.cli.util.CommandLineUtils;
import org.hyperledger.besu.cli.util.ConfigOptionSearchAndRunHandler;
import org.hyperledger.besu.cli.util.VersionProvider;
import org.hyperledger.besu.config.CheckpointConfigOptions;
import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.config.GenesisConfigOptions;
import org.hyperledger.besu.config.GoQuorumOptions;
Expand Down Expand Up @@ -1780,6 +1781,7 @@ private void validateOptions() {
ensureValidPeerBoundParams();
validateRpcOptionsParams();
validateChainDataPruningParams();
validatePostMergeCheckpointBlockRequirements();
p2pTLSConfigOptions.checkP2PTLSOptionsDependencies(logger, commandLine);
pkiBlockCreationOptions.checkPkiBlockCreationOptionsDependencies(logger, commandLine);
}
Expand Down Expand Up @@ -2003,6 +2005,12 @@ private void issueOptionWarnings() {
!SyncMode.isFullSync(getDefaultSyncModeIfNotSet(syncMode)),
singletonList("--fast-sync-min-peers"));

CommandLineUtils.failIfOptionDoesntMeetRequirement(
commandLine,
"--Xcheckpoint-post-merge-enabled can only be used with X_CHECKPOINT sync-mode",
SyncMode.X_CHECKPOINT.equals(getDefaultSyncModeIfNotSet(syncMode)),
singletonList("--Xcheckpoint-post-merge-enabled"));

if (!securityModuleName.equals(DEFAULT_SECURITY_MODULE)
&& nodePrivateKeyFileOption.getNodePrivateKeyFile() != null) {
logger.warn(
Expand Down Expand Up @@ -2156,7 +2164,7 @@ public BesuController buildController() {
public BesuControllerBuilder getControllerBuilder() {
final KeyValueStorageProvider storageProvider = keyValueStorageProvider(keyValueStorageName);
return controllerBuilderFactory
.fromEthNetworkConfig(updateNetworkConfig(network), genesisConfigOverrides)
.fromEthNetworkConfig(updateNetworkConfig(network), genesisConfigOverrides, syncMode)
.synchronizerConfiguration(buildSyncConfig())
.ethProtocolConfiguration(unstableEthProtocolOptions.toDomainObject())
.dataDirectory(dataDir())
Expand Down Expand Up @@ -3344,6 +3352,46 @@ private void setMergeConfigOptions() {
.isPresent());
}

private void validatePostMergeCheckpointBlockRequirements() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why all of this check are not in the valid method of CheckpointConfigOptions ?

final GenesisConfigOptions genesisOptions =
Optional.ofNullable(genesisConfigOptions)
.orElseGet(
() ->
GenesisConfigFile.fromConfig(
genesisConfig(Optional.ofNullable(network).orElse(MAINNET)))
.getConfigOptions(genesisConfigOverrides));
final SynchronizerConfiguration synchronizerConfiguration =
unstableSynchronizerOptions.toDomainObject().build();
final Optional<UInt256> terminalTotalDifficulty = genesisOptions.getTerminalTotalDifficulty();
final CheckpointConfigOptions checkpointConfigOptions = genesisOptions.getCheckpointOptions();
if (synchronizerConfiguration.isCheckpointPostMergeEnabled()) {
if (!checkpointConfigOptions.isValid()) {
throw new InvalidConfigurationException(
"Near head checkpoint sync requires a checkpoint block configured in the genesis file");
}
terminalTotalDifficulty.ifPresentOrElse(
ttd -> {
if (UInt256.fromHexString(
genesisOptions.getCheckpointOptions().getTotalDifficulty().get())
.equals(UInt256.ZERO)
&& ttd.equals(UInt256.ZERO)) {
throw new InvalidConfigurationException(
"Post Merge checkpoint sync can't be used with TTD = 0 and checkpoint totalDifficulty = 0");
}
if (UInt256.fromHexString(
genesisOptions.getCheckpointOptions().getTotalDifficulty().get())
.lessOrEqualThan(ttd)) {
throw new InvalidConfigurationException(
"Near head checkpoint sync requires a block with total difficulty greater than the TTD");
}
},
() -> {
throw new InvalidConfigurationException(
"Near head checkpoint sync requires TTD in the genesis file");
});
}
}

private boolean isMergeEnabled() {
return MergeConfigOptions.isMergeEnabled();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
private static final String SNAP_TRIENODE_COUNT_PER_REQUEST_FLAG =
"--Xsnapsync-synchronizer-trienode-count-per-request";

private static final String CHECKPOINT_POST_MERGE_FLAG = "--Xcheckpoint-post-merge-enabled";

@CommandLine.Option(
names = BLOCK_PROPAGATION_RANGE_FLAG,
hidden = true,
Expand Down Expand Up @@ -272,6 +274,13 @@ public void parseBlockPropagationRange(final String arg) {
private int snapsyncTrieNodeCountPerRequest =
SnapSyncConfiguration.DEFAULT_TRIENODE_COUNT_PER_REQUEST;

@CommandLine.Option(
names = {CHECKPOINT_POST_MERGE_FLAG},
hidden = true,
description = "Enable the sync to start from a post-merge block.")
private Boolean checkpointPostMergeSyncEnabled =
SynchronizerConfiguration.DEFAULT_CHECKPOINT_POST_MERGE_ENABLED;

private SynchronizerOptions() {}

public static SynchronizerOptions create() {
Expand Down Expand Up @@ -308,6 +317,7 @@ public static SynchronizerOptions fromConfig(final SynchronizerConfiguration con
config.getSnapSyncConfiguration().getBytecodeCountPerRequest();
options.snapsyncTrieNodeCountPerRequest =
config.getSnapSyncConfiguration().getTrienodeCountPerRequest();
options.checkpointPostMergeSyncEnabled = config.isCheckpointPostMergeEnabled();
return options;
}

Expand Down Expand Up @@ -338,6 +348,7 @@ public SynchronizerConfiguration.Builder toDomainObject() {
.bytecodeCountPerRequest(snapsyncBytecodeCountPerRequest)
.trienodeCountPerRequest(snapsyncTrieNodeCountPerRequest)
.build());
builder.checkpointPostMergeEnabled(checkpointPostMergeSyncEnabled);

return builder;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*/
package org.hyperledger.besu.controller;

import static org.hyperledger.besu.ethereum.eth.sync.SyncMode.isCheckpointSync;

import org.hyperledger.besu.cli.config.EthNetworkConfig;
import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.config.GenesisConfigOptions;
Expand All @@ -28,6 +30,7 @@
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManager;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.state.SyncState;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPool;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
Expand All @@ -41,6 +44,7 @@
import java.util.List;
import java.util.Map;

import org.apache.tuweni.units.bigints.UInt256;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -171,24 +175,26 @@ public PluginServiceFactory getAdditionalPluginServices() {

public static class Builder {

public BesuControllerBuilder fromEthNetworkConfig(final EthNetworkConfig ethNetworkConfig) {
return fromEthNetworkConfig(ethNetworkConfig, Collections.emptyMap());
}

public BesuControllerBuilder fromEthNetworkConfig(
final EthNetworkConfig ethNetworkConfig, final Map<String, String> genesisConfigOverrides) {
final EthNetworkConfig ethNetworkConfig,
final Map<String, String> genesisConfigOverrides,
final SyncMode syncMode) {
return fromGenesisConfig(
GenesisConfigFile.fromConfig(ethNetworkConfig.getGenesisConfig()),
genesisConfigOverrides)
genesisConfigOverrides,
syncMode)
.networkId(ethNetworkConfig.getNetworkId());
}

public BesuControllerBuilder fromGenesisConfig(final GenesisConfigFile genesisConfig) {
return fromGenesisConfig(genesisConfig, Collections.emptyMap());
public BesuControllerBuilder fromGenesisConfig(
final GenesisConfigFile genesisConfig, final SyncMode syncMode) {
return fromGenesisConfig(genesisConfig, Collections.emptyMap(), syncMode);
}

BesuControllerBuilder fromGenesisConfig(
final GenesisConfigFile genesisConfig, final Map<String, String> genesisConfigOverrides) {
final GenesisConfigFile genesisConfig,
final Map<String, String> genesisConfigOverrides,
final SyncMode syncMode) {
final GenesisConfigOptions configOptions =
genesisConfig.getConfigOptions(genesisConfigOverrides);
final BesuControllerBuilder builder;
Expand All @@ -213,11 +219,17 @@ BesuControllerBuilder fromGenesisConfig(

// wrap with TransitionBesuControllerBuilder if we have a terminal total difficulty:
if (configOptions.getTerminalTotalDifficulty().isPresent()) {
// TODO this should be changed to vanilla MergeBesuControllerBuilder and the Transition*
// series of classes removed after we successfully transition to PoS
// https://github.com/hyperledger/besu/issues/2897
return new TransitionBesuControllerBuilder(builder, new MergeBesuControllerBuilder())
.genesisConfigFile(genesisConfig);
// Enable start with vanilla MergeBesuControllerBuilder for PoS checkpoint block
if (isCheckpointSync(syncMode) && isCheckpointPoSBlock(configOptions)) {
return new MergeBesuControllerBuilder().genesisConfigFile(genesisConfig);
} else {
// TODO this should be changed to vanilla MergeBesuControllerBuilder and the Transition*
// series of classes removed after we successfully transition to PoS
// https://github.com/hyperledger/besu/issues/2897
return new TransitionBesuControllerBuilder(builder, new MergeBesuControllerBuilder())
.genesisConfigFile(genesisConfig);
}

} else return builder.genesisConfigFile(genesisConfig);
}

Expand Down Expand Up @@ -258,5 +270,13 @@ private Long readQbftStartBlockConfig(final QbftConfigOptions qbftConfigOptions)

return startBlock;
}

private boolean isCheckpointPoSBlock(final GenesisConfigOptions configOptions) {
final UInt256 terminalTotalDifficulty = configOptions.getTerminalTotalDifficulty().get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we cannot have empty here ?


return configOptions.getCheckpointOptions().isValid()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& (UInt256.fromHexString(configOptions.getCheckpointOptions().getTotalDifficulty().get())
.greaterThan(terminalTotalDifficulty));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ protected MergeContext createConsensusContext(
.get()
.getTerminalTotalDifficulty()
.map(Difficulty::of)
.orElse(Difficulty.ZERO));
.orElse(Difficulty.ZERO))
.setCheckpointPostMergeSync(syncConfig.isCheckpointPostMergeEnabled());

blockchain
.getFinalized()
Expand Down Expand Up @@ -235,6 +236,13 @@ protected List<PeerValidator> createPeerValidators(final ProtocolSchedule protoc
return retval;
}

@Override
public BesuController build() {
final BesuController controller = super.build();
PostMergeContext.get().setSyncState(controller.getSyncState());
return controller;
}

public TimestampSchedule createTimestampProtocolSchedule() {
return MergeProtocolSchedule.createTimestamp(
configOptionsSupplier.get(), privacyParameters, isRevertReasonEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
import org.hyperledger.besu.ethereum.mainnet.HeaderValidationMode;
Expand Down Expand Up @@ -188,7 +189,7 @@ public void setUp() throws IOException {

besuController =
new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.development())
.fromGenesisConfig(GenesisConfigFile.development(), SyncMode.FULL)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down
3 changes: 2 additions & 1 deletion besu/src/test/java/org/hyperledger/besu/PrivacyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
import org.hyperledger.besu.ethereum.privacy.storage.PrivacyStorageProvider;
Expand Down Expand Up @@ -107,7 +108,7 @@ private BesuController setUpControllerWithPrivacyEnabled(final boolean flexibleE
.setFlexiblePrivacyGroupsEnabled(flexibleEnabled)
.build();
return new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.mainnet())
.fromGenesisConfig(GenesisConfigFile.mainnet(), SyncMode.FULL)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
Expand Down Expand Up @@ -83,7 +84,7 @@ private static Blockchain importBlocks(final BesuController controller, final Pa
private static BesuController createController() throws IOException {
final Path dataDir = folder.newFolder().toPath();
return new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.mainnet())
.fromGenesisConfig(GenesisConfigFile.mainnet(), SyncMode.FAST)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
import org.hyperledger.besu.evm.internal.EvmConfiguration;
Expand Down Expand Up @@ -413,7 +414,7 @@ protected BesuController createController(final GenesisConfigFile genesisConfigF
throws IOException {
final Path dataDir = folder.newFolder().toPath();
return new BesuController.Builder()
.fromGenesisConfig(genesisConfigFile)
.fromGenesisConfig(genesisConfigFile, SyncMode.FAST)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SyncMode;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
import org.hyperledger.besu.evm.internal.EvmConfiguration;
Expand Down Expand Up @@ -64,7 +65,7 @@ public void blockImport() throws IOException {
BlockTestUtil.write1000Blocks(source);
final BesuController targetController =
new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.mainnet())
.fromGenesisConfig(GenesisConfigFile.mainnet(), SyncMode.FAST)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down Expand Up @@ -96,7 +97,7 @@ public void blockImportRejectsBadPow() throws IOException {
BlockTestUtil.writeBadPowBlocks(source);
final BesuController targetController =
new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.mainnet())
.fromGenesisConfig(GenesisConfigFile.mainnet(), SyncMode.FAST)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down Expand Up @@ -125,7 +126,7 @@ public void blockImportCanSkipPow() throws IOException {
BlockTestUtil.writeBadPowBlocks(source);
final BesuController targetController =
new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.mainnet())
.fromGenesisConfig(GenesisConfigFile.mainnet(), SyncMode.FAST)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down Expand Up @@ -166,7 +167,7 @@ public void ibftImport() throws IOException {

final BesuController controller =
new BesuController.Builder()
.fromGenesisConfig(GenesisConfigFile.fromConfig(config))
.fromGenesisConfig(GenesisConfigFile.fromConfig(config), SyncMode.FULL)
.synchronizerConfiguration(SynchronizerConfiguration.builder().build())
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.storageProvider(new InMemoryKeyValueStorageProvider())
Expand Down
Loading