mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-11 13:30:05 +00:00
[Issue 552] Disable debug protocol by default (#588)
This commit is contained in:
parent
dd4db2b36e
commit
12d6851be4
@ -160,6 +160,7 @@ var (
|
||||
utils.LegacyGpoPercentileFlag,
|
||||
utils.EWASMInterpreterFlag,
|
||||
utils.EVMInterpreterFlag,
|
||||
utils.DebugProtocolFlag,
|
||||
configFileFlag,
|
||||
}
|
||||
|
||||
|
@ -186,6 +186,7 @@ var AppHelpFlagGroups = []flagGroup{
|
||||
utils.ExecFlag,
|
||||
utils.PreloadJSFlag,
|
||||
utils.RemoteDbListenAddress,
|
||||
utils.DebugProtocolFlag,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -307,6 +307,10 @@ var (
|
||||
Name: "download-only",
|
||||
Usage: "Run in download only mode - only fetch blocks but not process them",
|
||||
}
|
||||
DebugProtocolFlag = cli.BoolFlag{
|
||||
Name: "debug-protocol",
|
||||
Usage: "Enable the DBG (debug) protocol",
|
||||
}
|
||||
// Ethash settings
|
||||
EthashCacheDirFlag = DirectoryFlag{
|
||||
Name: "ethash.cachedir",
|
||||
@ -1547,6 +1551,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
||||
|
||||
cfg.DownloadOnly = ctx.GlobalBoolT(DownloadOnlyFlag.Name)
|
||||
|
||||
cfg.EnableDebugProtocol = ctx.GlobalBool(DebugProtocolFlag.Name)
|
||||
|
||||
mode, err := eth.StorageModeFromString(ctx.GlobalString(StorageModeFlag.Name))
|
||||
if err != nil {
|
||||
Fatalf(fmt.Sprintf("error while parsing mode: %v", err))
|
||||
|
@ -599,8 +599,10 @@ func (s *Ethereum) Protocols() []p2p.Protocol {
|
||||
protos[i].DialCandidates = s.dialCandiates
|
||||
}
|
||||
|
||||
// Debug
|
||||
protos = append(protos, s.protocolManager.makeDebugProtocol())
|
||||
if s.config.EnableDebugProtocol {
|
||||
// Debug
|
||||
protos = append(protos, s.protocolManager.makeDebugProtocol())
|
||||
}
|
||||
|
||||
// MGR
|
||||
protos = append(protos, s.protocolManager.makeMgrProtocol())
|
||||
|
@ -149,8 +149,8 @@ type Config struct {
|
||||
// for nodes to connect to.
|
||||
DiscoveryURLs []string
|
||||
|
||||
Pruning bool // Whether to disable pruning and flush everything to disk
|
||||
NoPrefetch bool // Whether to disable prefetching and only load state on demand
|
||||
Pruning bool // Whether to disable pruning and flush everything to disk
|
||||
NoPrefetch bool // Whether to disable prefetching and only load state on demand
|
||||
TxLookupLimit uint64 `toml:",omitempty"` // The maximum number of blocks from head whose tx indices are reserved.
|
||||
|
||||
StorageMode StorageMode
|
||||
@ -203,6 +203,9 @@ type Config struct {
|
||||
// Enables tracking of SHA3 preimages in the VM
|
||||
EnablePreimageRecording bool
|
||||
|
||||
// Enables the dbg protocol
|
||||
EnableDebugProtocol bool
|
||||
|
||||
// Miscellaneous options
|
||||
DocRoot string `toml:"-"`
|
||||
|
||||
|
@ -235,7 +235,7 @@ func initPm(manager *ProtocolManager, txpool txPool, engine consensus.Engine, bl
|
||||
|
||||
func (pm *ProtocolManager) makeDebugProtocol() p2p.Protocol {
|
||||
// Initiate Debug protocol
|
||||
log.Info("Initialising Debug protocol", "versions", FirehoseVersions)
|
||||
log.Info("Initialising Debug protocol", "versions", DebugVersions)
|
||||
return p2p.Protocol{
|
||||
Name: DebugName,
|
||||
Version: DebugVersions[0],
|
||||
@ -264,8 +264,7 @@ func (pm *ProtocolManager) makeDebugProtocol() p2p.Protocol {
|
||||
}
|
||||
|
||||
func (pm *ProtocolManager) makeMgrProtocol() p2p.Protocol {
|
||||
// Initiate Debug protocol
|
||||
log.Info("Initialising Debug protocol", "versions", FirehoseVersions)
|
||||
log.Info("Initialising Merry-Go-Round protocol", "versions", MGRVersions)
|
||||
return p2p.Protocol{
|
||||
Name: MGRName,
|
||||
Version: MGRVersions[0],
|
||||
|
Loading…
Reference in New Issue
Block a user