mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
Remove disable sync flag (#11120)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
252086a0b2
commit
bd9776f510
@ -82,11 +82,6 @@ func (s *Service) Start() {
|
||||
log.Debug("Exiting Initial Sync Service")
|
||||
return
|
||||
}
|
||||
if flags.Get().DisableSync {
|
||||
s.markSynced(genesis)
|
||||
log.WithField("genesisTime", genesis).Info("Due to Sync Being Disabled, entering regular sync immediately.")
|
||||
return
|
||||
}
|
||||
if genesis.After(prysmTime.Now()) {
|
||||
s.markSynced(genesis)
|
||||
log.WithField("genesisTime", genesis).Info("Genesis time has not arrived - not syncing")
|
||||
|
@ -32,7 +32,6 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
|
||||
lruwrpr "github.com/prysmaticlabs/prysm/cache/lru"
|
||||
"github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags"
|
||||
"github.com/prysmaticlabs/prysm/config/params"
|
||||
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/runtime"
|
||||
@ -179,9 +178,6 @@ func (s *Service) Start() {
|
||||
s.processPendingBlocksQueue()
|
||||
s.processPendingAttsQueue()
|
||||
s.maintainPeerStatuses()
|
||||
if !flags.Get().DisableSync {
|
||||
s.resyncIfBehind()
|
||||
}
|
||||
|
||||
// Update sync metrics.
|
||||
async.RunEvery(s.ctx, syncMetricsInterval, s.updateMetrics)
|
||||
|
@ -154,12 +154,6 @@ var (
|
||||
Usage: "The factor by which block batch limit may increase on burst.",
|
||||
Value: 10,
|
||||
}
|
||||
// DisableSync disables a node from syncing at start-up. Instead the node enters regular sync
|
||||
// immediately.
|
||||
DisableSync = &cli.BoolFlag{
|
||||
Name: "disable-sync",
|
||||
Usage: "Starts the beacon node without entering initial sync and instead exits to regular sync immediately.",
|
||||
}
|
||||
// EnableDebugRPCEndpoints as /v1/beacon/state.
|
||||
EnableDebugRPCEndpoints = &cli.BoolFlag{
|
||||
Name: "enable-debug-rpc-endpoints",
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
// GlobalFlags specifies all the global flags for the
|
||||
// beacon node.
|
||||
type GlobalFlags struct {
|
||||
DisableSync bool
|
||||
DisableDiscv5 bool
|
||||
SubscribeToAllSubnets bool
|
||||
MinimumSyncPeers int
|
||||
@ -36,10 +35,6 @@ func Init(c *GlobalFlags) {
|
||||
// based on the provided cli context.
|
||||
func ConfigureGlobalFlags(ctx *cli.Context) {
|
||||
cfg := &GlobalFlags{}
|
||||
if ctx.Bool(DisableSync.Name) {
|
||||
log.Warn("Using Disable Sync flag, using this flag on a live network might lead to adverse consequences.")
|
||||
cfg.DisableSync = true
|
||||
}
|
||||
if ctx.Bool(SubscribeToAllSubnets.Name) {
|
||||
log.Warn("Subscribing to All Attestation Subnets")
|
||||
cfg.SubscribeToAllSubnets = true
|
||||
|
@ -52,7 +52,6 @@ var appFlags = []cli.Flag{
|
||||
flags.MinSyncPeers,
|
||||
flags.ContractDeploymentBlock,
|
||||
flags.SetGCPercent,
|
||||
flags.DisableSync,
|
||||
flags.DisableDiscv5,
|
||||
flags.BlockBatchLimit,
|
||||
flags.BlockBatchLimitBurstFactor,
|
||||
|
@ -112,7 +112,6 @@ var appHelpFlagGroups = []flagGroup{
|
||||
flags.ExecutionJWTSecretFlag,
|
||||
flags.FallbackWeb3ProviderFlag,
|
||||
flags.SetGCPercent,
|
||||
flags.DisableSync,
|
||||
flags.SlotsPerArchivedPoint,
|
||||
flags.DisableDiscv5,
|
||||
flags.BlockBatchLimit,
|
||||
|
Loading…
Reference in New Issue
Block a user