config

package
v1.23.1-dev Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: GPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

View Source
const (
	PruningMode_HistoryExpiry        Mode = "historyExpiry"
	PruningMode_RollingHistoryExpiry Mode = "rollingHistoryExpiry"
	PruningMode_FullNode             Mode = "fullNode"
	PruningMode_Archive              Mode = "archive"

	// RollingHistoryBlockRetention is about one year of post-merge slots
	// (82125 epochs * 32 slots)
	RollingHistoryBlockRetention uint64 = 2628000
)

Enum to describe the mode for a client - local (Docker Mode) or external (Hybrid Mode)

Variables

This section is empty.

Functions

This section is empty.

Types

type APITokenScope added in v1.22.0

type APITokenScope string

APITokenScope controls whether Read routes may be called without a token. Write routes always require a write-scoped token. This is server policy, not the privilege of an individual token.

const (
	APITokenScope_All       APITokenScope = "all"       // Read and Write require a token
	APITokenScope_Sensitive APITokenScope = "sensitive" // unauthenticated reads; Write still requires a write token
)

type ChangedSetting

type ChangedSetting struct {
	Name               string
	OldValue           string
	NewValue           string
	AffectedContainers map[ContainerID]bool
}

A setting that has changed

type ClientTagSet added in v1.23.0

type ClientTagSet string

ClientTagSet selects production vs test Docker tags for execution/consensus clients. Image tag *values* stay in Go (they change with Smart Node releases); this flag is per-network.

const (
	ClientTagSetProduction ClientTagSet = "production"
	ClientTagSetTest       ClientTagSet = "test"
)

type Config

type Config interface {
	GetConfigTitle() string
	GetParameters() []*Parameter
}

type ConsensusClient

type ConsensusClient string
const (
	ConsensusClient_Unknown    ConsensusClient = ""
	ConsensusClient_Lighthouse ConsensusClient = "lighthouse"
	ConsensusClient_Lodestar   ConsensusClient = "lodestar"
	ConsensusClient_Nimbus     ConsensusClient = "nimbus"
	ConsensusClient_Prysm      ConsensusClient = "prysm"
	ConsensusClient_Teku       ConsensusClient = "teku"
)

Enum to describe the Consensus client options

type ConsensusConfig

type ConsensusConfig interface {
	GetBeaconNodeImage() string
	GetValidatorImage() string
	GetName() string
}

Interface for common Consensus configurations

type ContainerID

type ContainerID string
const (
	ContainerID_Unknown      ContainerID = ""
	ContainerID_Node         ContainerID = "node"
	ContainerID_Watchtower   ContainerID = "watchtower"
	ContainerID_Eth1         ContainerID = "eth1"
	ContainerID_Eth2         ContainerID = "eth2"
	ContainerID_Validator    ContainerID = "validator"
	ContainerID_Grafana      ContainerID = "grafana"
	ContainerID_Prometheus   ContainerID = "prometheus"
	ContainerID_Alertmanager ContainerID = "alertmanager"
	ContainerID_Exporter     ContainerID = "exporter"
	ContainerID_MevBoost     ContainerID = "mev-boost"
	ContainerID_CommitBoost  ContainerID = "commit-boost"
)

Enum to describe which container(s) a parameter impacts, so the Smart Node knows which ones to restart upon a settings change

type ExecutionClient

type ExecutionClient string
const (
	ExecutionClient_Unknown    ExecutionClient = ""
	ExecutionClient_Geth       ExecutionClient = "geth"
	ExecutionClient_Nethermind ExecutionClient = "nethermind"
	ExecutionClient_Besu       ExecutionClient = "besu"
	ExecutionClient_Reth       ExecutionClient = "reth"
	ExecutionClient_Erigon     ExecutionClient = "erigon"
)

Enum to describe the Execution client options

type ExternalConsensusConfig

type ExternalConsensusConfig interface {
	GetApiUrl() string
	GetSuggestedBlockGasLimit() string
}

Interface for External Consensus configurations

type LocalConsensusConfig

type LocalConsensusConfig interface {
	GetUnsupportedCommonParams() []string
}

Interface for Local Consensus configurations

type MevRelay added in v1.6.4

type MevRelay struct {
	ID          MevRelayID
	Name        string
	Description string
	Urls        UrlMap
	Regulated   bool
}

A MEV relay

type MevRelayID added in v1.7.0

type MevRelayID string
const (
	MevRelayID_Unknown            MevRelayID = ""
	MevRelayID_Flashbots          MevRelayID = "flashbots"
	MevRelayID_BloxrouteEthical   MevRelayID = "bloxrouteEthical"
	MevRelayID_BloxrouteRegulated MevRelayID = "bloxrouteRegulated"
	MevRelayID_Ultrasound         MevRelayID = "ultrasound"
	MevRelayID_UltrasoundFiltered MevRelayID = "ultrasoundFiltered"
	MevRelayID_Aestus             MevRelayID = "aestus"
	MevRelayID_TitanGlobal        MevRelayID = "titanGlobal"
	MevRelayID_TitanRegional      MevRelayID = "titanRegional"
	MevRelayID_BTCSOfac           MevRelayID = "btcsOfac"
)

