mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
disable it (#12438)
This commit is contained in:
parent
385a317902
commit
51bde7a845
@ -55,6 +55,7 @@ go_library(
|
|||||||
"//beacon-chain/p2p/types:go_default_library",
|
"//beacon-chain/p2p/types:go_default_library",
|
||||||
"//beacon-chain/startup:go_default_library",
|
"//beacon-chain/startup:go_default_library",
|
||||||
"//cmd/beacon-chain/flags:go_default_library",
|
"//cmd/beacon-chain/flags:go_default_library",
|
||||||
|
"//config/features:go_default_library",
|
||||||
"//config/params:go_default_library",
|
"//config/params:go_default_library",
|
||||||
"//consensus-types/primitives:go_default_library",
|
"//consensus-types/primitives:go_default_library",
|
||||||
"//consensus-types/wrapper:go_default_library",
|
"//consensus-types/wrapper:go_default_library",
|
||||||
|
@ -6,12 +6,14 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p"
|
"github.com/libp2p/go-libp2p"
|
||||||
|
"github.com/libp2p/go-libp2p/core/network"
|
||||||
"github.com/libp2p/go-libp2p/core/peer"
|
"github.com/libp2p/go-libp2p/core/peer"
|
||||||
"github.com/libp2p/go-libp2p/p2p/muxer/mplex"
|
"github.com/libp2p/go-libp2p/p2p/muxer/mplex"
|
||||||
"github.com/libp2p/go-libp2p/p2p/security/noise"
|
"github.com/libp2p/go-libp2p/p2p/security/noise"
|
||||||
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
|
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "github.com/multiformats/go-multiaddr"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/prysmaticlabs/prysm/v4/config/features"
|
||||||
ecdsaprysm "github.com/prysmaticlabs/prysm/v4/crypto/ecdsa"
|
ecdsaprysm "github.com/prysmaticlabs/prysm/v4/crypto/ecdsa"
|
||||||
"github.com/prysmaticlabs/prysm/v4/runtime/version"
|
"github.com/prysmaticlabs/prysm/v4/runtime/version"
|
||||||
)
|
)
|
||||||
@ -99,6 +101,9 @@ func (s *Service) buildOptions(ip net.IP, priKey *ecdsa.PrivateKey) []libp2p.Opt
|
|||||||
}
|
}
|
||||||
// Disable Ping Service.
|
// Disable Ping Service.
|
||||||
options = append(options, libp2p.Ping(false))
|
options = append(options, libp2p.Ping(false))
|
||||||
|
if features.Get().DisableResourceManager {
|
||||||
|
options = append(options, libp2p.ResourceManager(&network.NullResourceManager{}))
|
||||||
|
}
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ type Flags struct {
|
|||||||
SaveFullExecutionPayloads bool // Save full beacon blocks with execution payloads in the database.
|
SaveFullExecutionPayloads bool // Save full beacon blocks with execution payloads in the database.
|
||||||
EnableStartOptimistic bool // EnableStartOptimistic treats every block as optimistic at startup.
|
EnableStartOptimistic bool // EnableStartOptimistic treats every block as optimistic at startup.
|
||||||
|
|
||||||
|
DisableResourceManager bool // Disables running the node with libp2p's resource manager.
|
||||||
DisableStakinContractCheck bool // Disables check for deposit contract when proposing blocks
|
DisableStakinContractCheck bool // Disables check for deposit contract when proposing blocks
|
||||||
|
|
||||||
EnableVerboseSigVerification bool // EnableVerboseSigVerification specifies whether to verify individual signature if batch verification fails
|
EnableVerboseSigVerification bool // EnableVerboseSigVerification specifies whether to verify individual signature if batch verification fails
|
||||||
@ -222,6 +223,10 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
|
|||||||
logEnabled(disableBuildBlockParallel)
|
logEnabled(disableBuildBlockParallel)
|
||||||
cfg.BuildBlockParallel = false
|
cfg.BuildBlockParallel = false
|
||||||
}
|
}
|
||||||
|
if ctx.IsSet(disableResourceManager.Name) {
|
||||||
|
logEnabled(disableResourceManager)
|
||||||
|
cfg.DisableResourceManager = true
|
||||||
|
}
|
||||||
cfg.AggregateIntervals = [3]time.Duration{aggregateFirstInterval.Value, aggregateSecondInterval.Value, aggregateThirdInterval.Value}
|
cfg.AggregateIntervals = [3]time.Duration{aggregateFirstInterval.Value, aggregateSecondInterval.Value, aggregateThirdInterval.Value}
|
||||||
Init(cfg)
|
Init(cfg)
|
||||||
return nil
|
return nil
|
||||||
|
@ -140,6 +140,10 @@ var (
|
|||||||
Name: "disable-build-block-parallel",
|
Name: "disable-build-block-parallel",
|
||||||
Usage: "Disables building a beacon block in parallel for consensus and execution",
|
Usage: "Disables building a beacon block in parallel for consensus and execution",
|
||||||
}
|
}
|
||||||
|
disableResourceManager = &cli.BoolFlag{
|
||||||
|
Name: "disable-resource-manager",
|
||||||
|
Usage: "Disables running the libp2p resource manager",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// devModeFlags holds list of flags that are set when development mode is on.
|
// devModeFlags holds list of flags that are set when development mode is on.
|
||||||
@ -190,6 +194,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
|
|||||||
aggregateFirstInterval,
|
aggregateFirstInterval,
|
||||||
aggregateSecondInterval,
|
aggregateSecondInterval,
|
||||||
aggregateThirdInterval,
|
aggregateThirdInterval,
|
||||||
|
disableResourceManager,
|
||||||
}...)...)
|
}...)...)
|
||||||
|
|
||||||
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
|
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
|
||||||
|
Loading…
Reference in New Issue
Block a user