Documentation ¶
Index ¶
- func ApplyDefaults(cfg IConfigSection, network Network)
- func ChangeNetwork(cfg IConfigSection, oldNetwork Network, newNetwork Network)
- func Clone(source IConfigSection, target IConfigSection, network Network)
- func Deserialize(cfg IConfigSection, serializedParams map[string]any, network Network) error
- func GetAffectedContainers(section *ChangedSection, containers map[ContainerID]bool)
- func GetExternalIP() (net.IP, error)
- func HexToAddressPtr(hexAddress string) *common.Address
- func Serialize(cfg IConfigSection) map[string]any
- func UpdateDefaults(cfg IConfigSection, newNetwork Network)
- type BeaconNode
- type BesuConfig
- type BitflyNodeMetricsConfig
- type ChangedSection
- type ChangedSetting
- type ClientMode
- type ContainerID
- type ExecutionClient
- type ExporterConfig
- type ExternalBeaconConfig
- type ExternalExecutionConfig
- type FallbackConfig
- type GethConfig
- type GrafanaConfig
- type IConfig
- type IConfigSection
- type IParameter
- type IParameterOption
- type LighthouseBnConfig
- type LighthouseVcConfig
- type LocalBeaconConfig
- func (cfg *LocalBeaconConfig) GetAdditionalFlags() string
- func (cfg *LocalBeaconConfig) GetContainerTag() string
- func (cfg *LocalBeaconConfig) GetMaxPeers() uint16
- func (cfg *LocalBeaconConfig) GetOpenApiPortMapping() []string
- func (cfg *LocalBeaconConfig) GetParameters() []IParameter
- func (cfg *LocalBeaconConfig) GetSubconfigs() map[string]IConfigSection
- func (cfg *LocalBeaconConfig) GetTitle() string
- type LocalExecutionConfig
- func (cfg *LocalExecutionConfig) GetAdditionalFlags() string
- func (cfg *LocalExecutionConfig) GetContainerTag() string
- func (cfg *LocalExecutionConfig) GetMaxPeers() uint16
- func (cfg *LocalExecutionConfig) GetOpenApiPortMapping() string
- func (cfg *LocalExecutionConfig) GetParameters() []IParameter
- func (cfg *LocalExecutionConfig) GetSubconfigs() map[string]IConfigSection
- func (cfg *LocalExecutionConfig) GetTitle() string
- type LodestarBnConfig
- type LodestarVcConfig
- type LoggerConfig
- type MetricsConfig
- type NethermindConfig
- type Network
- type NetworkResources
- type NimbusBnConfig
- type NimbusVcConfig
- type Nimbus_PruningMode
- type Parameter
- func (p *Parameter[_]) ChangeNetwork(oldNetwork Network, newNetwork Network)
- func (p *Parameter[_]) Deserialize(serializedParam string, network Network) error
- func (p *Parameter[_]) GetCommon() *ParameterCommon
- func (p *Parameter[Type]) GetDefault(network Network) Type
- func (p *Parameter[_]) GetDefaultAsAny(network Network) any
- func (p *Parameter[_]) GetOptions() []IParameterOption
- func (p *Parameter[_]) GetValueAsAny() any
- func (p *Parameter[Type]) SetToDefault(network Network)
- func (p *Parameter[Type]) SetValue(value any)
- func (p *Parameter[_]) String() string
- type ParameterCommon
- type ParameterOption
- type ParameterOptionCommon
- type PrometheusConfig
- type PrysmBnConfig
- type PrysmVcConfig
- type RethConfig
- type RpcPortMode
- type TekuBnConfig
- type TekuVcConfig
- type ValidatorClientCommonConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(cfg IConfigSection, network Network)
Apply the default settings for each parameter and subparameter
func ChangeNetwork ¶
func ChangeNetwork(cfg IConfigSection, oldNetwork Network, newNetwork Network)
Change the active network for an entire configuration
func Clone ¶
func Clone(source IConfigSection, target IConfigSection, network Network)
Copy a section's settings into the corresponding section of a new config
func Deserialize ¶
func Deserialize(cfg IConfigSection, serializedParams map[string]any, network Network) error
Deserialize a config section
func GetAffectedContainers ¶
func GetAffectedContainers(section *ChangedSection, containers map[ContainerID]bool)
Get a list of containers that will be need to be restarted after this change is applied
func GetExternalIP ¶
Get the external IP address. Try finding an IPv4 address first to: * Improve peer discovery and node performance * Avoid unnecessary container restarts caused by switching between IPv4 and IPv6
func HexToAddressPtr ¶ added in v0.3.0
Convert a hex string to an address, wrapped in a pointer
func Serialize ¶
func Serialize(cfg IConfigSection) map[string]any
Serialize a config section into a map
func UpdateDefaults ¶
func UpdateDefaults(cfg IConfigSection, newNetwork Network)
Update the default settings after a network change
Types ¶
type BeaconNode ¶
type BeaconNode string
A Beacon Node (Beacon Node)
const ( // Unknown BeaconNode_Unknown BeaconNode = "" // Lighthouse BeaconNode_Lighthouse BeaconNode = "lighthouse" // Lodestar BeaconNode_Lodestar BeaconNode = "lodestar" // Nimbus BeaconNode_Nimbus BeaconNode = "nimbus" // Prysm BeaconNode_Prysm BeaconNode = "prysm" // Teku BeaconNode_Teku BeaconNode = "teku" )
Enum to describe the Beacon Nodes
type BesuConfig ¶
type BesuConfig struct { // Max number of P2P peers to connect to JvmHeapSize Parameter[uint64] // Max number of P2P peers to connect to MaxPeers Parameter[uint16] // Historical state block regeneration limit MaxBackLayers Parameter[uint64] // The archive mode flag ArchiveMode Parameter[bool] // The Docker Hub tag for Besu ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Besu
func (*BesuConfig) GetParameters ¶
func (cfg *BesuConfig) GetParameters() []IParameter
Get the parameters for this config
func (*BesuConfig) GetSubconfigs ¶
func (cfg *BesuConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
type BitflyNodeMetricsConfig ¶
type BitflyNodeMetricsConfig struct { Secret Parameter[string] Endpoint Parameter[string] MachineName Parameter[string] }
Configuration for Bitfly Node Metrics
func NewBitflyNodeMetricsConfig ¶
func NewBitflyNodeMetricsConfig() *BitflyNodeMetricsConfig
Generates a new Bitfly Node Metrics config
func (*BitflyNodeMetricsConfig) GetParameters ¶
func (cfg *BitflyNodeMetricsConfig) GetParameters() []IParameter
Get the parameters for this config
func (*BitflyNodeMetricsConfig) GetSubconfigs ¶
func (cfg *BitflyNodeMetricsConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*BitflyNodeMetricsConfig) GetTitle ¶
func (cfg *BitflyNodeMetricsConfig) GetTitle() string
The title for the config
type ChangedSection ¶
type ChangedSection struct { // The name of the section Name string // The list of parameters within this section that have changed Settings []*ChangedSetting // The list of subsections that may or may not have changes Subsections []*ChangedSection }
A configuration section with one or more changes
func GetChangedSettings ¶
func GetChangedSettings(old IConfigSection, new IConfigSection) (*ChangedSection, int)
Get all of the settings that have changed between the given config sections Assumes the config sections represent the same element, just different instances
type ChangedSetting ¶
type ChangedSetting struct { // The setting name Name string // The current (old) value of the parameter OldValue string // The new (pending) value of the parameter NewValue string // A list of containers affected by this change, which will require restarting them AffectedContainers []ContainerID }
A configuration setting that has been changed
type ClientMode ¶
type ClientMode string
A client ownership mode
const ( // Unknown ClientMode_Unknown ClientMode = "" // Locally-owned clients (managed by the NMC service) ClientMode_Local ClientMode = "local" // Externally-managed clients (managed by the user) ClientMode_External ClientMode = "external" )
Enum to describe client modes
type ContainerID ¶
type ContainerID string
A Docker container name
const ( // Unknown ContainerID_Unknown ContainerID = "" // The daemon ContainerID_Daemon ContainerID = "daemon" // The Execution client ContainerID_ExecutionClient ContainerID = "ec" // The Beacon node (Beacon Node) ContainerID_BeaconNode ContainerID = "bn" // The Validator client ContainerID_ValidatorClient ContainerID = "vc" // MEV-Boost ContainerID_MevBoost ContainerID = "mev-boost" // The Node Exporter ContainerID_Exporter ContainerID = "exporter" // Prometheus ContainerID_Prometheus ContainerID = "prometheus" // Grafana ContainerID_Grafana ContainerID = "grafana" )
Enum to describe the names / IDs of various containers controlled by NMC
type ExecutionClient ¶
type ExecutionClient string
An Execution client
const ( // Unknown ExecutionClient_Unknown ExecutionClient = "" // Geth ExecutionClient_Geth ExecutionClient = "geth" // Nethermind ExecutionClient_Nethermind ExecutionClient = "nethermind" // Besu ExecutionClient_Besu ExecutionClient = "besu" // Reth ExecutionClient_Reth ExecutionClient = "reth" )
Enum to describe the Execution clients
type ExporterConfig ¶
type ExporterConfig struct { // Toggle for enabling access to the root filesystem (for multiple disk usage metrics) RootFs Parameter[bool] // The Docker Hub tag for the Exporter ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Exporter
func (*ExporterConfig) GetParameters ¶
func (cfg *ExporterConfig) GetParameters() []IParameter
Get the parameters for this config
func (*ExporterConfig) GetSubconfigs ¶
func (cfg *ExporterConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*ExporterConfig) GetTitle ¶
func (cfg *ExporterConfig) GetTitle() string
The title for the config
type ExternalBeaconConfig ¶
type ExternalBeaconConfig struct { // The selected BN BeaconNode Parameter[BeaconNode] // The URL of the HTTP endpoint HttpUrl Parameter[string] // The URL of the Prysm gRPC endpoint (only needed if using Prysm VCs) PrysmRpcUrl Parameter[string] }
Configuration for external Beacon Nodes
func NewExternalBeaconConfig ¶
func NewExternalBeaconConfig() *ExternalBeaconConfig
Generates a new ExternalBeaconConfig configuration
func (*ExternalBeaconConfig) GetParameters ¶
func (cfg *ExternalBeaconConfig) GetParameters() []IParameter
Get the parameters for this config
func (*ExternalBeaconConfig) GetSubconfigs ¶
func (cfg *ExternalBeaconConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*ExternalBeaconConfig) GetTitle ¶
func (cfg *ExternalBeaconConfig) GetTitle() string
The title for the config
type ExternalExecutionConfig ¶
type ExternalExecutionConfig struct { // The selected EC ExecutionClient Parameter[ExecutionClient] // The URL of the HTTP endpoint HttpUrl Parameter[string] // The URL of the Websocket endpoint WebsocketUrl Parameter[string] }
Configuration for external Execution clients
func NewExternalExecutionConfig ¶
func NewExternalExecutionConfig() *ExternalExecutionConfig
Generates a new ExternalExecutionConfig configuration
func (*ExternalExecutionConfig) GetParameters ¶
func (cfg *ExternalExecutionConfig) GetParameters() []IParameter
Get the parameters for this config
func (*ExternalExecutionConfig) GetSubconfigs ¶
func (cfg *ExternalExecutionConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*ExternalExecutionConfig) GetTitle ¶
func (cfg *ExternalExecutionConfig) GetTitle() string
The title for the config
type FallbackConfig ¶
type FallbackConfig struct { // Flag for enabling fallback clients UseFallbackClients Parameter[bool] // The URL of the Execution Client HTTP endpoint EcHttpUrl Parameter[string] // The URL of the Beacon Node HTTP endpoint BnHttpUrl Parameter[string] // The URL of the Prysm gRPC endpoint (only needed if using Prysm VCs) PrysmRpcUrl Parameter[string] }
Fallback configuration
func NewFallbackConfig ¶
func NewFallbackConfig() *FallbackConfig
Generates a new FallbackConfig configuration
func (*FallbackConfig) GetParameters ¶
func (cfg *FallbackConfig) GetParameters() []IParameter
Get the Parameters for this config
func (*FallbackConfig) GetSubconfigs ¶
func (cfg *FallbackConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*FallbackConfig) GetTitle ¶
func (cfg *FallbackConfig) GetTitle() string
The title for the config
type GethConfig ¶
type GethConfig struct { // Max number of P2P peers to connect to MaxPeers Parameter[uint16] // Number of seconds EVM calls can run before timing out EvmTimeout Parameter[uint64] // The archive mode flag ArchiveMode Parameter[bool] // The Docker Hub tag for Geth ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Geth
func (*GethConfig) GetParameters ¶
func (cfg *GethConfig) GetParameters() []IParameter
Get the parameters for this config
func (*GethConfig) GetSubconfigs ¶
func (cfg *GethConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
type GrafanaConfig ¶
type GrafanaConfig struct { // The HTTP port to serve on Port Parameter[uint16] // The Docker Hub tag for Grafana ContainerTag Parameter[string] }
Configuration for Grafana
func (*GrafanaConfig) GetParameters ¶
func (cfg *GrafanaConfig) GetParameters() []IParameter
Get the parameters for this config
func (*GrafanaConfig) GetSubconfigs ¶
func (cfg *GrafanaConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*GrafanaConfig) GetTitle ¶
func (cfg *GrafanaConfig) GetTitle() string
The title for the config
type IConfig ¶
type IConfig interface { IConfigSection // The path to use for the API log file GetApiLogFilePath() string // The path to use for the tasks log file GetTasksLogFilePath() string // The path to use for the node address file GetNodeAddressFilePath() string // The path to use for the wallet keystore file GetWalletFilePath() string // The path to use for the wallet keystore's password file GetPasswordFilePath() string // The resources for the selected network GetNetworkResources() *NetworkResources // The URLs for the Execution clients to use GetExecutionClientUrls() (string, string) // The URLs for the Beacon nodes to use GetBeaconNodeUrls() (string, string) // The configuration for the daemon loggers GetLoggerOptions() log.LoggerOptions }
NMC servers typically provide some kind of persistent configuration; it must implement this interface.
type IConfigSection ¶
type IConfigSection interface { // Get the name of the section (for display purposes) GetTitle() string // Get the list of parameters directly belonging to this section GetParameters() []IParameter // Get the sections underneath this one GetSubconfigs() map[string]IConfigSection }
Interface for describing config sections
type IParameter ¶
type IParameter interface { // Get the parameter's common fields GetCommon() *ParameterCommon // Get the common fields from each ParameterOption (returns nil if this isn't a choice parameter) GetOptions() []IParameterOption // Set the parameter to the default value SetToDefault(network Network) // Get the parameter's value GetValueAsAny() any // Get the parameter's value as a string String() string // Get the parameter's default value for the supplied network as a string GetDefaultAsAny(network Network) any // Deserializes a string into this parameter's value Deserialize(serializedParam string, network Network) error // Set the parameter's value explicitly; panics if it's the wrong type SetValue(value any) // Change the current network ChangeNetwork(oldNetwork Network, newNetwork Network) }
An interface for typed Parameter structs, to get common fields from them
type IParameterOption ¶
type IParameterOption interface { // Get the parameter option's common fields Common() *ParameterOptionCommon // Get the option's value GetValueAsAny() any // Ge the option's value as a string String() string }
An interface for typed ParameterOption structs, to get common fields from them
type LighthouseBnConfig ¶
type LighthouseBnConfig struct { // The port to use for gossip traffic using the QUIC protocol P2pQuicPort Parameter[uint16] // The max number of P2P peers to connect to MaxPeers Parameter[uint16] // The Docker Hub tag for Lighthouse BN ContainerTag Parameter[string] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for the Lighthouse BN
func NewLighthouseBnConfig ¶
func NewLighthouseBnConfig() *LighthouseBnConfig
Generates a new Lighthouse BN configuration
func (*LighthouseBnConfig) GetParameters ¶
func (cfg *LighthouseBnConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LighthouseBnConfig) GetSubconfigs ¶
func (cfg *LighthouseBnConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LighthouseBnConfig) GetTitle ¶
func (cfg *LighthouseBnConfig) GetTitle() string
The title for the config
type LighthouseVcConfig ¶
type LighthouseVcConfig struct { // The Docker Hub tag for Lighthouse VC ContainerTag Parameter[string] // Custom command line flags for the VC AdditionalFlags Parameter[string] }
Configuration for the Lighthouse VC
func NewLighthouseVcConfig ¶
func NewLighthouseVcConfig() *LighthouseVcConfig
Generates a new Lighthouse VC configuration
func (*LighthouseVcConfig) GetParameters ¶
func (cfg *LighthouseVcConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LighthouseVcConfig) GetSubconfigs ¶
func (cfg *LighthouseVcConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LighthouseVcConfig) GetTitle ¶
func (cfg *LighthouseVcConfig) GetTitle() string
The title for the config
type LocalBeaconConfig ¶
type LocalBeaconConfig struct { // The selected BN BeaconNode Parameter[BeaconNode] // The checkpoint sync URL if used CheckpointSyncProvider Parameter[string] // The port to use for gossip traffic P2pPort Parameter[uint16] // The port to expose the HTTP API on HttpPort Parameter[uint16] // Toggle for forwarding the HTTP API port outside of Docker OpenHttpPort Parameter[RpcPortMode] // Subconfigs Lighthouse *LighthouseBnConfig Lodestar *LodestarBnConfig Nimbus *NimbusBnConfig Prysm *PrysmBnConfig Teku *TekuBnConfig }
Common parameters shared by all of the Beacon Clients
func NewLocalBeaconConfig ¶
func NewLocalBeaconConfig() *LocalBeaconConfig
Create a new LocalBeaconConfig struct
func (*LocalBeaconConfig) GetAdditionalFlags ¶
func (cfg *LocalBeaconConfig) GetAdditionalFlags() string
Gets the additional flags of the selected BN
func (*LocalBeaconConfig) GetContainerTag ¶
func (cfg *LocalBeaconConfig) GetContainerTag() string
Get the container tag of the selected BN
func (*LocalBeaconConfig) GetMaxPeers ¶
func (cfg *LocalBeaconConfig) GetMaxPeers() uint16
Gets the max peers of the selected EC
func (*LocalBeaconConfig) GetOpenApiPortMapping ¶
func (cfg *LocalBeaconConfig) GetOpenApiPortMapping() []string
Get the Docker mapping for the selected API port mode
func (*LocalBeaconConfig) GetParameters ¶
func (cfg *LocalBeaconConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LocalBeaconConfig) GetSubconfigs ¶
func (cfg *LocalBeaconConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LocalBeaconConfig) GetTitle ¶
func (cfg *LocalBeaconConfig) GetTitle() string
The title for the config
type LocalExecutionConfig ¶
type LocalExecutionConfig struct { // The selected EC ExecutionClient Parameter[ExecutionClient] // The HTTP API port HttpPort Parameter[uint16] // The Websocket API port WebsocketPort Parameter[uint16] // The Engine API port EnginePort Parameter[uint16] // Toggle for forwarding the HTTP API port outside of Docker OpenApiPorts Parameter[RpcPortMode] // P2P traffic port P2pPort Parameter[uint16] // Subconfigs Geth *GethConfig Nethermind *NethermindConfig Besu *BesuConfig Reth *RethConfig }
Configuration for the Execution client
func NewLocalExecutionConfig ¶
func NewLocalExecutionConfig() *LocalExecutionConfig
Create a new LocalExecutionConfig struct
func (*LocalExecutionConfig) GetAdditionalFlags ¶
func (cfg *LocalExecutionConfig) GetAdditionalFlags() string
Gets the additional flags of the selected EC
func (*LocalExecutionConfig) GetContainerTag ¶
func (cfg *LocalExecutionConfig) GetContainerTag() string
Get the container tag of the selected EC
func (*LocalExecutionConfig) GetMaxPeers ¶
func (cfg *LocalExecutionConfig) GetMaxPeers() uint16
Gets the max peers of the selected EC Note that Reth treats the max peer count specially
func (*LocalExecutionConfig) GetOpenApiPortMapping ¶
func (cfg *LocalExecutionConfig) GetOpenApiPortMapping() string
Get the Docker mapping for the selected API port mode
func (*LocalExecutionConfig) GetParameters ¶
func (cfg *LocalExecutionConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LocalExecutionConfig) GetSubconfigs ¶
func (cfg *LocalExecutionConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LocalExecutionConfig) GetTitle ¶
func (cfg *LocalExecutionConfig) GetTitle() string
Get the title for the config
type LodestarBnConfig ¶
type LodestarBnConfig struct { // The max number of P2P peers to connect to MaxPeers Parameter[uint16] // The Docker Hub tag for Lodestar BN ContainerTag Parameter[string] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for the Lodestar BN
func NewLodestarBnConfig ¶
func NewLodestarBnConfig() *LodestarBnConfig
Generates a new Lodestar BN configuration
func (*LodestarBnConfig) GetParameters ¶
func (cfg *LodestarBnConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LodestarBnConfig) GetSubconfigs ¶
func (cfg *LodestarBnConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LodestarBnConfig) GetTitle ¶
func (cfg *LodestarBnConfig) GetTitle() string
The title for the config
type LodestarVcConfig ¶
type LodestarVcConfig struct { // The Docker Hub tag for Lodestar VC ContainerTag Parameter[string] // Custom command line flags for the VC AdditionalFlags Parameter[string] }
Configuration for the Lodestar VC
func NewLodestarVcConfig ¶
func NewLodestarVcConfig() *LodestarVcConfig
Generates a new Lodestar VC configuration
func (*LodestarVcConfig) GetParameters ¶
func (cfg *LodestarVcConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LodestarVcConfig) GetSubconfigs ¶
func (cfg *LodestarVcConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LodestarVcConfig) GetTitle ¶
func (cfg *LodestarVcConfig) GetTitle() string
The title for the config
type LoggerConfig ¶ added in v0.2.0
type LoggerConfig struct { // The minimum record level that will be logged Level Parameter[slog.Level] // The format to use when printing logs Format Parameter[log.LogFormat] // True to include the source code position of the log statement in log messages AddSource Parameter[bool] // The maximum size (in megabytes) of the log file before it gets rotated MaxSize Parameter[uint64] // The maximum number of old log files to retain MaxBackups Parameter[uint64] // The maximum number of days to retain old log files based on the timestamp encoded in their filename MaxAge Parameter[uint64] // Toggle for saving rotated logs with local system time in the name vs. UTC LocalTime Parameter[bool] // Toggle for compressing rotated logs Compress Parameter[bool] }
Configuration for the daemon loggers
func NewLoggerConfig ¶ added in v0.2.0
func NewLoggerConfig() *LoggerConfig
Generates a new Logger configuration
func (*LoggerConfig) GetOptions ¶ added in v0.2.0
func (cfg *LoggerConfig) GetOptions() log.LoggerOptions
Calculate the default number of Geth peers
func (*LoggerConfig) GetParameters ¶ added in v0.2.0
func (cfg *LoggerConfig) GetParameters() []IParameter
Get the parameters for this config
func (*LoggerConfig) GetSubconfigs ¶ added in v0.2.0
func (cfg *LoggerConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*LoggerConfig) GetTitle ¶ added in v0.2.0
func (cfg *LoggerConfig) GetTitle() string
Get the title for the config
type MetricsConfig ¶
type MetricsConfig struct { EnableMetrics Parameter[bool] EcMetricsPort Parameter[uint16] BnMetricsPort Parameter[uint16] DaemonMetricsPort Parameter[uint16] ExporterMetricsPort Parameter[uint16] EnableBitflyNodeMetrics Parameter[bool] // Subconfigs Grafana *GrafanaConfig Prometheus *PrometheusConfig Exporter *ExporterConfig BitflyNodeMetrics *BitflyNodeMetricsConfig }
Configuration for Metrics
func (*MetricsConfig) GetParameters ¶
func (cfg *MetricsConfig) GetParameters() []IParameter
Get the parameters for this config
func (*MetricsConfig) GetSubconfigs ¶
func (cfg *MetricsConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*MetricsConfig) GetTitle ¶
func (cfg *MetricsConfig) GetTitle() string
The title for the config
type NethermindConfig ¶
type NethermindConfig struct { // Nethermind's cache memory hint CacheSize Parameter[uint64] // Max number of P2P peers to connect to MaxPeers Parameter[uint16] // Nethermind's memory for in-memory pruning PruneMemSize Parameter[uint64] // Nethermind's memory budget for full pruning FullPruneMemoryBudget Parameter[uint64] // Nethermind's remaining disk space to trigger a pruning FullPruningThresholdMb Parameter[uint64] // Additional modules to enable on the primary JSON RPC endpoint AdditionalModules Parameter[string] // Additional JSON RPC URLs AdditionalUrls Parameter[string] // The Docker Hub tag for Nethermind ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Nethermind
func NewNethermindConfig ¶
func NewNethermindConfig() *NethermindConfig
Generates a new Nethermind configuration
func (*NethermindConfig) GetParameters ¶
func (cfg *NethermindConfig) GetParameters() []IParameter
Get the parameters for this config
func (*NethermindConfig) GetSubconfigs ¶
func (cfg *NethermindConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*NethermindConfig) GetTitle ¶
func (cfg *NethermindConfig) GetTitle() string
Get the title for the config
type NetworkResources ¶
type NetworkResources struct { // The Network being used Network Network // The actual name of the underlying Ethereum network, passed into the clients EthNetworkName string // The chain ID for the current network ChainID uint // The genesis fork version for the network according to the Beacon config for the network GenesisForkVersion []byte // The address of the multicall contract MulticallAddress common.Address // The BalanceChecker contract address BalanceBatcherAddress common.Address // The URL for transaction monitoring on the network's chain explorer TxWatchUrl string // The FlashBots Protect RPC endpoint FlashbotsProtectUrl string }
A collection of network-specific resources and getters for them
func NewResources ¶
func NewResources(network Network) *NetworkResources
Creates a new resource collection for the given network
type NimbusBnConfig ¶
type NimbusBnConfig struct { // The max number of P2P peers to connect to MaxPeers Parameter[uint16] // The Docker Hub tag for the BN ContainerTag Parameter[string] // The pruning mode to use in the BN PruningMode Parameter[Nimbus_PruningMode] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for Nimbus
func NewNimbusBnConfig ¶
func NewNimbusBnConfig() *NimbusBnConfig
Generates a new Nimbus configuration
func (*NimbusBnConfig) GetParameters ¶
func (cfg *NimbusBnConfig) GetParameters() []IParameter
Get the parameters for this config
func (*NimbusBnConfig) GetSubconfigs ¶
func (cfg *NimbusBnConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*NimbusBnConfig) GetTitle ¶
func (cfg *NimbusBnConfig) GetTitle() string
Get the title for the config
type NimbusVcConfig ¶
type NimbusVcConfig struct { // The Docker Hub tag for the VC ContainerTag Parameter[string] // Custom command line flags for the VC AdditionalFlags Parameter[string] }
Configuration for Nimbus
func NewNimbusVcConfig ¶
func NewNimbusVcConfig() *NimbusVcConfig
Generates a new Nimbus VC configuration
func (*NimbusVcConfig) GetParameters ¶
func (cfg *NimbusVcConfig) GetParameters() []IParameter
Get the parameters for this config
func (*NimbusVcConfig) GetSubconfigs ¶
func (cfg *NimbusVcConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*NimbusVcConfig) GetTitle ¶
func (cfg *NimbusVcConfig) GetTitle() string
Get the title for the config
type Nimbus_PruningMode ¶
type Nimbus_PruningMode string
Nimbus's pruning mode
const ( Nimbus_PruningMode_Archive Nimbus_PruningMode = "archive" Nimbus_PruningMode_Pruned Nimbus_PruningMode = "prune" )
type Parameter ¶
type Parameter[Type comparable] struct { *ParameterCommon Default map[Network]Type Value Type Options []*ParameterOption[Type] }
A parameter that can be configured by the user
func (*Parameter[_]) ChangeNetwork ¶
Apply a network change to a parameter
func (*Parameter[_]) Deserialize ¶
Deserializes a string into this parameter's value
func (*Parameter[_]) GetCommon ¶
func (p *Parameter[_]) GetCommon() *ParameterCommon
Get the parameter's common fields
func (*Parameter[Type]) GetDefault ¶
Get the default value for the provided network
func (*Parameter[_]) GetDefaultAsAny ¶
Get the default value for the provided network
func (*Parameter[_]) GetOptions ¶
func (p *Parameter[_]) GetOptions() []IParameterOption
Get the common fields from each ParameterOption (returns nil if this isn't a choice parameter)
func (*Parameter[_]) GetValueAsAny ¶
Get the parameter's value
func (*Parameter[Type]) SetToDefault ¶
Set the value to the default for the provided config's network
type ParameterCommon ¶
type ParameterCommon struct { // The parameter's ID, used for serialization and deserialization ID string // The parameter's human-readable name Name string // A description of this parameter / setting Description string // The max length of the parameter, in characters, if it's free-form input MaxLength int // An optional regex used to validate free-form input for the parameter Regex string // True if this is an advanced parameter and should be hidden unless advanced configuration mode is enabled Advanced bool // The list of Docker containers affected by changing this parameter // (these containers will require a restart for the change to take effect) AffectsContainers []ContainerID // A list of Docker container environment variables that should be set to this parameter's value EnvironmentVariables []string // Whether or not the parameter is allowed to be blank CanBeBlank bool // True to reset the parameter's value to the default option after the config is updated OverwriteOnUpgrade bool // Descriptions of the parameter that change depending on the selected network DescriptionsByNetwork map[Network]string }
Common fields across all Parameter instances
func (*ParameterCommon) UpdateDescription ¶
func (p *ParameterCommon) UpdateDescription(network Network)
Set the network-specific description of the parameter
type ParameterOption ¶
type ParameterOption[Type any] struct { *ParameterOptionCommon // The underlying value for this option Value Type }
A single option in a choice parameter
func GetPortModes ¶
func GetPortModes(warningOverride string) []*ParameterOption[RpcPortMode]
Get the possible RPC port mode options
func (*ParameterOption[_]) Common ¶
func (p *ParameterOption[_]) Common() *ParameterOptionCommon
Get the parameter option's common fields
func (*ParameterOption[_]) GetValueAsAny ¶
func (p *ParameterOption[_]) GetValueAsAny() any
Get the parameter's value
func (*ParameterOption[_]) String ¶
func (p *ParameterOption[_]) String() string
Get the parameter option's value as a string
type ParameterOptionCommon ¶
type ParameterOptionCommon struct { // The option's human-readable name, to be used in config displays Name string // A description signifying what this option means Description string }
Common fields across all ParameterOption instances
type PrometheusConfig ¶
type PrometheusConfig struct { // The port to serve metrics on Port Parameter[uint16] // Toggle for forwarding the API port outside of Docker OpenPort Parameter[RpcPortMode] // The Docker Hub tag for Prometheus ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Prometheus
func NewPrometheusConfig ¶
func NewPrometheusConfig() *PrometheusConfig
Generates a new Prometheus config
func (*PrometheusConfig) GetParameters ¶
func (cfg *PrometheusConfig) GetParameters() []IParameter
Get the parameters for this config
func (*PrometheusConfig) GetSubconfigs ¶
func (cfg *PrometheusConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*PrometheusConfig) GetTitle ¶
func (cfg *PrometheusConfig) GetTitle() string
The title for the config
type PrysmBnConfig ¶
type PrysmBnConfig struct { // The max number of P2P peers to connect to MaxPeers Parameter[uint16] // The RPC port for BN / VC connections RpcPort Parameter[uint16] // Toggle for forwarding the RPC API outside of Docker OpenRpcPort Parameter[RpcPortMode] // The Docker Hub tag for the Prysm BN ContainerTag Parameter[string] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for the Prysm BN
func NewPrysmBnConfig ¶
func NewPrysmBnConfig() *PrysmBnConfig
Generates a new Prysm BN configuration
func (*PrysmBnConfig) GetParameters ¶
func (cfg *PrysmBnConfig) GetParameters() []IParameter
Get the parameters for this config
func (*PrysmBnConfig) GetSubconfigs ¶
func (cfg *PrysmBnConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*PrysmBnConfig) GetTitle ¶
func (cfg *PrysmBnConfig) GetTitle() string
The title for the config
type PrysmVcConfig ¶
type PrysmVcConfig struct { // The Docker Hub tag for the Prysm BN ContainerTag Parameter[string] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for the Prysm VC
func NewPrysmVcConfig ¶
func NewPrysmVcConfig() *PrysmVcConfig
Generates a new Prysm VC configuration
func (*PrysmVcConfig) GetParameters ¶
func (cfg *PrysmVcConfig) GetParameters() []IParameter
Get the parameters for this config
func (*PrysmVcConfig) GetSubconfigs ¶
func (cfg *PrysmVcConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*PrysmVcConfig) GetTitle ¶
func (cfg *PrysmVcConfig) GetTitle() string
The title for the config
type RethConfig ¶ added in v0.2.0
type RethConfig struct { // Size of Reth's Cache CacheSize Parameter[uint64] // Max number of P2P peers that can connect to this node MaxInboundPeers Parameter[uint16] // Max number of P2P peers to this node can connect to MaxOutboundPeers Parameter[uint16] // The Docker Hub tag for Reth ContainerTag Parameter[string] // Custom command line flags AdditionalFlags Parameter[string] }
Configuration for Reth
func NewRethConfig ¶ added in v0.2.0
func NewRethConfig() *RethConfig
Generates a new Reth configuration
func (*RethConfig) GetParameters ¶ added in v0.2.0
func (cfg *RethConfig) GetParameters() []IParameter
Get the config.Parameters for this config
func (*RethConfig) GetSubconfigs ¶ added in v0.2.0
func (cfg *RethConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*RethConfig) GetTitle ¶ added in v0.2.0
func (cfg *RethConfig) GetTitle() string
Get the title for the config
type RpcPortMode ¶
type RpcPortMode string
How to expose the RPC ports
const ( // Do not allow any connections to the RPC port RpcPortMode_Closed RpcPortMode = "closed" // Allow connections from the same host RpcPortMode_OpenLocalhost RpcPortMode = "localhost" // Allow connections from external hosts RpcPortMode_OpenExternal RpcPortMode = "external" )
Enum to describe the mode for the RPC port exposure setting
func (RpcPortMode) DockerPortMapping ¶
func (m RpcPortMode) DockerPortMapping(port uint16) string
Creates the appropriate Docker config string for the provided port, based on the port mode
func (RpcPortMode) IsOpen ¶
func (m RpcPortMode) IsOpen() bool
True if the port is open locally or externally
type TekuBnConfig ¶
type TekuBnConfig struct { // Max number of P2P peers to connect to JvmHeapSize Parameter[uint64] // The max number of P2P peers to connect to MaxPeers Parameter[uint16] // The archive mode flag ArchiveMode Parameter[bool] // The Docker Hub tag for the Teku BN ContainerTag Parameter[string] // Custom command line flags for the BN AdditionalFlags Parameter[string] }
Configuration for Teku
func (*TekuBnConfig) GetParameters ¶
func (cfg *TekuBnConfig) GetParameters() []IParameter
Get the parameters for this config
func (*TekuBnConfig) GetSubconfigs ¶
func (cfg *TekuBnConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*TekuBnConfig) GetTitle ¶
func (cfg *TekuBnConfig) GetTitle() string
Get the title for the config
type TekuVcConfig ¶
type TekuVcConfig struct { // The use slashing protection flag UseSlashingProtection Parameter[bool] // The Docker Hub tag for the Teku VC ContainerTag Parameter[string] // Custom command line flags for the VC AdditionalFlags Parameter[string] }
Configuration for Teku
func (*TekuVcConfig) GetParameters ¶
func (cfg *TekuVcConfig) GetParameters() []IParameter
Get the parameters for this config
func (*TekuVcConfig) GetSubconfigs ¶
func (cfg *TekuVcConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*TekuVcConfig) GetTitle ¶
func (cfg *TekuVcConfig) GetTitle() string
Get the title for the config
type ValidatorClientCommonConfig ¶
type ValidatorClientCommonConfig struct { // Custom proposal graffiti Graffiti Parameter[string] // Toggle for enabling doppelganger detection DoppelgangerDetection Parameter[bool] // The port to expose VC metrics on MetricsPort Parameter[uint16] }
Common configuration for all validator clients
func NewValidatorClientCommonConfig ¶
func NewValidatorClientCommonConfig() *ValidatorClientCommonConfig
Generates a new common VC configuration
func (*ValidatorClientCommonConfig) GetParameters ¶
func (cfg *ValidatorClientCommonConfig) GetParameters() []IParameter
Get the parameters for this config
func (*ValidatorClientCommonConfig) GetSubconfigs ¶
func (cfg *ValidatorClientCommonConfig) GetSubconfigs() map[string]IConfigSection
Get the sections underneath this one
func (*ValidatorClientCommonConfig) GetTitle ¶
func (cfg *ValidatorClientCommonConfig) GetTitle() string
Get the title for the config
Source Files ¶
- besu-config.go
- bitfly-beaconchain-config.go
- cfg-section.go
- changed-setting.go
- changes.go
- enums.go
- exporter-config.go
- external-beacon-config.go
- external-execution-config.go
- fallback-config.go
- geth-config.go
- grafana-config.go
- iconfig.go
- lighthouse-bn-config.go
- lighthouse-vc-config.go
- local-beacon-config.go
- local-execution-config.go
- lodestar-bn-config.go
- lodestar-vc-config.go
- logger-config.go
- metrics-config.go
- nethermind-config.go
- network-resources.go
- nimbus-bn-config.go
- nimbus-vc-config.go
- parameter-option.go
- parameter.go
- prometheus-config.go
- prysm-bn-config.go
- prysm-vc-config.go
- reth-config.go
- teku-bn-config.go
- teku-vc-config.go
- utils.go
- vc-common-config.go