Enum to identify MEV-boost relays

type MevSelectionMode added in v1.7.0

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

Enum to describe MEV-Boost relay selection mode

type Mode

type Mode string
const (
	Mode_Unknown  Mode = ""
	Mode_Local    Mode = "local"
	Mode_External Mode = "external"
)

Enum to describe the mode for a client - local (Docker Mode) or external (Hybrid Mode)

type Network

type Network string
const (
	Network_Unknown Network = ""
	Network_All     Network = "all" // Parameter.Default fallback only; never a selectable network
)

Enum to describe which network the system is on

type NetworkAddresses added in v1.23.0

type NetworkAddresses struct {
	Storage                  string   `yaml:"storage"`
	RocketSignerRegistry     string   `yaml:"rocketSignerRegistry"`
	RplToken                 string   `yaml:"rplToken"`
	Reth                     string   `yaml:"reth"`
	V1_0_0_RewardsPool       string   `yaml:"v1_0_0_RewardsPool"`
	V1_0_0_ClaimNode         string   `yaml:"v1_0_0_ClaimNode"`
	V1_0_0_ClaimTrustedNode  string   `yaml:"v1_0_0_ClaimTrustedNode"`
	V1_0_0_MinipoolManager   string   `yaml:"v1_0_0_MinipoolManager"`
	V1_1_0_NetworkPrices     string   `yaml:"v1_1_0_NetworkPrices"`
	V1_1_0_NodeStaking       string   `yaml:"v1_1_0_NodeStaking"`
	V1_1_0_NodeDeposit       string   `yaml:"v1_1_0_NodeDeposit"`
	V1_1_0_MinipoolQueue     string   `yaml:"v1_1_0_MinipoolQueue"`
	V1_1_0_MinipoolFactory   string   `yaml:"v1_1_0_MinipoolFactory"`
	V1_2_0_NetworkPrices     string   `yaml:"v1_2_0_NetworkPrices"`
	V1_2_0_NetworkBalances   string   `yaml:"v1_2_0_NetworkBalances"`
	PreviousRewardsPools     []string `yaml:"previousRewardsPools"`
	PreviousDAOVerifiers     []string `yaml:"previousRocketDAOProtocolVerifier"`
	OptimismPriceMessenger   string   `yaml:"optimismPriceMessenger"`
	PolygonPriceMessenger    string   `yaml:"polygonPriceMessenger"`
	ArbitrumPriceMessenger   string   `yaml:"arbitrumPriceMessenger"`
	ArbitrumPriceMessengerV2 string   `yaml:"arbitrumPriceMessengerV2"`
	ZkSyncEraPriceMessenger  string   `yaml:"zkSyncEraPriceMessenger"`
	BasePriceMessenger       string   `yaml:"basePriceMessenger"`
	ScrollPriceMessenger     string   `yaml:"scrollPriceMessenger"`
	ScrollFeeEstimator       string   `yaml:"scrollFeeEstimator"`
	RplTwapPool              string   `yaml:"rplTwapPool"`
	Multicall                string   `yaml:"multicall"`
	BalanceBatcher           string   `yaml:"balancebatcher"`
}

NetworkAddresses is the Rocket Pool / helper contract set for a network.

type NetworkInfo added in v1.23.0

type NetworkInfo struct {
	Name        string `yaml:"name"`
	Label       string `yaml:"label"`
	Description string `yaml:"description"`
	Default     bool   `yaml:"default"`
	ChainID     uint   `yaml:"chainID"`

	TxWatchUrl          string `yaml:"txWatchUrl"`
	NodeManagerUrl      string `yaml:"nodeManagerUrl"`
	BeaconExplorerUrl   string `yaml:"beaconExplorerUrl"`
	SnapshotApiDomain   string `yaml:"snapshotApiDomain"`
	FlashbotsProtectUrl string `yaml:"flashbotsProtectUrl"`
	FlashbotsRelayUrl   string `yaml:"flashbotsRelayUrl"`

	BeaconNetwork        string       `yaml:"beaconNetwork"`
	CommitBoostChainName string       `yaml:"commitBoostChainName"`
	ClientTagSet         ClientTagSet `yaml:"clientTagSet"`
	CustomChainConfigDir string       `yaml:"customChainConfigDir"`

	SupportsMevBoost                 bool `yaml:"supportsMevBoost"`
	AllowNonBlsWithdrawalCredentials bool `yaml:"allowNonBlsWithdrawalCredentials"`
	IsProduction                     bool `yaml:"isProduction"`

	NethermindPruneThresholdMb uint64 `yaml:"nethermindPruneThresholdMb"`

	Rewards   NetworkRewards    `yaml:"rewards"`
	MevRelays map[string]string `yaml:"mevRelays"`
	Addresses NetworkAddresses  `yaml:"addresses"`
}

NetworkInfo is a selectable Ethereum network loaded from YAML.

func (*NetworkInfo) ID added in v1.23.0

func (n *NetworkInfo) ID() Network

func (*NetworkInfo) RelayURL added in v1.23.0

func (n *NetworkInfo) RelayURL(id MevRelayID) string

