From afd4da1974ee53c30b379edecc9b5b34276cd7d8 Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Fri, 29 Nov 2024 20:27:09 +1000 Subject: [PATCH] Fast sync - deprecation warning (#7906) * fast sync log warnings for deprecation Signed-off-by: Sally MacFarlane * minor text change in changelog Signed-off-by: Sally MacFarlane --------- Signed-off-by: Sally MacFarlane Co-authored-by: Fabio Di Fabio --- CHANGELOG.md | 2 +- besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java | 4 ++++ .../hyperledger/besu/cli/ConfigurationOverviewBuilder.java | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7dbfa15b2f..c75079be762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ - `--host-whitelist` has been deprecated in favor of `--host-allowlist` since 2020 and will be removed in a future release - Sunsetting features - for more context on the reasoning behind the deprecation of these features, including alternative options, read [this blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu) - Tessera privacy - - Smart-contract-based permissioning + - Smart-contract-based (onchain) permissioning - Proof of Work consensus - Fast Sync 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 c4c3da6e8dc..a686a00d984 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -1640,6 +1640,10 @@ private void issueOptionWarnings() { "--p2p-port", "--remote-connections-max-percentage")); + if (SyncMode.FAST == syncMode) { + logger.warn("FAST sync is deprecated. Recommend using SNAP sync instead."); + } + if (SyncMode.isFullSync(getDefaultSyncModeIfNotSet()) && isOptionSet(commandLine, "--sync-min-peers")) { logger.warn("--sync-min-peers is ignored in FULL sync-mode"); 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 a7b43d0d9e5..9e69cb608c8 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java @@ -349,7 +349,8 @@ public String build() { } if (syncMode != null) { - lines.add("Sync mode: " + syncMode); + lines.add( + "Sync mode: " + syncMode + (syncMode.equalsIgnoreCase("FAST") ? " (Deprecated)" : "")); } if (syncMinPeers != null) {