config

package
v2.0.0-dev2.0...-efbdfda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: GPL-3.0 Imports: 22 Imported by: 26

Documentation

Index

Constants

View Source
const (
	// Container name overrides
	NodeSuffix            string = "node"
	ExecutionClientSuffix string = "eth1"
	BeaconNodeSuffix      string = "eth2"
	ValidatorClientSuffix string = "validator"
)
View Source
const (
	ContainerID_Alertmanager     config.ContainerID = "alertmanager"
	ContainerID_EcMigrator       config.ContainerID = "ec_migrator"
	ContainerID_PruneProvisioner config.ContainerID = "prune_provisioner"
	ContainerID_PruneStarter     config.ContainerID = "nm_prune_starter"

	// Rocket Pool networks
	Network_Devnet config.Network = "devnet"
)
View Source
const (
	RegulatedRelayDescription   string = "Select this to enable the relays that comply with government regulations (e.g. OFAC sanctions), "
	UnregulatedRelayDescription string = "Select this to enable the relays that do not follow any sanctions lists (do not censor transactions), "
	NoSandwichRelayDescription  string = "and do not allow front-running or sandwich attacks."
	AllMevRelayDescription      string = "and allow for all types of MEV (including sandwich attacks)."
)

Constants

View Source
const (
	// Watchtower
	WatchtowerMaxFeeDefault      uint64 = 200
	WatchtowerPriorityFeeDefault uint64 = 3

	// Daemon
	EventLogInterval               int    = 1000
	SmartNodeDaemonBaseRoute       string = "rocketpool"
	SmartNodeApiVersion            string = "1"
	SmartNodeApiClientRoute        string = SmartNodeDaemonBaseRoute + "/api/v" + SmartNodeApiVersion
	SmartNodeCliSocketFilename     string = "rocketpool-cli.sock"
	SmartNodeNetworkSocketFilename string = "rocketpool-net.sock"
	ConfigFilename                 string = "user-settings.yml"

	// Wallet
	UserAddressFilename       string = "address"
	UserWalletDataFilename    string = "wallet"
	UserNextAccountFilename   string = "next_account"
	UserPasswordFilename      string = "password"
	ValidatorsFolderName      string = "validators"
	CustomKeysFolderName      string = "custom-keys"
	CustomKeyPasswordFilename string = "custom-key-passwords"

	// Scripts
	EcStartScript       string = "start-ec.sh"
	BnStartScript       string = "start-bn.sh"
	VcStartScript       string = "start-vc.sh"
	MevBoostStartScript string = "start-mev-boost.sh"

	// HTTP
	ClientTimeout time.Duration = 8 * time.Second

	// Volumes
	ExecutionClientDataVolume string = "eth1clientdata"
	BeaconNodeDataVolume      string = "eth2clientdata"
	AlertmanagerDataVolume    string = "alertmanager-data"
	PrometheusDataVolume      string = "prometheus-data"

	// Smart Node
	AddonsFolderName                   string = "addons"
	NativeScriptsFolderName            string = "native"
	ChecksumTableFilename              string = "checksums.sha384"
	RewardsTreeIpfsExtension           string = ".zst"
	RewardsTreeFilenameFormat          string = "rp-rewards-%s-%d.json"
	VotingFolder                       string = "voting"
	RecordsFolder                      string = "records"
	RewardsTreesFolder                 string = "rewards-trees"
	PrimaryRewardsFileUrl              string = "https://%s.ipfs.dweb.link/%s"
	SecondaryRewardsFileUrl            string = "https://ipfs.io/ipfs/%s/%s"
	GithubRewardsFileUrl               string = "https://github.com/rocket-pool/rewards-trees/raw/main/%s/%s"
	WatchtowerFolder                   string = "watchtower"
	RegenerateRewardsTreeRequestSuffix string = ".request"
	RegenerateRewardsTreeRequestFormat string = "%d" + RegenerateRewardsTreeRequestSuffix
	FeeRecipientFilename               string = "rp-fee-recipient.txt"
	MinipoolPerformanceFilenameFormat  string = "rp-minipool-performance-%s-%d.json"

	// Snapshot
	SnapshotID string = "rocketpool-dao.eth"

	// Utility Containers
	PruneProvisionerTag string = "rocketpool/eth1-prune-provision:v0.0.1"
	EcMigratorTag       string = "rocketpool/ec-migrator:v1.0.0"

	// Logging
	LogDir            string = "logs"
	ApiLogName        string = "api.log"
	TasksLogName      string = "tasks.log"
	WatchtowerLogName string = "watchtower.log"
)

