diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 6cf2fd57ffad..5884b5311fed 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -146,6 +146,7 @@ var ( utils.RollupHistoricalRPCTimeoutFlag, utils.RollupDisableTxPoolGossipFlag, utils.RollupComputePendingBlock, + utils.RollupHaltOnIncompatibleProtocolVersionFlag, configFileFlag, }, utils.NetworkFlags, utils.DatabasePathFlags) diff --git a/eth/backend.go b/eth/backend.go index 79d9d6656cb5..7c8df0d7862b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -579,6 +579,8 @@ func (s *Ethereum) Stop() error { return nil } +// HandleRequiredProtocolVersion handles the protocol version signal. This implements opt-in halting, +// the protocol version data is already logged and metered when signaled through the Engine API. func (s *Ethereum) HandleRequiredProtocolVersion(required params.ProtocolVersion) error { var needLevel int switch s.config.RollupHaltOnIncompatibleProtocolVersion { @@ -601,7 +603,7 @@ func (s *Ethereum) HandleRequiredProtocolVersion(required params.ProtocolVersion haveLevel = 1 } if haveLevel >= needLevel { // halt if we opted in to do so at this granularity - log.Error("opted to halt, unprepared for protocol change", "required", required, "local", params.OPStackSupport) + log.Error("Opted to halt, unprepared for protocol change", "required", required, "local", params.OPStackSupport) return s.nodeCloser() } return nil diff --git a/eth/catalyst/superchain.go b/eth/catalyst/superchain.go index e277d2c99dd5..2d44647046b6 100644 --- a/eth/catalyst/superchain.go +++ b/eth/catalyst/superchain.go @@ -20,7 +20,7 @@ type SuperchainSignal struct { func (api *ConsensusAPI) SignalSuperchainV1(signal *SuperchainSignal) (params.ProtocolVersion, error) { if signal == nil { - log.Info("received empty superchain version signal", "local", params.OPStackSupport) + log.Info("Received empty superchain version signal", "local", params.OPStackSupport) return params.OPStackSupport, nil } // update metrics and log any warnings/info @@ -31,7 +31,7 @@ func (api *ConsensusAPI) SignalSuperchainV1(signal *SuperchainSignal) (params.Pr LogProtocolVersionSupport(logger, params.OPStackSupport, signal.Required, "required") if err := api.eth.HandleRequiredProtocolVersion(signal.Required); err != nil { - log.Error("failed to handle required protocol version", "err", err, "required", signal.Required) + log.Error("Failed to handle required protocol version", "err", err, "required", signal.Required) return params.OPStackSupport, err } @@ -41,24 +41,24 @@ func (api *ConsensusAPI) SignalSuperchainV1(signal *SuperchainSignal) (params.Pr func LogProtocolVersionSupport(logger log.Logger, local, other params.ProtocolVersion, name string) { switch local.Compare(other) { case params.AheadMajor: - logger.Info(fmt.Sprintf("ahead with major %s protocol version change", name)) + logger.Info(fmt.Sprintf("Ahead with major %s protocol version change", name)) case params.AheadMinor, params.AheadPatch, params.AheadPrerelease: - logger.Debug(fmt.Sprintf("ahead with compatible %s protocol version change", name)) + logger.Debug(fmt.Sprintf("Ahead with compatible %s protocol version change", name)) case params.Matching: - logger.Debug(fmt.Sprintf("latest %s protocol version is supported", name)) + logger.Debug(fmt.Sprintf("Latest %s protocol version is supported", name)) case params.OutdatedMajor: - logger.Error(fmt.Sprintf("outdated with major %s protocol change", name)) + logger.Error(fmt.Sprintf("Outdated with major %s protocol change", name)) case params.OutdatedMinor: - logger.Warn(fmt.Sprintf("outdated with minor backward-compatible %s protocol change", name)) + logger.Warn(fmt.Sprintf("Outdated with minor backward-compatible %s protocol change", name)) case params.OutdatedPatch: - logger.Info(fmt.Sprintf("outdated with support backward-compatible %s protocol change", name)) + logger.Info(fmt.Sprintf("Outdated with support backward-compatible %s protocol change", name)) case params.OutdatedPrerelease: - logger.Debug(fmt.Sprintf("new %s protocol pre-release is available", name)) + logger.Debug(fmt.Sprintf("New %s protocol pre-release is available", name)) case params.DiffBuild: - logger.Debug(fmt.Sprintf("ignoring %s protocolversion signal, local build is different", name)) + logger.Debug(fmt.Sprintf("Ignoring %s protocolversion signal, local build is different", name)) case params.DiffVersionType: - logger.Warn(fmt.Sprintf("failed to recognize %s protocol version signal version-type", name)) + logger.Warn(fmt.Sprintf("Failed to recognize %s protocol version signal version-type", name)) case params.EmptyVersion: - logger.Debug(fmt.Sprintf("no %s protocol version available to check", name)) + logger.Debug(fmt.Sprintf("No %s protocol version available to check", name)) } }