Documentation
¶
Index ¶
- Constants
- type StakeWiseConfig
- func (cfg *StakeWiseConfig) ChangeNetwork(oldNetwork config.Network, newNetwork config.Network)
- func (cfg *StakeWiseConfig) Clone() hdconfig.IModuleConfig
- func (c *StakeWiseConfig) DaemonContainerName() string
- func (c *StakeWiseConfig) DepositDataFile() string
- func (cfg *StakeWiseConfig) Deserialize(configMap map[string]any, network config.Network) error
- func (cfg *StakeWiseConfig) FeeRecipient() string
- func (cfg *StakeWiseConfig) GetApiLogFileName() string
- func (cfg *StakeWiseConfig) GetContainersToDeploy() []config.ContainerID
- func (cfg *StakeWiseConfig) GetDaemonContainerTag() string
- func (cfg *StakeWiseConfig) GetHdClientLogFileName() string
- func (cfg *StakeWiseConfig) GetLogNames() []string
- func (cfg *StakeWiseConfig) GetModuleName() string
- func (cfg *StakeWiseConfig) GetParameters() []config.IParameter
- func (cfg *StakeWiseConfig) GetShortName() string
- func (cfg *StakeWiseConfig) GetStakeWiseResources() *StakewiseResources
- func (cfg *StakeWiseConfig) GetSubconfigs() map[string]config.IConfigSection
- func (cfg *StakeWiseConfig) GetTasksLogFileName() string
- func (cfg *StakeWiseConfig) GetTitle() string
- func (cfg *StakeWiseConfig) GetValidatorContainerTagInfo() map[config.ContainerID]string
- func (cfg *StakeWiseConfig) GetVcAdditionalFlags() string
- func (cfg *StakeWiseConfig) GetVcContainerTag() string
- func (cfg *StakeWiseConfig) GetVersion() string
- func (cfg *StakeWiseConfig) Graffiti() (string, error)
- func (cfg *StakeWiseConfig) IsDoppelgangerEnabled() bool
- func (cfg *StakeWiseConfig) IsEnabled() bool
- func (c *StakeWiseConfig) KeystorePasswordFile() string
- func (cfg *StakeWiseConfig) Network() string
- func (c *StakeWiseConfig) OperatorContainerName() string
- func (c *StakeWiseConfig) PasswordFilename() string
- func (cfg *StakeWiseConfig) Serialize() map[string]any
- func (cfg *StakeWiseConfig) UpdateDefaults(network config.Network)
- func (cfg *StakeWiseConfig) Validate() []string
- func (cfg *StakeWiseConfig) Vault() string
- func (c *StakeWiseConfig) VcContainerName() string
- func (c *StakeWiseConfig) WalletFilename() string
- type StakewiseResources
Constants ¶
const ( ModuleName string = "stakewise" ShortModuleName string = "sw" DaemonBaseRoute string = ModuleName ApiVersion string = "1" ApiClientRoute string = DaemonBaseRoute + "/api/v" + ApiVersion WalletFilename string = "wallet.json" PasswordFilename string = "password.txt" KeystorePasswordFile string = "secret.txt" DepositDataFile string = "deposit-data.json" DefaultApiPort uint16 = 8180 // Logging ClientLogName string = "hd.log" )
const ( // The stakewise Hyperdrive daemon ContainerID_StakewiseDaemon config.ContainerID = "sw_daemon" // The stakewise operator container ContainerID_StakewiseOperator config.ContainerID = "sw_operator" // The stakewise Validator client ContainerID_StakewiseValidator config.ContainerID = "sw_vc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StakeWiseConfig ¶ added in v1.0.0
type StakeWiseConfig struct { // Toggle for enabling access to the root filesystem (for multiple disk usage metrics) Enabled config.Parameter[bool] // Port to run the Stakewise API server on ApiPort config.Parameter[uint16] // Toggle for verifying deposit data Merkle roots before saving VerifyDepositsRoot config.Parameter[bool] // The Docker Hub tag for the Stakewise daemon DaemonContainerTag config.Parameter[string] // The Docker Hub tag for the Stakewise operator OperatorContainerTag config.Parameter[string] // Custom command line flags AdditionalOpFlags config.Parameter[string] // Validator client configs VcCommon *config.ValidatorClientCommonConfig Lighthouse *config.LighthouseVcConfig Lodestar *config.LodestarVcConfig Nimbus *config.NimbusVcConfig Prysm *config.PrysmVcConfig Teku *config.TekuVcConfig // Internal fields Version string // contains filtered or unexported fields }
Configuration for Stakewise
func NewStakeWiseConfig ¶ added in v1.0.0
func NewStakeWiseConfig(hdCfg *hdconfig.HyperdriveConfig) *StakeWiseConfig
Generates a new Stakewise config
func NewStakeWiseConfigWithResources ¶ added in v1.0.0
func NewStakeWiseConfigWithResources(hdCfg *hdconfig.HyperdriveConfig, resources *StakewiseResources) *StakeWiseConfig
Generates a new Stakewise config with custom resources
func (*StakeWiseConfig) ChangeNetwork ¶ added in v1.0.0
func (cfg *StakeWiseConfig) ChangeNetwork(oldNetwork config.Network, newNetwork config.Network)
Changes the current network, propagating new parameter settings if they are affected
func (*StakeWiseConfig) Clone ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Clone() hdconfig.IModuleConfig
Creates a copy of the configuration
func (*StakeWiseConfig) DaemonContainerName ¶ added in v1.0.0
func (c *StakeWiseConfig) DaemonContainerName() string
func (*StakeWiseConfig) DepositDataFile ¶ added in v1.0.0
func (c *StakeWiseConfig) DepositDataFile() string
func (*StakeWiseConfig) Deserialize ¶ added in v1.0.0
Deserialize the module config from a map
func (*StakeWiseConfig) FeeRecipient ¶ added in v1.0.0
func (cfg *StakeWiseConfig) FeeRecipient() string
func (*StakeWiseConfig) GetApiLogFileName ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetApiLogFileName() string
func (*StakeWiseConfig) GetContainersToDeploy ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetContainersToDeploy() []config.ContainerID
func (*StakeWiseConfig) GetDaemonContainerTag ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetDaemonContainerTag() string
The tag for the daemon container
func (*StakeWiseConfig) GetHdClientLogFileName ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetHdClientLogFileName() string
func (*StakeWiseConfig) GetLogNames ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetLogNames() []string
func (*StakeWiseConfig) GetModuleName ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetModuleName() string
The module name
func (*StakeWiseConfig) GetParameters ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetParameters() []config.IParameter
Get the parameters for this config
func (*StakeWiseConfig) GetShortName ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetShortName() string
The module name
func (*StakeWiseConfig) GetStakeWiseResources ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetStakeWiseResources() *StakewiseResources
Get the Stakewise resources for the selected network
func (*StakeWiseConfig) GetSubconfigs ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetSubconfigs() map[string]config.IConfigSection
Get the sections underneath this one
func (*StakeWiseConfig) GetTasksLogFileName ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetTasksLogFileName() string
func (*StakeWiseConfig) GetTitle ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetTitle() string
The title for the config
func (*StakeWiseConfig) GetValidatorContainerTagInfo ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetValidatorContainerTagInfo() map[config.ContainerID]string
func (*StakeWiseConfig) GetVcAdditionalFlags ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetVcAdditionalFlags() string
Gets the additional flags of the selected VC
func (*StakeWiseConfig) GetVcContainerTag ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetVcContainerTag() string
Get the container tag of the selected VC
func (*StakeWiseConfig) GetVersion ¶ added in v1.0.0
func (cfg *StakeWiseConfig) GetVersion() string
Get the version of the module config
func (*StakeWiseConfig) Graffiti ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Graffiti() (string, error)
Used by text/template to format validator.yml
func (*StakeWiseConfig) IsDoppelgangerEnabled ¶ added in v1.0.0
func (cfg *StakeWiseConfig) IsDoppelgangerEnabled() bool
Check if any of the services have doppelganger detection enabled NOTE: update this with each new service that runs a VC!
func (*StakeWiseConfig) IsEnabled ¶ added in v1.0.0
func (cfg *StakeWiseConfig) IsEnabled() bool
func (*StakeWiseConfig) KeystorePasswordFile ¶ added in v1.0.0
func (c *StakeWiseConfig) KeystorePasswordFile() string
func (*StakeWiseConfig) Network ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Network() string
func (*StakeWiseConfig) OperatorContainerName ¶ added in v1.0.0
func (c *StakeWiseConfig) OperatorContainerName() string
func (*StakeWiseConfig) PasswordFilename ¶ added in v1.0.0
func (c *StakeWiseConfig) PasswordFilename() string
func (*StakeWiseConfig) Serialize ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Serialize() map[string]any
Serialize the module config to a map
func (*StakeWiseConfig) UpdateDefaults ¶ added in v1.0.0
func (cfg *StakeWiseConfig) UpdateDefaults(network config.Network)
Updates the default parameters based on the current network value
func (*StakeWiseConfig) Validate ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Validate() []string
Checks to see if the current configuration is valid; if not, returns a list of errors
func (*StakeWiseConfig) Vault ¶ added in v1.0.0
func (cfg *StakeWiseConfig) Vault() string
func (*StakeWiseConfig) VcContainerName ¶ added in v1.0.0
func (c *StakeWiseConfig) VcContainerName() string
func (*StakeWiseConfig) WalletFilename ¶ added in v1.0.0
func (c *StakeWiseConfig) WalletFilename() string
type StakewiseResources ¶
type StakewiseResources struct { *config.NetworkResources // The URL for the NodeSet API server NodesetApiUrl string // The address of the Stakewise v3 vault contract, the withdrawal address for all Stakewise validators on Beacon. // It's also the address of an ERC-20 token on the EL, which is an LST for the NodeSet partner administrating the vault. // See https://app.stakewise.io/vault/holesky/<vault_address> for details. Vault *common.Address // The address of the NodeSet fee recipient, the Stakewise "smoothing pool". // See https://github.com/stakewise/v3-core/blob/main/contracts/vaults/ethereum/mev/SharedMevEscrow.sol FeeRecipient *common.Address // The address of the SplitWarehouse contract used to hold user funds. // All node op rewards will live here; to claim them, call `Withdraw`. // See https://docs.splits.org/core/warehouse SplitWarehouse *common.Address // The address of the PullSplit contract used to manage recipients/allocations and distributions // See https://docs.splits.org/core/split-v2 PullSplit *common.Address }
A collection of network-specific resources and getters for them