Variables

This section is empty.

Functions

func GetContainerName

func GetContainerName(id config.ContainerID) string

func NewLocalBeaconConfig

func NewLocalBeaconConfig() *config.LocalBeaconConfig

Create a new LocalBeaconConfig struct

func NewLocalExecutionConfig

func NewLocalExecutionConfig() *config.LocalExecutionConfig

Create a new LocalExecutionConfig struct

Types

type AddonsConfig

type AddonsConfig struct {
	GraffitiWallWriter *gww.GraffitiWallWriterConfig
	RescueNode         *rn.RescueNodeConfig
}

func NewAddonsConfig

func NewAddonsConfig() *AddonsConfig

Generates a new addons config

func (*AddonsConfig) GetParameters

func (cfg *AddonsConfig) GetParameters() []config.IParameter

Get the parameters for this config

func (*AddonsConfig) GetSubconfigs

func (cfg *AddonsConfig) GetSubconfigs() map[string]config.IConfigSection

Get the sections underneath this one

func (*AddonsConfig) GetTitle

func (cfg *AddonsConfig) GetTitle() string

The title for the config

type AlertmanagerConfig

type AlertmanagerConfig struct {
	// Whether alerting is enabled
	EnableAlerting config.Parameter[bool]

	// Port for alertmanager UI & API
	Port config.Parameter[uint16]

	// Host for alertmanager UI & API. ONLY USED IN NATIVE MODE. In Docker, the host is derived from the container name.
	NativeModeHost config.Parameter[string]

	// Port for alertmanager UI & API. ONLY USED IN NATIVE MODE. In Docker, the host is derived from the container.
	NativeModePort config.Parameter[uint16]

	// Toggle for forwarding the API port outside of Docker; useful for ability to silence alerts
	OpenPort config.Parameter[config.RpcPortMode]

	// The Docker Hub tag for Alertmanager
	ContainerTag config.Parameter[string]

	// The Discord webhook URL for alert notifications
	DiscordWebhookUrl config.Parameter[string]

	// Alerts configured in prometheus rule configuration file:
	AlertEnabled_ClientSyncStatusBeacon    config.Parameter[bool]
	AlertEnabled_ClientSyncStatusExecution config.Parameter[bool]
	AlertEnabled_UpcomingSyncCommittee     config.Parameter[bool]
	AlertEnabled_ActiveSyncCommittee       config.Parameter[bool]
	AlertEnabled_UpcomingProposal          config.Parameter[bool]
	AlertEnabled_RecentProposal            config.Parameter[bool]
	AlertEnabled_LowDiskSpaceWarning       config.Parameter[bool]
	AlertEnabled_LowDiskSpaceCritical      config.Parameter[bool]
	AlertEnabled_OSUpdatesAvailable        config.Parameter[bool]
	AlertEnabled_RPUpdatesAvailable        config.Parameter[bool]
	// Alerts manually sent in alerting.go:
	AlertEnabled_FeeRecipientChanged         config.Parameter[bool]
	AlertEnabled_MinipoolBondReduced         config.Parameter[bool]
	AlertEnabled_MinipoolBalanceDistributed  config.Parameter[bool]
	AlertEnabled_MinipoolPromoted            config.Parameter[bool]
	AlertEnabled_MinipoolStaked              config.Parameter[bool]
	AlertEnabled_ExecutionClientSyncComplete config.Parameter[bool]
	AlertEnabled_BeaconClientSyncComplete    config.Parameter[bool]
}

Configuration for Alertmanager

func NewAlertmanagerConfig

func NewAlertmanagerConfig() *AlertmanagerConfig

func (*AlertmanagerConfig) GetOpenPorts

func (cfg *AlertmanagerConfig) GetOpenPorts() string

Used by text/template to format alertmanager.yml

func (*AlertmanagerConfig) GetParameters

func (cfg *AlertmanagerConfig) GetParameters() []config.IParameter

Get the parameters for this config

func (*AlertmanagerConfig) GetSubconfigs

func (cfg *AlertmanagerConfig) GetSubconfigs() map[string]config.IConfigSection

Get the sections underneath this one

func (*AlertmanagerConfig) GetTitle

func (cfg *AlertmanagerConfig) GetTitle() string

The title for the config

type MetricsConfig

type MetricsConfig struct {
	*config.MetricsConfig
	EnableOdaoMetrics config.Parameter[bool]
}

func NewMetricsConfig

func NewMetricsConfig() *MetricsConfig

Generates a new metrics config

func (*MetricsConfig) GetParameters

