mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
parent
90a66df529
commit
60cdd69b05
@ -10,8 +10,8 @@ import (
|
||||
|
||||
const (
|
||||
// overlay parameters
|
||||
gossipSubD = 6 // topic stable mesh target count
|
||||
gossipSubDlo = 5 // topic stable mesh low watermark
|
||||
gossipSubD = 8 // topic stable mesh target count
|
||||
gossipSubDlo = 6 // topic stable mesh low watermark
|
||||
gossipSubDhi = 12 // topic stable mesh high watermark
|
||||
|
||||
// gossip parameters
|
||||
|
@ -116,9 +116,19 @@ func msgIDFunction(pmsg *pubsub_pb.Message) string {
|
||||
|
||||
func setPubSubParameters() {
|
||||
heartBeatInterval := 700 * time.Millisecond
|
||||
pubsub.GossipSubDlo = 5
|
||||
pubsub.GossipSubDlo = 6
|
||||
pubsub.GossipSubD = 8
|
||||
pubsub.GossipSubHeartbeatInterval = heartBeatInterval
|
||||
pubsub.GossipSubHistoryLength = 6
|
||||
pubsub.GossipSubHistoryGossip = 3
|
||||
pubsub.TimeCacheDuration = 550 * heartBeatInterval
|
||||
|
||||
// Set a larger gossip history to ensure that slower
|
||||
// messages have a longer time to be propagated. This
|
||||
// comes with the tradeoff of larger memory usage and
|
||||
// size of the seen message cache.
|
||||
if featureconfig.Get().EnableLargerGossipHistory {
|
||||
pubsub.GossipSubHistoryLength = 12
|
||||
pubsub.GossipSubHistoryLength = 5
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ type Flags struct {
|
||||
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
|
||||
EnablePruningDepositProofs bool // EnablePruningDepositProofs enables pruning deposit proofs which significantly reduces the size of a deposit
|
||||
EnableSyncBacktracking bool // EnableSyncBacktracking enables backtracking algorithm when searching for alternative forks during initial sync.
|
||||
EnableLargerGossipHistory bool // EnableLargerGossipHistory increases the gossip history we store in our caches.
|
||||
|
||||
// Logging related toggles.
|
||||
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
|
||||
@ -174,6 +175,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
|
||||
log.Warn("Enabling init-sync backtracking algorithm")
|
||||
cfg.EnableSyncBacktracking = true
|
||||
}
|
||||
if ctx.Bool(enableLargerGossipHistory.Name) {
|
||||
log.Warn("Using a larger gossip history for the node")
|
||||
cfg.EnableLargerGossipHistory = true
|
||||
}
|
||||
Init(cfg)
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,16 @@ var (
|
||||
Name: "enable-sync-backtracking",
|
||||
Usage: "Enable experimental fork exploration backtracking algorithm",
|
||||
}
|
||||
enableLargerGossipHistory = &cli.BoolFlag{
|
||||
Name: "enable-larger-gossip-history",
|
||||
Usage: "Enables the node to store a larger amount of gossip messages in its cache.",
|
||||
}
|
||||
)
|
||||
|
||||
// devModeFlags holds list of flags that are set when development mode is on.
|
||||
var devModeFlags = []cli.Flag{
|
||||
enableSyncBacktracking,
|
||||
enableLargerGossipHistory,
|
||||
}
|
||||
|
||||
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
|
||||
@ -121,6 +126,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
|
||||
disableBlst,
|
||||
disableEth1DataMajorityVote,
|
||||
enablePeerScorer,
|
||||
enableLargerGossipHistory,
|
||||
checkPtInfoCache,
|
||||
disablePruningDepositProofs,
|
||||
enableSyncBacktracking,
|
||||
|
Loading…
Reference in New Issue
Block a user