Documentation
¶
Overview ¶
Package config contains go-spacemesh node configuration definitions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseConfig ¶
type BaseConfig struct {
DataDirParent string `mapstructure:"data-folder"`
ConfigFile string `mapstructure:"config"`
TestMode bool `mapstructure:"test-mode"`
CollectMetrics bool `mapstructure:"metrics"`
MetricsPort int `mapstructure:"metrics-port"`
OracleServer string `mapstructure:"oracle_server"`
OracleServerWorldID int `mapstructure:"oracle_server_worldid"`
GenesisTime string `mapstructure:"genesis-time"`
LayerDurationSec int `mapstructure:"layer-duration-sec"`
LayerAvgSize int `mapstructure:"layer-average-size"`
LayersPerEpoch int `mapstructure:"layers-per-epoch"`
Hdist int `mapstructure:"hdist"`
PoETServer string `mapstructure:"poet-server"`
MemProfile string `mapstructure:"mem-profile"`
CPUProfile string `mapstructure:"cpu-profile"`
PprofHTTPServer bool `mapstructure:"pprof-server"`
GenesisConfPath string `mapstructure:"genesis-conf"`
CoinbaseAccount string `mapstructure:"coinbase"`
GenesisActiveSet int `mapstructure:"genesis-active-size"` // the active set size for genesis
SyncRequestTimeout int `mapstructure:"sync-request-timeout"` // ms the timeout for direct request in the sync
SyncInterval int `mapstructure:"sync-interval"` // sync interval in seconds
SyncValidationDelta int `mapstructure:"sync-validation-delta"` // sync interval in seconds
PublishEventsURL string `mapstructure:"events-url"`
StartMining bool `mapstructure:"start-mining"`
AtxsPerBlock int `mapstructure:"atxs-per-block"`
TxsPerBlock int `mapstructure:"txs-per-block"`
BlockCacheSize int `mapstructure:"block-cache-size"`
AlwaysListen bool `mapstructure:"always-listen"` // force gossip to always be on (for testing)
}
BaseConfig defines the default configuration options for spacemesh app
func (*BaseConfig) SetConfigFile ¶
func (cfg *BaseConfig) SetConfigFile(file string)
SetConfigFile overrides the default config file path
type Config ¶
type Config struct {
BaseConfig `mapstructure:"main"`
P2P p2pConfig.Config `mapstructure:"p2p"`
API apiConfig.Config `mapstructure:"api"`
HARE hareConfig.Config `mapstructure:"hare"`
HareEligibility eligConfig.Config `mapstructure:"hare-eligibility"`
TIME timeConfig.TimeConfig `mapstructure:"time"`
REWARD mesh.Config `mapstructure:"reward"`
POST postConfig.Config `mapstructure:"post"`
LOGGING LoggerConfig `mapstructure:"logging"`
}
Config defines the top level configuration for a spacemesh node
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configuration for a spacemesh node
type LoggerConfig ¶
type LoggerConfig struct {
AppLoggerLevel string `mapstructure:"app"`
P2PLoggerLevel string `mapstructure:"p2p"`
PostLoggerLevel string `mapstructure:"post"`
StateDbLoggerLevel string `mapstructure:"stateDb"`
StateLoggerLevel string `mapstructure:"state"`
AtxDbStoreLoggerLevel string `mapstructure:"atxDb"`
PoetDbStoreLoggerLevel string `mapstructure:"poetDb"`
StoreLoggerLevel string `mapstructure:"store"`
PoetDbLoggerLevel string `mapstructure:"poetDb"`
MeshDBLoggerLevel string `mapstructure:"meshDb"`
TrtlLoggerLevel string `mapstructure:"trtl"`
AtxDbLoggerLevel string `mapstructure:"atxDb"`
BlkEligibilityLoggerLevel string `mapstructure:"block-eligibility"`
MeshLoggerLevel string `mapstructure:"mesh"`
SyncLoggerLevel string `mapstructure:"sync"`
BlockOracleLevel string `mapstructure:"block-oracle"`
HareOracleLoggerLevel string `mapstructure:"hare-oracle"`
HareLoggerLevel string `mapstructure:"hare"`
BlockBuilderLoggerLevel string `mapstructure:"block-builder"`
BlockListenerLoggerLevel string `mapstructure:"block-listener"`
PoetListenerLoggerLevel string `mapstructure:"poet"`
NipstBuilderLoggerLevel string `mapstructure:"nipst"`
AtxBuilderLoggerLevel string `mapstructure:"atx-builder"`
HareBeaconLoggerLevel string `mapstructure:"hare-beacon"`
}
LoggerConfig holds the logging level for each module.
Click to show internal directories.
Click to hide internal directories.