func (cfg *MetricsConfig) GetParameters() []config.IParameter

Get the parameters for this config

func (*MetricsConfig) GetSubconfigs

func (cfg *MetricsConfig) GetSubconfigs() map[string]config.IConfigSection

Get the sections underneath this one

func (*MetricsConfig) GetTitle

func (cfg *MetricsConfig) GetTitle() string

The title for the config

type MevBoostConfig

type MevBoostConfig struct {
	// Toggle to enable / disable
	Enable config.Parameter[bool]

	// Ownership mode
	Mode config.Parameter[config.ClientMode]

	// The mode for relay selection
	SelectionMode config.Parameter[MevSelectionMode]

	// Regulated, all types
	EnableRegulatedAllMev config.Parameter[bool]

	// Unregulated, all types
	EnableUnregulatedAllMev config.Parameter[bool]

	// Flashbots relay
	FlashbotsRelay config.Parameter[bool]

	// bloXroute max profit relay
	BloxRouteMaxProfitRelay config.Parameter[bool]

	// bloXroute regulated relay
	BloxRouteRegulatedRelay config.Parameter[bool]

	// Eden relay
	EdenRelay config.Parameter[bool]

	// Ultra sound relay
	UltrasoundRelay config.Parameter[bool]

	// Aestus relay
	AestusRelay config.Parameter[bool]

	// The RPC port
	Port config.Parameter[uint16]

	// Toggle for forwarding the HTTP port outside of Docker
	OpenRpcPort config.Parameter[config.RpcPortMode]

	// The Docker Hub tag for MEV-Boost
	ContainerTag config.Parameter[string]

	// Custom command line flags
	AdditionalFlags config.Parameter[string]

	// The URL of an external MEV-Boost client
	ExternalUrl config.Parameter[string]
	// contains filtered or unexported fields
}

Configuration for MEV-Boost

func NewMevBoostConfig

func NewMevBoostConfig(parent *SmartNodeConfig) *MevBoostConfig

Generates a new MEV-Boost configuration

func (*MevBoostConfig) GetAvailableProfiles

func (cfg *MevBoostConfig) GetAvailableProfiles() (bool, bool)

Get the profiles that are available for the current network

func (*MevBoostConfig) GetAvailableRelays

func (cfg *MevBoostConfig) GetAvailableRelays() []MevRelay

Get the relays that are available for the current network

func (*MevBoostConfig) GetEnabledMevRelays

func (cfg *MevBoostConfig) GetEnabledMevRelays() []MevRelay

Get which MEV-boost relays are enabled

func (*MevBoostConfig) GetParameters

func (cfg *MevBoostConfig) GetParameters() []config.IParameter

Get the Parameters for this config

func (*MevBoostConfig) GetRelayString

func (cfg *MevBoostConfig) GetRelayString() string

func (*MevBoostConfig) GetSubconfigs

func (cfg *MevBoostConfig) GetSubconfigs() map[string]config.IConfigSection

Get the sections underneath this one

func (*MevBoostConfig) GetTitle

func (cfg *MevBoostConfig) GetTitle() string

The title for the config

type MevRelay

type MevRelay struct {
	ID          MevRelayID
	Name        string
	Description string
	Urls        map[config.Network]string
	Regulated   bool
}

A MEV relay

type MevRelayID

type MevRelayID string
const (
	MevRelayID_Unknown            MevRelayID = ""
	MevRelayID_Flashbots          MevRelayID = "flashbots"
	MevRelayID_BloxrouteEthical   MevRelayID = "bloxrouteEthical"
	MevRelayID_BloxrouteMaxProfit MevRelayID = "bloxrouteMaxProfit"
	MevRelayID_BloxrouteRegulated MevRelayID = "bloxrouteRegulated"
	MevRelayID_Eden               MevRelayID = "eden"
	MevRelayID_Ultrasound         MevRelayID = "ultrasound"
	MevRelayID_Aestus             MevRelayID = "aestus"
)

Enum to identify MEV-boost relays

type MevSelectionMode

type MevSelectionMode string
const (
	MevSelectionMode_Profile MevSelectionMode = "profile"
	MevSelectionMode_Relay   MevSelectionMode = "relay"
)

Enum to describe MEV-Boost relay selection mode

type RewardsMode

type RewardsMode string
const (
	RewardsMode_Unknown  RewardsMode = ""
	RewardsMode_Download RewardsMode = "download"
	RewardsMode_Generate RewardsMode = "generate"
)

Enum to describe the rewards tree acquisition modes

type RocketPoolResources

