diff --git a/CHANGELOG.md b/CHANGELOG.md index 09e2439489..59828b7e24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - Dedicated log marker for invalid txs removed from the txpool [#6826](https://github.com/hyperledger/besu/pull/6826) - Prevent startup with BONSAI and privacy enabled [#6809](https://github.com/hyperledger/besu/pull/6809) - Remove deprecated Forest pruning [#6810](https://github.com/hyperledger/besu/pull/6810) +- Experimental Snap Sync Server [#6640](https://github.com/hyperledger/besu/pull/6640) ### Bug fixes - Fix txpool dump/restore race condition [#6665](https://github.com/hyperledger/besu/pull/6665) 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 26422b0f66..624699f70c 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -2732,6 +2732,8 @@ public class BesuCommand implements DefaultCommandValues, Runnable { getDataStorageConfiguration().getUnstable().getBonsaiTrieLogPruningWindowSize()); } + builder.setSnapServerEnabled(this.unstableSynchronizerOptions.isSnapsyncServerEnabled()); + builder.setTxPoolImplementation(buildTransactionPoolConfiguration().getTxPoolImplementation()); builder.setWorldStateUpdateMode(unstableEvmOptions.toDomainObject().worldUpdaterMode()); diff --git a/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java b/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java index bf03c675d8..2b3dfd7dd5 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java @@ -55,6 +55,7 @@ public class ConfigurationOverviewBuilder { private boolean isBonsaiLimitTrieLogsEnabled = false; private long trieLogRetentionLimit = 0; private Integer trieLogsPruningWindowSize = null; + private boolean isSnapServerEnabled = false; private TransactionPoolConfiguration.Implementation txPoolImplementation; private EvmConfiguration.WorldUpdaterMode worldStateUpdateMode; private Map environment; @@ -219,6 +220,17 @@ public class ConfigurationOverviewBuilder { return this; } + /** + * Sets snap server enabled/disabled + * + * @param snapServerEnabled bool to indicate if snap server is enabled + * @return the builder + */ + public ConfigurationOverviewBuilder setSnapServerEnabled(final boolean snapServerEnabled) { + isSnapServerEnabled = snapServerEnabled; + return this; + } + /** * Sets trie logs pruning window size * @@ -339,6 +351,10 @@ public class ConfigurationOverviewBuilder { lines.add("Using " + worldStateUpdateMode + " worldstate update mode"); + if (isSnapServerEnabled) { + lines.add("Experimental Snap Sync server enabled"); + } + if (isBonsaiLimitTrieLogsEnabled) { final StringBuilder trieLogPruningString = new StringBuilder(); trieLogPruningString diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java index 7c9de81579..da5199f85d 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java @@ -82,6 +82,8 @@ public class SynchronizerOptions implements CLIOptions