config

package
v1.4.8-dev Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

This work is licensed and released under GNU GPL v3 or any other later versions. The full text of the license is below/ found at <http://www.gnu.org/licenses/>

(c) 2023 Rocket Pool Pty Ltd. Modified under GNU GPL v3. [1.4.7]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This work is licensed and released under GNU GPL v3 or any other later versions. The full text of the license is below/ found at <http://www.gnu.org/licenses/>

(c) 2023 Rocket Pool Pty Ltd. Modified under GNU GPL v3. [1.4.7]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddParametersToEnvVars

func AddParametersToEnvVars(params []*Parameter, envVars map[string]string)

Add the parameters to the collection of environment variabes

Types

type ChangedSetting

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

A setting that has changed

type Config

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

type ConsensusClient

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

Enum to describe the Consensus client options

type ConsensusConfig

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

Interface for common Consensus configurations

type ContainerID

type ContainerID string
const (
	ContainerID_Unknown    ContainerID = ""
	ContainerID_Api        ContainerID = "api"
	ContainerID_Node       ContainerID = "node"
	ContainerID_Guardian   ContainerID = "guardian"
	ContainerID_Eth1       ContainerID = "eth1"
	ContainerID_Eth2       ContainerID = "eth2"
	ContainerID_Validator  ContainerID = "validator"
	ContainerID_Grafana    ContainerID = "grafana"
	ContainerID_Prometheus ContainerID = "prometheus"
	ContainerID_Exporter   ContainerID = "exporter"
	ContainerID_MevBoost   ContainerID = "mev-boost"
)

Enum to describe which container(s) a parameter impacts, so the Stadernode 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_Obs_Infura ExecutionClient = "infura"
	ExecutionClient_Obs_Pocket ExecutionClient = "pocket"
)

Enum to describe the Execution client options

type ExternalConsensusConfig

type ExternalConsensusConfig interface {
	GetApiUrl() string
}

Interface for External Consensus configurations

type LocalConsensusConfig

type LocalConsensusConfig interface {
	GetUnsupportedCommonParams() []string
}

Interface for Local Consensus configurations

type MevRelay

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

A MEV relay

type MevRelayID

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

Enum to identify MEV-boost relays

type MevSelectionMode

type MevSelectionMode string
const (
	MevSelectionMode_Unknow  MevSelectionMode = ""
	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"
	Network_Mainnet  Network = "mainnet"
	Network_Prater   Network = "prater"
	Network_Devnet   Network = "devnet"
	Network_Zhejiang Network = "zhejiang"
)

Enum to describe which network the system is on

type NimbusPruningMode

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

Enum to describe Nimbus pruning modes

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]interface{} `yaml:"default,omitempty"`
	MaxLength             int                     `yaml:"maxLength,omitempty"`
	Regex                 string                  `yaml:"regex,omitempty"`
	Advanced              bool                    `yaml:"advanced,omitempty"`
	AffectsContainers     []ContainerID           `yaml:"affectsContainers,omitempty"`
	EnvironmentVariables  []string                `yaml:"environmentVariables,omitempty"`
	CanBeBlank            bool                    `yaml:"canBeBlank,omitempty"`
	OverwriteOnUpgrade    bool                    `yaml:"overwriteOnUpgrade,omitempty"`
	Options               []ParameterOption       `yaml:"options,omitempty"`
	Value                 interface{}             `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) (interface{}, 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) UpdateDescription

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       interface{} `yaml:"value,omitempty"`
}

A single option in a choice parameter

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 RewardsMode

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

Enum to describe the rewards tree acquisition modes

Jump to

Keyboard shortcuts

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