type RocketPoolResources struct {
	*config.NetworkResources

	// The URL to use for staking rETH
	StakeUrl string

	// The contract address of RocketStorage
	StorageAddress common.Address

	// The contract address of rETH
	RethAddress common.Address

	// The contract address of the RPL token
	RplTokenAddress common.Address

	// The contract address of rocketRewardsPool from v1.0.0
	V1_0_0_RewardsPoolAddress *common.Address

	// The contract address of rocketClaimNode from v1.0.0
	V1_0_0_ClaimNodeAddress *common.Address

	// The contract address of rocketClaimTrustedNode from v1.0.0
	V1_0_0_ClaimTrustedNodeAddress *common.Address

	// The contract address of rocketMinipoolManager from v1.0.0
	V1_0_0_MinipoolManagerAddress *common.Address

	// The contract address of rocketNetworkPrices from v1.1.0
	V1_1_0_NetworkPricesAddress *common.Address

	// The contract address of rocketNodeStaking from v1.1.0
	V1_1_0_NodeStakingAddress *common.Address

	// The contract address of rocketNodeDeposit from v1.1.0
	V1_1_0_NodeDepositAddress *common.Address

	// The contract address of rocketMinipoolQueue from v1.1.0
	V1_1_0_MinipoolQueueAddress *common.Address

	// The contract address of rocketMinipoolFactory from v1.1.0
	V1_1_0_MinipoolFactoryAddress *common.Address

	// The contract address for Snapshot delegation
	SnapshotDelegationAddress *common.Address

	// The Snapshot API domain
	SnapshotApiDomain string

	// Addresses for RocketRewardsPool that have been upgraded during development
	PreviousRewardsPoolAddresses []common.Address

	// Addresses for RocketDAOProtocolVerifier that have been upgraded during development
	PreviousProtocolDaoVerifierAddresses []common.Address

	// Addresses for RocketNetworkPrices that have been upgraded during development
	PreviousRocketNetworkPricesAddresses []common.Address

	// Addresses for RocketNetworkBalances that have been upgraded during development
	PreviousRocketNetworkBalancesAddresses []common.Address

	// The RocketOvmPriceMessenger Optimism address for each network
	OptimismPriceMessengerAddress *common.Address

	// The RocketPolygonPriceMessenger Polygon address for each network
	PolygonPriceMessengerAddress *common.Address

	// The RocketArbitumPriceMessenger Arbitrum address for each network
	ArbitrumPriceMessengerAddress *common.Address

	// The RocketArbitumPriceMessengerV2 Arbitrum address for each network
	ArbitrumPriceMessengerAddressV2 *common.Address

	// The RocketZkSyncPriceMessenger zkSyncEra address for each network
	ZkSyncEraPriceMessengerAddress *common.Address

	// The RocketBasePriceMessenger Base address for each network
	BasePriceMessengerAddress *common.Address

	// The RocketScrollPriceMessenger Scroll address for each network
	ScrollPriceMessengerAddress *common.Address

	// The Scroll L2 message fee estimator address for each network
	ScrollFeeEstimatorAddress *common.Address

	// The UniswapV3 pool address for each network (used for RPL price TWAP info)
	RplTwapPoolAddress *common.Address
}

A collection of network-specific resources and getters for them

type SmartNodeConfig

type SmartNodeConfig struct {
	// Smart Node settings
	Network                       config.Parameter[config.Network]
	ClientMode                    config.Parameter[config.ClientMode]
	ProjectName                   config.Parameter[string]
	UserDataPath                  config.Parameter[string]
	WatchtowerStatePath           config.Parameter[string]
	AutoTxMaxFee                  config.Parameter[float64]
	MaxPriorityFee                config.Parameter[float64]
	AutoTxGasThreshold            config.Parameter[float64]
	DistributeThreshold           config.Parameter[float64]
	RewardsTreeMode               config.Parameter[RewardsMode]
	RewardsTreeCustomUrl          config.Parameter[string]
	ArchiveEcUrl                  config.Parameter[string]
	WatchtowerMaxFeeOverride      config.Parameter[float64]
	WatchtowerPriorityFeeOverride config.Parameter[float64]
	UseRollingRecords             config.Parameter[bool]
	RecordCheckpointInterval      config.Parameter[uint64]
	CheckpointRetentionLimit      config.Parameter[uint64]
	RecordsPath                   config.Parameter[string]
	VerifyProposals               config.Parameter[bool]

	// Logging
	Logging *config.LoggerConfig

	// Execution client settings
	LocalExecutionClient    *config.LocalExecutionConfig
	ExternalExecutionClient *config.ExternalExecutionConfig

	// Beacon node settings
	LocalBeaconClient    *config.LocalBeaconConfig
	ExternalBeaconClient *config.ExternalBeaconConfig

	// Fallback clients
	Fallback *config.FallbackConfig

	// Validator client settings
	ValidatorClient *ValidatorClientConfig

	// Metrics
	Metrics *MetricsConfig

	// Notifications
	Alertmanager *AlertmanagerConfig

	// MEV-Boost
	MevBoost *MevBoostConfig

	// Addons
	Addons *AddonsConfig

	// Internal fields
	Version string

	IsNativeMode bool
	// contains filtered or unexported fields
}

