mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Rename unsafe-sync to head-sync (#7570)
* Rename unsafe-sync to head-sync * Update comments Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
dccf0992e5
commit
e25cd08049
@ -425,7 +425,7 @@ func (s *Service) initializeChainInfo(ctx context.Context) error {
|
||||
}
|
||||
s.genesisRoot = genesisBlkRoot
|
||||
|
||||
if flags.Get().UnsafeSync {
|
||||
if flags.Get().HeadSync {
|
||||
headBlock, err := s.beaconDB.HeadBlock(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not retrieve head block")
|
||||
|
@ -90,9 +90,9 @@ var (
|
||||
Usage: "The percentage of freshly allocated data to live data on which the gc will be run again.",
|
||||
Value: 100,
|
||||
}
|
||||
// UnsafeSync starts the beacon node from the previously saved head state and syncs from there.
|
||||
UnsafeSync = &cli.BoolFlag{
|
||||
Name: "unsafe-sync",
|
||||
// HeadSync starts the beacon node from the previously saved head state and syncs from there.
|
||||
HeadSync = &cli.BoolFlag{
|
||||
Name: "head-sync",
|
||||
Usage: "Starts the beacon node with the previously saved head state instead of finalized state.",
|
||||
}
|
||||
// SlotsPerArchivedPoint specifies the number of slots between the archived points, to save beacon state in the cold
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
// GlobalFlags specifies all the global flags for the
|
||||
// beacon node.
|
||||
type GlobalFlags struct {
|
||||
UnsafeSync bool
|
||||
HeadSync bool
|
||||
DisableSync bool
|
||||
DisableDiscv5 bool
|
||||
MinimumSyncPeers int
|
||||
@ -36,9 +36,9 @@ func Init(c *GlobalFlags) {
|
||||
// based on the provided cli context.
|
||||
func ConfigureGlobalFlags(ctx *cli.Context) {
|
||||
cfg := &GlobalFlags{}
|
||||
if ctx.Bool(UnsafeSync.Name) {
|
||||
log.Warn("Using Unsafe Sync flag, it is insecure to use this flag with your beacon node.")
|
||||
cfg.UnsafeSync = true
|
||||
if ctx.Bool(HeadSync.Name) {
|
||||
log.Warn("Using Head Sync flag, it starts syncing from last saved head.")
|
||||
cfg.HeadSync = true
|
||||
}
|
||||
if ctx.Bool(DisableSync.Name) {
|
||||
log.Warn("Using Disable Sync flag, using this flag on a live network might lead to adverse consequences.")
|
||||
|
@ -39,7 +39,7 @@ var appFlags = []cli.Flag{
|
||||
flags.MinSyncPeers,
|
||||
flags.ContractDeploymentBlock,
|
||||
flags.SetGCPercent,
|
||||
flags.UnsafeSync,
|
||||
flags.HeadSync,
|
||||
flags.DisableSync,
|
||||
flags.DisableDiscv5,
|
||||
flags.BlockBatchLimit,
|
||||
|
@ -98,7 +98,7 @@ var appHelpFlagGroups = []flagGroup{
|
||||
flags.GPRCGatewayCorsDomain,
|
||||
flags.HTTPWeb3ProviderFlag,
|
||||
flags.SetGCPercent,
|
||||
flags.UnsafeSync,
|
||||
flags.HeadSync,
|
||||
flags.DisableSync,
|
||||
flags.SlotsPerArchivedPoint,
|
||||
flags.DisableDiscv5,
|
||||
|
Loading…
Reference in New Issue
Block a user