type NetworkRewards added in v1.23.0

type NetworkRewards struct {
	RulesetStartIntervals        []RulesetStartInterval `yaml:"rulesetStartIntervals"`
	ConsensusBonusCutoffInterval uint64                 `yaml:"consensusBonusCutoffInterval"`
}

NetworkRewards holds per-network rewards-tree ruleset cutovers.

func (NetworkRewards) StartInterval added in v1.23.0

func (r NetworkRewards) StartInterval(version uint64) uint64

type NimbusPruningMode added in v1.7.4

type NimbusPruningMode string
const (
	NimbusPruningMode_Archive NimbusPruningMode = "archive"
	NimbusPruningMode_Prune   NimbusPruningMode = "prune"
)

Enum to describe Nimbus pruning modes

type PBSubmissionRef added in v1.13.0

type PBSubmissionRef int
const (
	PBSubmission_6AM PBSubmissionRef = 1713420000
)

type Parameter

type Parameter struct {
	ID                    string             `yaml:"id,omitempty"`
	Name                  string             `yaml:"name,omitempty"`
	Description           string             `yaml:"description,omitempty"`
	Type                  ParameterType      `yaml:"type,omitempty"`
	Default               map[Network]any    `yaml:"default,omitempty"`
	MaxLength             int                `yaml:"maxLength,omitempty"`
	Regex                 string             `yaml:"regex,omitempty"`
	Advanced              bool               `yaml:"advanced,omitempty"`
	AffectsContainers     []ContainerID      `yaml:"affectsContainers,omitempty"`
	CanBeBlank            bool               `yaml:"canBeBlank,omitempty"`
	OverwriteOnUpgrade    bool               `yaml:"overwriteOnUpgrade,omitempty"`
	Sensitive             bool               `yaml:"sensitive,omitempty"`
	SkipUserSettings      bool               `yaml:"-"`
	Options               []ParameterOption  `yaml:"options,omitempty"`
	Value                 any                `yaml:"-"`
	DescriptionsByNetwork map[Network]string `yaml:"-"`
}

A parameter that can be configured by the user

func (*Parameter) ChangeNetwork

func (param *Parameter) ChangeNetwork(oldNetwork Network, newNetwork Network)

Apply a network change to a parameter

func (*Parameter) Deserialize

func (param *Parameter) Deserialize(serializedParams map[string]string, network Network) error

Deserializes a map of settings into this parameter

func (*Parameter) GetDefault

func (param *Parameter) GetDefault(network Network) (any, error)

Get the default value for the provided network

func (*Parameter) Serialize

func (param *Parameter) Serialize(serializedParams map[string]string)

Serializes the parameter's value into a string

func (*Parameter) SetToDefault

func (param *Parameter) SetToDefault(network Network) error

Set the value to the default for the provided config's network

func (*Parameter) String added in v1.11.3

func (param *Parameter) String() string

Get the Value of the Parameter as a string. Required for fmt.Sprint (and therefore text/template) to print the parameter correctly.

func (*Parameter) UpdateDescription added in v1.7.0

func (param *Parameter) UpdateDescription(network Network)

Set the network-specific description of the parameter

type ParameterOption

type ParameterOption struct {
	Name        string `yaml:"name,omitempty"`
	Description string `yaml:"description,omitempty"`
	Value       any    `yaml:"value,omitempty"`
}

A single option in a choice parameter

func PortModes added in v1.10.0

func PortModes(warningOverride string) []ParameterOption

type ParameterType

type ParameterType string
const (
	ParameterType_Unknown ParameterType = ""
	ParameterType_Int     ParameterType = "int"
	ParameterType_Uint16  ParameterType = "uint16"
	ParameterType_Uint    ParameterType = "uint"
	ParameterType_String  ParameterType = "string"
	ParameterType_Bool    ParameterType = "bool"
	ParameterType_Choice  ParameterType = "choice"
	ParameterType_Float   ParameterType = "float"
)

Enum to describe which data type a parameter's value will have, which informs the corresponding UI element and value validation

type RPCMode added in v1.10.0

type RPCMode string
const (
	RPC_Closed        RPCMode = "closed"
	RPC_OpenLocalhost RPCMode = "localhost"
	RPC_OpenExternal  RPCMode = "external"
)

Enum to describe the mode for the RPC port. Closed will not allow any connections to the RPC port. OpenLocalhost will allow connections from the same host. OpenExternal will allow connections from external hosts.

func (RPCMode) DockerPortMapping added in v1.10.0

func (rpcMode RPCMode) DockerPortMapping(port uint16) string

func (RPCMode) Open added in v1.10.0

func (rpcMode RPCMode) Open() bool

func (RPCMode) String added in v1.10.0

func (rpcMode RPCMode) String() string

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 RulesetStartInterval added in v1.23.0

type RulesetStartInterval struct {
	Version       uint64 `yaml:"version"`
	StartInterval uint64 `yaml:"startInterval"`
}

type UrlMap added in v1.16.1

type UrlMap map[Network]string

func (UrlMap) UrlExists added in v1.16.1

func (urlMap UrlMap) UrlExists(network Network) bool

Jump to

Keyboard shortcuts

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