The master configuration struct

func LoadFromFile

func LoadFromFile(path string) (*SmartNodeConfig, error)

Load configuration settings from a file

func NewSmartNodeConfig

func NewSmartNodeConfig(rpDir string, isNativeMode bool) *SmartNodeConfig

Creates a new Smart Node configuration instance

func (*SmartNodeConfig) AlertmanagerContainerName

func (c *SmartNodeConfig) AlertmanagerContainerName() string

func (*SmartNodeConfig) AlertmanagerDataVolume

func (c *SmartNodeConfig) AlertmanagerDataVolume() string

func (*SmartNodeConfig) AutoTxGasThresholdInt

func (cfg *SmartNodeConfig) AutoTxGasThresholdInt() uint64

func (*SmartNodeConfig) AutoTxMaxFeeInt

func (cfg *SmartNodeConfig) AutoTxMaxFeeInt() uint64

func (*SmartNodeConfig) BeaconNodeContainerName

func (c *SmartNodeConfig) BeaconNodeContainerName() string

func (*SmartNodeConfig) BeaconNodeDataVolume

func (c *SmartNodeConfig) BeaconNodeDataVolume() string

func (*SmartNodeConfig) BnHttpUrl

func (cfg *SmartNodeConfig) BnHttpUrl() (string, error)

func (*SmartNodeConfig) BnRpcUrl

func (cfg *SmartNodeConfig) BnRpcUrl() (string, error)

func (*SmartNodeConfig) ChangeNetwork

func (cfg *SmartNodeConfig) ChangeNetwork(newNetwork config.Network)

Changes the current network, propagating new parameter settings if they are affected

func (*SmartNodeConfig) CreateCopy

func (cfg *SmartNodeConfig) CreateCopy() *SmartNodeConfig

Create a copy of this configuration.

func (*SmartNodeConfig) CustomGraffiti

func (cfg *SmartNodeConfig) CustomGraffiti() string

Used by text/template to format validator.yml Only returns the user-entered value, not the prefixed value

func (*SmartNodeConfig) DaemonContainerName

func (c *SmartNodeConfig) DaemonContainerName() string

func (*SmartNodeConfig) Deserialize

func (cfg *SmartNodeConfig) Deserialize(masterMap map[string]any) error

Deserializes a settings file into this config

func (*SmartNodeConfig) ExecutionClientContainerName

func (c *SmartNodeConfig) ExecutionClientContainerName() string

func (*SmartNodeConfig) ExecutionClientDataVolume

func (c *SmartNodeConfig) ExecutionClientDataVolume() string

func (*SmartNodeConfig) ExporterContainerName

func (c *SmartNodeConfig) ExporterContainerName() string

func (*SmartNodeConfig) FallbackBnHttpUrl

func (cfg *SmartNodeConfig) FallbackBnHttpUrl() string

func (*SmartNodeConfig) FallbackBnRpcUrl

func (cfg *SmartNodeConfig) FallbackBnRpcUrl() string

func (*SmartNodeConfig) FeeRecipientFile

func (cfg *SmartNodeConfig) FeeRecipientFile() string

Used by text/template to format validator.yml

func (*SmartNodeConfig) GetAddonsFolderPath

func (cfg *SmartNodeConfig) GetAddonsFolderPath() string

func (*SmartNodeConfig) GetApiLogFilePath

func (cfg *SmartNodeConfig) GetApiLogFilePath() string

func (*SmartNodeConfig) GetBeaconHostname

func (cfg *SmartNodeConfig) GetBeaconHostname() (string, error)

Gets the hostname portion of the Beacon Node's URI. Used by text/template to format prometheus.yml.

func (*SmartNodeConfig) GetBeaconNodeUrls

func (cfg *SmartNodeConfig) GetBeaconNodeUrls() (string, string)

func (*SmartNodeConfig) GetBnAdditionalFlags

func (cfg *SmartNodeConfig) GetBnAdditionalFlags() (string, error)

