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 (cfg *StakewiseConfig) DaemonTag() 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) 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 ¶
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 ¶
func NewStakewiseConfig(hdCfg *hdconfig.HyperdriveConfig) *StakewiseConfig
Generates a new Stakewise config
func (*StakewiseConfig) ChangeNetwork ¶
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 ¶
func (cfg *StakewiseConfig) Clone() hdconfig.IModuleConfig
Creates a copy of the configuration
func (*StakewiseConfig) DaemonContainerName ¶
func (c *StakewiseConfig) DaemonContainerName() string
func (*StakewiseConfig) DaemonTag ¶
func (cfg *StakewiseConfig) DaemonTag() string
The tag for the daemon container
func (*StakewiseConfig) DepositDataFile ¶
func (c *StakewiseConfig) DepositDataFile() string
func (*StakewiseConfig) Deserialize ¶
Deserialize the module config from a map
func (*StakewiseConfig) FeeRecipient ¶
func (cfg *StakewiseConfig) FeeRecipient() string
func (*StakewiseConfig) GetApiLogFileName ¶
func (cfg *StakewiseConfig) GetApiLogFileName() string
func (*StakewiseConfig) GetContainersToDeploy ¶
func (cfg *StakewiseConfig) GetContainersToDeploy() []config.ContainerID
func (*StakewiseConfig) GetHdClientLogFileName ¶
func (cfg *StakewiseConfig) GetHdClientLogFileName() string
func (*StakewiseConfig) GetLogNames ¶
func (cfg *StakewiseConfig) GetLogNames() []string
func (*StakewiseConfig) GetModuleName ¶
func (cfg *StakewiseConfig) GetModuleName() string
The module name
func (*StakewiseConfig) GetParameters ¶
func (cfg *StakewiseConfig) GetParameters() []config.IParameter
Get the parameters for this config
func (*StakewiseConfig) GetShortName ¶
func (cfg *StakewiseConfig) GetShortName() string
The module name
func (*StakewiseConfig) GetStakewiseResources ¶
func (cfg *StakewiseConfig) GetStakewiseResources() *StakewiseResources
Get the Stakewise resources for the selected network
func (*StakewiseConfig) GetSubconfigs ¶
func (cfg *StakewiseConfig) GetSubconfigs() map[string]config.IConfigSection
Get the sections underneath this one
func (*StakewiseConfig) GetTasksLogFileName ¶
func (cfg *StakewiseConfig) GetTasksLogFileName() string
func (*StakewiseConfig) GetTitle ¶
func (cfg *StakewiseConfig) GetTitle() string
The title for the config
func (*StakewiseConfig) GetValidatorContainerTagInfo ¶
func (cfg *StakewiseConfig) GetValidatorContainerTagInfo() map[config.ContainerID]string
func (*StakewiseConfig) GetVcAdditionalFlags ¶
func (cfg *StakewiseConfig) GetVcAdditionalFlags() string
Gets the additional flags of the selected VC
func (*StakewiseConfig) GetVcContainerTag ¶
func (cfg *StakewiseConfig) GetVcContainerTag() string
Get the container tag of the selected VC
func (*StakewiseConfig) GetVersion ¶
func (cfg *StakewiseConfig) GetVersion() string
Get the version of the module config
func (*StakewiseConfig) Graffiti ¶
func (cfg *StakewiseConfig) Graffiti() (string, error)
Used by text/template to format validator.yml
func (*StakewiseConfig) IsDoppelgangerEnabled ¶
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 ¶
func (cfg *StakewiseConfig) IsEnabled() bool
func (*StakewiseConfig) KeystorePasswordFile ¶
func (c *StakewiseConfig) KeystorePasswordFile() string
func (*StakewiseConfig) Network ¶
func (cfg *StakewiseConfig) Network() string
func (*StakewiseConfig) OperatorContainerName ¶
func (c *StakewiseConfig) OperatorContainerName() string
func (*StakewiseConfig) PasswordFilename ¶
func (c *StakewiseConfig) PasswordFilename() string
func (*StakewiseConfig) Serialize ¶
func (cfg *StakewiseConfig) Serialize() map[string]any
Serialize the module config to a map
func (*StakewiseConfig) UpdateDefaults ¶
func (cfg *StakewiseConfig) UpdateDefaults(network config.Network)
Updates the default parameters based on the current network value
func (*StakewiseConfig) Validate ¶
func (cfg *StakewiseConfig) Validate() []string
Checks to see if the current configuration is valid; if not, returns a list of errors
func (*StakewiseConfig) Vault ¶
func (cfg *StakewiseConfig) Vault() string
func (*StakewiseConfig) VcContainerName ¶
func (c *StakewiseConfig) VcContainerName() string
func (*StakewiseConfig) WalletFilename ¶
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 splitter proxy used by the NodeSet vault, which distributes rewards to each node op.
// All Beacon + EL rewards from the Vault and FeeRecipient will end up here at some point, but they will be in the ERC-20 represented by the Vault.
// Funds here can be sent to SplitMain by calling `Distribute` on SplitMain and passing this address in as part of it.
// TODO: Find the "share" per node op address
SplitWallet *common.Address
// The address of the SplitMain contract, see https://docs.splits.org/core/split for details.
// All node op rewards will live here; to claim them, call `Withdraw`.
SplitMain *common.Address
}
A collection of network-specific resources and getters for them