Skip to content

Commit

Permalink
Introduce notice about IBFT removal (#2013)
Browse files Browse the repository at this point in the history
* Introduce notice about IBFT removal

* Move IBFT notice at the top of the log file in the server
  • Loading branch information
Stefan-Ethernal committed Oct 26, 2023
1 parent e2a7467 commit 3377295
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions command/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
6 changes: 6 additions & 0 deletions helper/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 3377295

Please sign in to comment.