Used by text/template to format bn.yml

func (*SmartNodeConfig) GetBnContainerTag

func (cfg *SmartNodeConfig) GetBnContainerTag() (string, error)

Gets the tag of the bn container Used by text/template to format bn.yml

func (*SmartNodeConfig) GetBnHttpEndpoint

func (cfg *SmartNodeConfig) GetBnHttpEndpoint() string

Get the HTTP API endpoint for the provided BN

func (*SmartNodeConfig) GetBnHttpEndpointsWithFallback

func (cfg *SmartNodeConfig) GetBnHttpEndpointsWithFallback() string

Get the endpoints of the BN, including the fallback if applicable

func (*SmartNodeConfig) GetBnMaxPeers

func (cfg *SmartNodeConfig) GetBnMaxPeers() (uint16, error)

Gets the max peers of the bn container Used by text/template to format bn.yml

func (*SmartNodeConfig) GetBnOpenPorts

func (cfg *SmartNodeConfig) GetBnOpenPorts() []string

Used by text/template to format bn.yml

func (*SmartNodeConfig) GetBnStartScript

func (cfg *SmartNodeConfig) GetBnStartScript() string

Gets the name of the Beacon Node start script

func (*SmartNodeConfig) GetChanges

func (cfg *SmartNodeConfig) GetChanges(oldConfig *SmartNodeConfig) ([]*config.ChangedSection, map[config.ContainerID]bool, bool)

Get all of the settings that have changed between an old config and this config, and get all of the containers that are affected by those changes - also returns whether or not the selected network was changed

func (*SmartNodeConfig) GetCustomKeyPasswordFilePath

func (cfg *SmartNodeConfig) GetCustomKeyPasswordFilePath() string

func (*SmartNodeConfig) GetCustomKeyPath

func (cfg *SmartNodeConfig) GetCustomKeyPath() string

func (*SmartNodeConfig) GetDockerArtifactName

func (cfg *SmartNodeConfig) GetDockerArtifactName(entity string) string

Gets the full name of the Docker container or volume with the provided suffix (name minus the project ID prefix)

func (*SmartNodeConfig) GetEcAdditionalFlags

func (cfg *SmartNodeConfig) GetEcAdditionalFlags() (string, error)

Used by text/template to format ec.yml

func (*SmartNodeConfig) GetEcContainerTag

func (cfg *SmartNodeConfig) GetEcContainerTag() (string, error)

Gets the tag of the ec container Used by text/template to format ec.yml

func (*SmartNodeConfig) GetEcHttpEndpoint

func (cfg *SmartNodeConfig) GetEcHttpEndpoint() string

Used by text/template to format bn.yml

func (*SmartNodeConfig) GetEcHttpEndpointsWithFallback

func (cfg *SmartNodeConfig) GetEcHttpEndpointsWithFallback() string

Get the endpoints of the EC, including the fallback if applicable

func (*SmartNodeConfig) GetEcMaxPeers

func (cfg *SmartNodeConfig) GetEcMaxPeers() (uint16, error)

Gets the max peers of the ec container Used by text/template to format ec.yml

func (*SmartNodeConfig) GetEcOpenApiPorts

func (cfg *SmartNodeConfig) GetEcOpenApiPorts() string

Gets the port mapping of the ec container Used by text/template to format ec.yml

func (*SmartNodeConfig) GetEcStartScript

func (cfg *SmartNodeConfig) GetEcStartScript() string

Gets the name of the Execution Client start script

func (*SmartNodeConfig) GetEcWsEndpoint

func (cfg *SmartNodeConfig) GetEcWsEndpoint() string

Used by text/template to format bn.yml

func (*SmartNodeConfig) GetExecutionClientUrls

func (cfg *SmartNodeConfig) GetExecutionClientUrls() (string, string)

func (*SmartNodeConfig) GetExecutionHostname

func (cfg *SmartNodeConfig) GetExecutionHostname() (string, error)

Gets the hostname portion of the Execution Client's URI. Used by text/template to format prometheus.yml.

func (*SmartNodeConfig) GetExporterAdditionalFlags

func (cfg *SmartNodeConfig) GetExporterAdditionalFlags() []string

Used by text/template to format exporter.yml

func (*SmartNodeConfig) GetExternalIP

func (cfg *SmartNodeConfig) GetExternalIP() string

Used by text/template to format ec.yml

func (*SmartNodeConfig) GetFeeRecipientFilePath

func (cfg *SmartNodeConfig) GetFeeRecipientFilePath() string

