From 337729524135aa0827811632420fcf56225a7908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= <93934272+Stefan-Ethernal@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:16:56 +0200 Subject: [PATCH] Introduce notice about IBFT removal (#2013) * Introduce notice about IBFT removal * Move IBFT notice at the top of the log file in the server --- command/genesis/genesis.go | 1 + helper/common/common.go | 6 ++++++ server/server.go | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/command/genesis/genesis.go b/command/genesis/genesis.go index bb6b38907a..bb0ffdc37e 100644 --- a/command/genesis/genesis.go +++ b/command/genesis/genesis.go @@ -365,6 +365,7 @@ func runCommand(cmd *cobra.Command, _ []string) { if params.isPolyBFTConsensus() { err = params.generatePolyBftChainConfig(outputter) } else { + _, _ = outputter.Write([]byte(fmt.Sprintf("%s\n", common.IBFTImportantNotice))) err = params.generateGenesis() } diff --git a/helper/common/common.go b/helper/common/common.go index 6dfd0fa2d6..237d5c14d8 100644 --- a/helper/common/common.go +++ b/helper/common/common.go @@ -29,6 +29,12 @@ var ( MaxSafeJSInt = uint64(math.Pow(2, 53) - 2) errInvalidDuration = errors.New("invalid duration") + + IBFTImportantNotice = "***** IMPORTANT NOTICE: IBFT consensus protocol is about to be" + + " removed from the Edge in the following release. *****\n" + + "Please migrate to the PolyBFT protocol and plan your activities accordingly.\n" + + "More information on how to execute the migration process can be found here" + + "(https://wiki.polygon.technology/docs/edge/operate/ibft-to-polybft/)." ) // RetryForever will execute a function until it completes without error or diff --git a/server/server.go b/server/server.go index e88e3f27ca..8688105ee2 100644 --- a/server/server.go +++ b/server/server.go @@ -146,6 +146,10 @@ func NewServer(config *Config) (*Server, error) { restoreProgression: progress.NewProgressionWrapper(progress.ChainSyncRestore), } + if config.Chain.Params.GetEngine() == string(IBFTConsensus) { + m.logger.Info(common.IBFTImportantNotice) + } + m.logger.Info("Data dir", "path", config.DataDir) var dirPaths = []string{