config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFileFlag = &cli.StringFlag{
		Name:     "config",
		Required: true,
		Usage:    "Load base configurations from `FILE`",
	}
)

Functions

func NewLogger

func NewLogger(loggingLevel sdklogging.LogLevel) (sdklogging.Logger, error)

Types

type AggregatorConfig

type AggregatorConfig struct {
	BaseConfig  *BaseConfig
	EcdsaConfig *EcdsaConfig
	BlsConfig   *BlsConfig
	Aggregator  struct {
		ServerIpPortAddress           string
		BlsPublicKeyCompendiumAddress common.Address
		AvsServiceManagerAddress      common.Address
		EnableMetrics                 bool
		MetricsIpPortAddress          string
	}
}

func NewAggregatorConfig

func NewAggregatorConfig(configFilePath string) *AggregatorConfig

type AggregatorConfigFromYaml

type AggregatorConfigFromYaml struct {
	Aggregator struct {
		ServerIpPortAddress           string         `yaml:"server_ip_port_address"`
		BlsPublicKeyCompendiumAddress common.Address `yaml:"bls_public_key_compendium_address"`
		AvsServiceManagerAddress      common.Address `yaml:"avs_service_manager_address"`
		EnableMetrics                 bool           `yaml:"enable_metrics"`
		MetricsIpPortAddress          string         `yaml:"metrics_ip_port_address"`
	} `yaml:"aggregator"`
}

type AlignedLayerDeploymentConfig

type AlignedLayerDeploymentConfig struct {
	AlignedLayerServiceManagerAddr         common.Address
	AlignedLayerRegistryCoordinatorAddr    common.Address
	AlignedLayerOperatorStateRetrieverAddr common.Address
}

func NewAlignedLayerDeploymentConfig added in v0.1.2

func NewAlignedLayerDeploymentConfig(alignedLayerDeploymentFilePath string) *AlignedLayerDeploymentConfig

type AlignedLayerDeploymentConfigFromJson

type AlignedLayerDeploymentConfigFromJson struct {
	Addresses struct {
		AlignedLayerServiceManagerAddr         common.Address `json:"alignedLayerServiceManager"`
		AlignedLayerRegistryCoordinatorAddr    common.Address `json:"registryCoordinator"`
		AlignedLayerOperatorStateRetrieverAddr common.Address `json:"operatorStateRetriever"`
	} `json:"addresses"`
}

type BaseConfig

type BaseConfig struct {
	AlignedLayerDeploymentConfig *AlignedLayerDeploymentConfig
	EigenLayerDeploymentConfig   *EigenLayerDeploymentConfig
	Logger                       sdklogging.Logger
	EthRpcUrl                    string
	EthWsUrl                     string
	EthRpcClient                 eth.InstrumentedClient
	EthRpcClientFallback         eth.InstrumentedClient
	EthWsClient                  eth.InstrumentedClient
	EthWsClientFallback          eth.InstrumentedClient
	EigenMetricsIpPortAddress    string
	ChainId                      *big.Int
}

func NewBaseConfig

func NewBaseConfig(configFilePath string) *BaseConfig

type BaseConfigFromYaml

type BaseConfigFromYaml struct {
	AlignedLayerDeploymentConfigFilePath string              `yaml:"aligned_layer_deployment_config_file_path"`
	EigenLayerDeploymentConfigFilePath   string              `yaml:"eigen_layer_deployment_config_file_path"`
	Environment                          sdklogging.LogLevel `yaml:"environment"`
	EthRpcUrl                            string              `yaml:"eth_rpc_url"`
	EthRpcUrlFallback                    string              `yaml:"eth_rpc_url_fallback"`
	EthWsUrl                             string              `yaml:"eth_ws_url"`
	EthWsUrlFallback                     string              `yaml:"eth_ws_url_fallback"`
	EigenMetricsIpPortAddress            string              `yaml:"eigen_metrics_ip_port_address"`
}

type BlsConfig

type BlsConfig struct {
	KeyPair *bls.KeyPair
}

func NewBlsConfig added in v0.1.2

func NewBlsConfig(blsConfigFilePath string) *BlsConfig

type BlsConfigFromYaml

type BlsConfigFromYaml struct {
	Bls struct {
		PrivateKeyStorePath     string `yaml:"private_key_store_path"`
		PrivateKeyStorePassword string `yaml:"private_key_store_password"`
	} `yaml:"bls"`
}

type EcdsaConfig

type EcdsaConfig struct {
	PrivateKey *ecdsa.PrivateKey
	Signer     signer.Signer
}

func NewEcdsaConfig

func NewEcdsaConfig(ecdsaConfigFilePath string, chainId *big.Int) *EcdsaConfig

type EcdsaConfigFromYaml

type EcdsaConfigFromYaml struct {
	Ecdsa struct {
		PrivateKeyStorePath     string `yaml:"private_key_store_path"`
		PrivateKeyStorePassword string `yaml:"private_key_store_password"`
	} `yaml:"ecdsa"`
}

type EigenLayerDeploymentConfig

type EigenLayerDeploymentConfig struct {
	DelegationManagerAddr common.Address
	AVSDirectoryAddr      common.Address
	SlasherAddr           common.Address
}

func NewEigenLayerDeploymentConfig added in v0.1.2

func NewEigenLayerDeploymentConfig(eigenLayerDeploymentFilePath string) *EigenLayerDeploymentConfig

type EigenLayerDeploymentConfigFromJson

type EigenLayerDeploymentConfigFromJson struct {
	Addresses struct {
		DelegationManagerAddr common.Address `json:"delegationManager"`
		AVSDirectoryAddr      common.Address `json:"avsDirectory"`
		SlasherAddr           common.Address `json:"slasher"`
	} `json:"addresses"`
}

type OperatorConfig

type OperatorConfig struct {
	BaseConfig                   *BaseConfig
	EcdsaConfig                  *EcdsaConfig
	BlsConfig                    *BlsConfig
	AlignedLayerDeploymentConfig *AlignedLayerDeploymentConfig

	Operator struct {
		AggregatorServerIpPortAddress string
		OperatorTrackerIpPortAddress  string
		Address                       common.Address
		EarningsReceiverAddress       common.Address
		DelegationApproverAddress     common.Address
		StakerOptOutWindowBlocks      int
		MetadataUrl                   string
		RegisterOperatorOnStartup     bool
		EnableMetrics                 bool
		MetricsIpPortAddress          string
		MaxBatchSize                  int64
	}
}

func NewOperatorConfig

func NewOperatorConfig(configFilePath string) *OperatorConfig

type OperatorConfigFromYaml

type OperatorConfigFromYaml struct {
	Operator struct {
		AggregatorServerIpPortAddress string         `yaml:"aggregator_rpc_server_ip_port_address"`
		OperatorTrackerIpPortAddress  string         `yaml:"operator_tracker_ip_port_address"`
		Address                       common.Address `yaml:"address"`
		EarningsReceiverAddress       common.Address `yaml:"earnings_receiver_address"`
		DelegationApproverAddress     common.Address `yaml:"delegation_approver_address"`
		StakerOptOutWindowBlocks      int            `yaml:"staker_opt_out_window_blocks"`
		MetadataUrl                   string         `yaml:"metadata_url"`
		RegisterOperatorOnStartup     bool           `yaml:"register_operator_on_startup"`
		EnableMetrics                 bool           `yaml:"enable_metrics"`
		MetricsIpPortAddress          string         `yaml:"metrics_ip_port_address"`
		MaxBatchSize                  int64          `yaml:"max_batch_size"`
	} `yaml:"operator"`
	EcdsaConfigFromYaml EcdsaConfigFromYaml `yaml:"ecdsa"`
	BlsConfigFromYaml   BlsConfigFromYaml   `yaml:"bls"`
}

type TaskSenderConfig

type TaskSenderConfig struct {
	BaseConfig  *BaseConfig
	EcdsaConfig *EcdsaConfig
}

func NewTaskSenderConfig

func NewTaskSenderConfig(configFilePath string) *TaskSenderConfig

type TaskSenderConfigFromYaml

type TaskSenderConfigFromYaml struct {
	EcdsaConfigFromYaml EcdsaConfigFromYaml `yaml:"ecdsa"`
}

Jump to

Keyboard shortcuts

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