func (*SmartNodeConfig) GetGwwGraffitiFilePath

func (cfg *SmartNodeConfig) GetGwwGraffitiFilePath() string

func (*SmartNodeConfig) GetGwwPath

func (cfg *SmartNodeConfig) GetGwwPath() string

func (*SmartNodeConfig) GetLoggerOptions

func (cfg *SmartNodeConfig) GetLoggerOptions() log.LoggerOptions

func (*SmartNodeConfig) GetMevBoostOpenPorts

func (cfg *SmartNodeConfig) GetMevBoostOpenPorts() string

Used by text/template to format mev-boost.yml

func (*SmartNodeConfig) GetMevBoostStartScript

func (cfg *SmartNodeConfig) GetMevBoostStartScript() string

Gets the name of the MEV-Boost start script

func (*SmartNodeConfig) GetMinipoolPerformancePath

func (cfg *SmartNodeConfig) GetMinipoolPerformancePath(interval uint64) string

func (*SmartNodeConfig) GetNetworkResources

func (cfg *SmartNodeConfig) GetNetworkResources() *config.NetworkResources

func (*SmartNodeConfig) GetNextAccountFilePath

func (cfg *SmartNodeConfig) GetNextAccountFilePath() string

func (*SmartNodeConfig) GetNodeAddressFilePath

func (cfg *SmartNodeConfig) GetNodeAddressFilePath() string

func (*SmartNodeConfig) GetNodeAddressPath

func (cfg *SmartNodeConfig) GetNodeAddressPath() string

func (*SmartNodeConfig) GetParameters

func (cfg *SmartNodeConfig) GetParameters() []config.IParameter

Get the config.Parameters for this config

func (*SmartNodeConfig) GetPasswordFilePath

func (cfg *SmartNodeConfig) GetPasswordFilePath() string

func (*SmartNodeConfig) GetPasswordPath

func (cfg *SmartNodeConfig) GetPasswordPath() string

func (*SmartNodeConfig) GetPrometheusAdditionalFlags

func (cfg *SmartNodeConfig) GetPrometheusAdditionalFlags() []string

Used by text/template to format prometheus.yml

func (*SmartNodeConfig) GetPrometheusOpenPorts

func (cfg *SmartNodeConfig) GetPrometheusOpenPorts() string

Used by text/template to format prometheus.yml

func (*SmartNodeConfig) GetRecordsPath

func (cfg *SmartNodeConfig) GetRecordsPath() string

func (*SmartNodeConfig) GetRegenerateRewardsTreeRequestPath

func (cfg *SmartNodeConfig) GetRegenerateRewardsTreeRequestPath(interval uint64) string

func (*SmartNodeConfig) GetRewardsTreePath

func (cfg *SmartNodeConfig) GetRewardsTreePath(interval uint64) string

func (*SmartNodeConfig) GetRocketPoolResources

func (cfg *SmartNodeConfig) GetRocketPoolResources() *RocketPoolResources

func (*SmartNodeConfig) GetSelectedBeaconNode

func (cfg *SmartNodeConfig) GetSelectedBeaconNode() config.BeaconNode

Get the selected Beacon Node

func (*SmartNodeConfig) GetSelectedExecutionClient

func (cfg *SmartNodeConfig) GetSelectedExecutionClient() config.ExecutionClient

Get the selected Beacon Node

func (*SmartNodeConfig) GetSmartNodeContainerTag

func (cfg *SmartNodeConfig) GetSmartNodeContainerTag() string

func (*SmartNodeConfig) GetSubconfigs

func (cfg *SmartNodeConfig) GetSubconfigs() map[string]config.IConfigSection

Get the subconfigurations for this config

func (*SmartNodeConfig) GetTasksLogFilePath

func (cfg *SmartNodeConfig) GetTasksLogFilePath() string

func (*SmartNodeConfig) GetTitle

func (cfg *SmartNodeConfig) GetTitle() string

Get the title for this config

func (*SmartNodeConfig) GetValidatorsFolderPath

func (cfg *SmartNodeConfig) GetValidatorsFolderPath() string

func (*SmartNodeConfig) GetVcAdditionalFlags

func (cfg *SmartNodeConfig) GetVcAdditionalFlags() string

Gets the additional flags of the selected VC

func (*SmartNodeConfig) GetVcContainerTag

func (cfg *SmartNodeConfig) GetVcContainerTag() string

Gets the tag of the VC container

func (*SmartNodeConfig) GetVcStartScript

func (cfg *SmartNodeConfig) GetVcStartScript() string

Gets the name of the Validator Client start script

