config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultValues = `` /* 754-byte string literal not displayed */

DefaultValues is the default configuration

View Source
const (
	// FlagCfg flag used for config aka cfg
	FlagCfg = "cfg"
)

Variables

This section is empty.

Functions

func NewKeyFromKeystore

func NewKeyFromKeystore(cfg types.KeystoreFileConfig) (*ecdsa.PrivateKey, error)

NewKeyFromKeystore creates a private key from a keystore file

Types

type Config

type Config struct {
	PrivateKey types.KeystoreFileConfig
	DB         db.Config
	Log        log.Config
	RPC        rpc.Config
	L1         L1Config
}

Config represents the full configuration of the data node

func Default

func Default() (*Config, error)

Default parses the default configuration values.

func Load

func Load(ctx *cli.Context) (*Config, error)

Load loads the configuration baseed on the cli context

type L1Config

type L1Config struct {
	WsURL                  string         `mapstructure:"WsURL"`
	RpcURL                 string         `mapstructure:"RpcURL"`
	PolygonValidiumAddress string         `mapstructure:"PolygonValidiumAddress"`
	DataCommitteeAddress   string         `mapstructure:"DataCommitteeAddress"`
	Timeout                types.Duration `mapstructure:"Timeout"`
	RetryPeriod            types.Duration `mapstructure:"RetryPeriod"`
	BlockBatchSize         uint           `mapstructure:"BlockBatchSize"`
	TrackSequencer         bool           `mapstructure:"TrackSequencer"`

	// GenesisBlock represents the block number where PolygonValidium contract is deployed on L1
	GenesisBlock uint64 `mapstructure:"GenesisBlock"`
}

L1Config is a struct that defines L1 contract and service settings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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