func (*SmartNodeConfig) GetVotingPath

func (cfg *SmartNodeConfig) GetVotingPath() string

func (*SmartNodeConfig) GetVotingSnapshotID

func (cfg *SmartNodeConfig) GetVotingSnapshotID() [32]byte

func (*SmartNodeConfig) GetWalletFilePath

func (cfg *SmartNodeConfig) GetWalletFilePath() string

func (*SmartNodeConfig) GetWalletPath

func (cfg *SmartNodeConfig) GetWalletPath() string

func (*SmartNodeConfig) GetWatchtowerFolder

func (cfg *SmartNodeConfig) GetWatchtowerFolder() string

func (*SmartNodeConfig) GetWatchtowerLogFilePath

func (cfg *SmartNodeConfig) GetWatchtowerLogFilePath() string

func (*SmartNodeConfig) GrafanaContainerName

func (c *SmartNodeConfig) GrafanaContainerName() string

func (*SmartNodeConfig) Graffiti

func (cfg *SmartNodeConfig) Graffiti() (string, error)

Used by text/template to format validator.yml

func (*SmartNodeConfig) GraffitiPrefix

func (cfg *SmartNodeConfig) GraffitiPrefix() string

Used by text/template to format validator.yml Only returns the the prefix

func (*SmartNodeConfig) IsDoppelgangerEnabled

func (cfg *SmartNodeConfig) IsDoppelgangerEnabled() bool

Check if doppelganger detection is enabled

func (*SmartNodeConfig) IsLocalMode

func (cfg *SmartNodeConfig) IsLocalMode() bool

Used by text/template to format bn.yml

func (*SmartNodeConfig) MevBoostContainerName

func (c *SmartNodeConfig) MevBoostContainerName() string

func (*SmartNodeConfig) MevBoostUrl

func (cfg *SmartNodeConfig) MevBoostUrl() string

Used by text/template to format validator.yml

func (*SmartNodeConfig) PrometheusContainerName

func (c *SmartNodeConfig) PrometheusContainerName() string

func (*SmartNodeConfig) PrometheusDataVolume

func (c *SmartNodeConfig) PrometheusDataVolume() string

func (*SmartNodeConfig) RocketPoolDirectory

func (cfg *SmartNodeConfig) RocketPoolDirectory() string

func (*SmartNodeConfig) Serialize

func (cfg *SmartNodeConfig) Serialize() map[string]any

Serializes the configuration into a map of maps, compatible with a settings file

func (*SmartNodeConfig) UpdateDefaults

func (cfg *SmartNodeConfig) UpdateDefaults()

Updates the default parameters based on the current network value

func (*SmartNodeConfig) Validate

func (cfg *SmartNodeConfig) Validate() []string

Checks to see if the current configuration is valid; if not, returns a list of errors

func (*SmartNodeConfig) ValidatorClientContainerName

func (c *SmartNodeConfig) ValidatorClientContainerName() string

type ValidatorClientConfig

type ValidatorClientConfig struct {
	// The command for restarting the validator container in native mode
	NativeValidatorRestartCommand config.Parameter[string]

	// The command for stopping the validator container in native mode
	NativeValidatorStopCommand config.Parameter[string]

	// Subconfigs
	VcCommon   *config.ValidatorClientCommonConfig
	Lighthouse *config.LighthouseVcConfig
	Lodestar   *config.LodestarVcConfig
	Nimbus     *config.NimbusVcConfig
	Prysm      *config.PrysmVcConfig
	Teku       *config.TekuVcConfig
}

Configuration for the Validator Client

func NewValidatorClientConfig

func NewValidatorClientConfig(rocketPoolDirectory string) *ValidatorClientConfig

Generates a new Validator Client config

func (*ValidatorClientConfig) GetParameters

func (cfg *ValidatorClientConfig) GetParameters() []config.IParameter

Get the parameters for this config

func (*ValidatorClientConfig) GetSubconfigs

func (cfg *ValidatorClientConfig) GetSubconfigs() map[string]config.IConfigSection

Get the sections underneath this one

func (*ValidatorClientConfig) GetTitle

func (cfg *ValidatorClientConfig) GetTitle() string

The title for the config

func (*ValidatorClientConfig) GetVcAdditionalFlags

func (cfg *ValidatorClientConfig) GetVcAdditionalFlags(bn config.BeaconNode) string

Gets the additional flags of the selected VC

func (*ValidatorClientConfig) GetVcContainerTag

func (cfg *ValidatorClientConfig) GetVcContainerTag(bn config.BeaconNode) string

Gets the tag of the VC container

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL