Documentation ¶
Overview ¶
Package config enables config file parsing.
Index ¶
- Variables
- type AggregateStatsConfig
- type AnalysisConfig
- type AnalyzersList
- type ArchiveConfig
- type BlockBasedAnalyzerConfig
- type BlockRange
- type CacheConfig
- type Config
- type CustomChainConfig
- type EVMContractVerifierConfig
- type EvmAbiAnalyzerConfig
- type EvmContractCodeAnalyzerConfig
- type EvmTokensAnalyzerConfig
- type FastSyncConfig
- type HelperList
- type History
- func (h *History) CurrentRecord() *Record
- func (h *History) EarliestRecord() *Record
- func (h *History) RecordForChainContext(chainContext string) (*Record, error)
- func (h *History) RecordForHeight(height int64) (*Record, error)
- func (h *History) RecordForRuntimeRound(runtime common.Runtime, round uint64) (*Record, error)
- type HttpCachingProxyConfig
- type IPFSConfig
- type ItemBasedAnalyzerConfig
- type LogConfig
- type MetadataRegistryConfig
- type MetricsConfig
- type NodeConfig
- type NodeStatsConfig
- type Record
- type ReferenceSwap
- type ServerConfig
- type SourceConfig
- func (sc *SourceConfig) History() *History
- func (sc *SourceConfig) ReferenceSwaps() map[common.Runtime]ReferenceSwap
- func (sc *SourceConfig) ResolveRuntimeID(runtime common.Runtime) (string, error)
- func (sc *SourceConfig) SDKNetwork() *sdkConfig.Network
- func (sc *SourceConfig) SDKParaTime(runtime common.Runtime) *sdkConfig.ParaTime
- func (sc *SourceConfig) Validate() error
- type StorageBackend
- type StorageConfig
- type ValidatorStakingHistoryConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultChains = map[common.ChainName]*History{ common.ChainNameMainnet: { ChainName: common.ChainNameMainnet, MissingBlocks: map[uint64]struct{}{8048955: {}}, Records: []*Record{ { ArchiveName: "eden", GenesisHeight: 16817956, RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 44054, common.RuntimeEmerald: 7875129, common.RuntimeSapphire: 1357486, }, ChainContext: "bb3d748def55bdfb797a2ac53ee6ee141e54cd2ab2dc2375f4a0703a178e6e55", }, { ArchiveName: "damask", GenesisHeight: 8048956, RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 8284, common.RuntimeEmerald: 1003298, common.RuntimeSapphire: 0, }, ChainContext: "b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535", }, { ArchiveName: "cobalt", GenesisHeight: 3027601, RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 0, common.RuntimeEmerald: 0, }, ChainContext: "53852332637bacb61b91b6411ab4095168ba02a50be4c3f82448438826f23898", }, { ArchiveName: "mainnet", GenesisHeight: 702000, ChainContext: "a4dc2c4537992d6d2908c9779927ccfee105830250d903fd1abdfaf42cb45631", }, { ArchiveName: "beta", GenesisHeight: 1, ChainContext: "a245619497e580dd3bc1aa3256c07f68b8dcc13f92da115eadc3b231b083d3c4", }, }, }, common.ChainNameTestnet: { ChainName: common.ChainNameTestnet, MissingBlocks: map[uint64]struct{}{}, Records: []*Record{ { ArchiveName: "2023-10-12", GenesisHeight: 17751681, ChainContext: "0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76", RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 1730319, common.RuntimeEmerald: 2627790, common.RuntimeSapphire: 2995927, common.RuntimePontusxTest: 0, common.RuntimePontusxDev: 0, }, }, { ArchiveName: "2022-03-03", GenesisHeight: 8535081, ChainContext: "50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a", RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 1675996, common.RuntimeEmerald: 398623, common.RuntimeSapphire: 0, }, }, { ArchiveName: "2021-04-13", GenesisHeight: 3398334, ChainContext: "5ba68bc5e01e06f755c4c044dd11ec508e4c17f1faf40c0e67874388437a9e55", RuntimeStartRounds: map[common.Runtime]uint64{ common.RuntimeCipher: 0, common.RuntimeEmerald: 0, }, }, { ArchiveName: "2021-03-24", GenesisHeight: 3076800, ChainContext: "TODO-UNKNOWN", }, { ArchiveName: "2021-02-03", GenesisHeight: 2284801, ChainContext: "TODO-UNKNOWN", }, { ArchiveName: "2020-11-04", GenesisHeight: 811055, ChainContext: "TODO-UNKNOWN", }, { ArchiveName: "2020-09-15", GenesisHeight: 1, ChainContext: "TODO-UNKNOWN", }, }, }, }
var DefaultReferenceSwaps = map[common.ChainName]map[common.Runtime]ReferenceSwap{ common.ChainNameMainnet: { common.RuntimeSapphire: { FactoryAddr: "oasis1qqtj2t79keq4wtq5qd3vnv2uh0hds2s9zvgyltk6", ReferenceTokenAddr: "oasis1qpdgv5nv2dhxp4q897cgag6kgnm9qs0dccwnckuu", }, }, }
Functions ¶
This section is empty.
Types ¶
type AggregateStatsConfig ¶
type AggregateStatsConfig struct{}
AggregateStatsConfig is the configuration for the aggregate stats analyzer.
func (*AggregateStatsConfig) Validate ¶
func (cfg *AggregateStatsConfig) Validate() error
type AnalysisConfig ¶
type AnalysisConfig struct { // Source is the configuration for accessing oasis-node(s). Source SourceConfig `koanf:"source"` // Analyzers is the analyzer configs. Analyzers AnalyzersList `koanf:"analyzers"` // Helpers is the configuration for various helper services. // They are instantiated if and only if analyzers are instantiated. Helpers HelperList `koanf:"helpers"` Storage *StorageConfig `koanf:"storage"` }
AnalysisConfig is the configuration for chain analyzers.
func (*AnalysisConfig) Validate ¶
func (cfg *AnalysisConfig) Validate() error
Validate validates the analysis configuration.
type AnalyzersList ¶
type AnalyzersList struct { Consensus *BlockBasedAnalyzerConfig `koanf:"consensus"` Emerald *BlockBasedAnalyzerConfig `koanf:"emerald"` Sapphire *BlockBasedAnalyzerConfig `koanf:"sapphire"` PontusxTest *BlockBasedAnalyzerConfig `koanf:"pontusx_test"` PontusxDev *BlockBasedAnalyzerConfig `koanf:"pontusx_dev"` Cipher *BlockBasedAnalyzerConfig `koanf:"cipher"` ConsensusAccountsList *ItemBasedAnalyzerConfig `koanf:"consensus_accounts_list"` EmeraldEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_emerald"` SapphireEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_sapphire"` PontusxTestEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_pontusx_test"` PontusxDevEvmTokens *EvmTokensAnalyzerConfig `koanf:"evm_tokens_pontusx_dev"` EmeraldEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_emerald"` SapphireEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_sapphire"` PontusxTestEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_pontusx_test"` PontusxDevEvmNfts *EvmTokensAnalyzerConfig `koanf:"evm_nfts_pontusx_dev"` EmeraldEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_emerald"` SapphireEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_sapphire"` PontusxTestEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_pontusx_test"` PontusxDevEvmTokenBalances *EvmTokensAnalyzerConfig `koanf:"evm_token_balances_pontusx_dev"` EmeraldContractCode *EvmContractCodeAnalyzerConfig `koanf:"evm_contract_code_emerald"` SapphireContractCode *EvmContractCodeAnalyzerConfig `koanf:"evm_contract_code_sapphire"` PontusxTestContractCode *EvmContractCodeAnalyzerConfig `koanf:"evm_contract_code_pontusx_test"` PontusxDevContractCode *EvmContractCodeAnalyzerConfig `koanf:"evm_contract_code_pontusx_dev"` EmeraldContractVerifier *EVMContractVerifierConfig `koanf:"evm_contract_verifier_emerald"` SapphireContractVerifier *EVMContractVerifierConfig `koanf:"evm_contract_verifier_sapphire"` PontusxTestContractVerifier *EVMContractVerifierConfig `koanf:"evm_contract_verifier_pontusx_test"` PontusxDevContractVerifier *EVMContractVerifierConfig `koanf:"evm_contract_verifier_pontusx_dev"` EmeraldAbi *EvmAbiAnalyzerConfig `koanf:"evm_abi_emerald"` SapphireAbi *EvmAbiAnalyzerConfig `koanf:"evm_abi_sapphire"` PontusxTestAbi *EvmAbiAnalyzerConfig `koanf:"evm_abi_pontusx_test"` PontusxDevAbi *EvmAbiAnalyzerConfig `koanf:"evm_abi_pontusx_dev"` MetadataRegistry *MetadataRegistryConfig `koanf:"metadata_registry"` ValidatorStakingHistory *ValidatorStakingHistoryConfig `koanf:"validator_staking_history"` NodeStats *NodeStatsConfig `koanf:"node_stats"` AggregateStats *AggregateStatsConfig `koanf:"aggregate_stats"` }
type ArchiveConfig ¶
type ArchiveConfig struct { // DefaultNode is information about the node to get data from by default. DefaultNode *NodeConfig `koanf:"default"` // ConsensusNode is information about the node to get consensus data from, // instead of the default node. ConsensusNode *NodeConfig `koanf:"consensus"` // RuntimeNodes is the information about the nodes to get runtime data // from, instead of the default node. RuntimeNodes map[common.Runtime]*NodeConfig `koanf:"runtimes"` }
ArchiveConfig is information about the nodes for a network.
func (*ArchiveConfig) ResolvedConsensusNode ¶
func (ac *ArchiveConfig) ResolvedConsensusNode() *NodeConfig
func (*ArchiveConfig) ResolvedRuntimeNode ¶
func (ac *ArchiveConfig) ResolvedRuntimeNode(runtime common.Runtime) *NodeConfig
type BlockBasedAnalyzerConfig ¶
type BlockBasedAnalyzerConfig struct { // From is the (inclusive) starting block for this analyzer. From uint64 `koanf:"from"` // If present, the analyzer will run in fast sync mode for // an initial range of blocks, and then switch to slow sync. // If absent, the analyzer will only run in "slow", sequential mode. // // If fast sync mode is enabled: // - DB checks and foreign keys are disabled. // - Multiple analyzers run in parallel and process blocks out of order. // - Analyzers do not perform dead reckoning on state (notably, transfers). // After all analyzers finish the fast sync range: // - DB checks and foreign keys are re-enabled. // - State that would normally be dead-reckoned is fetched directly from the node // via the StateToGenesis() RPC, or recalculated from the relevant DB entries. // - A single "slow mode" analyzer (per runtime/consensus) is started, and resumes // to process blocks sequentially, with dead reckoning enabled. FastSync *FastSyncConfig `koanf:"fast_sync"` // To is the (inclusive) ending block for this analyzer. // Omitting this parameter or setting it to 0 means this analyzer will // continue processing new blocks forever. To uint64 `koanf:"to"` // BatchSize determines the maximum number of blocks the block analyzer // processes per batch. This is relevant only when the analyzer is // still catching up to the latest block. // Optimal value depends on block processing speed. Ideally, it should // be set to the number of blocks processed within 30-60 seconds. // // Uses default value of 1000 if unset/set to 0. BatchSize uint64 `koanf:"batch_size"` }
func (BlockBasedAnalyzerConfig) FastSyncRange ¶ added in v0.1.11
func (blockCfg BlockBasedAnalyzerConfig) FastSyncRange() *BlockRange
func (BlockBasedAnalyzerConfig) SlowSyncRange ¶ added in v0.1.11
func (blockCfg BlockBasedAnalyzerConfig) SlowSyncRange() BlockRange
func (BlockBasedAnalyzerConfig) Validate ¶
func (blockCfg BlockBasedAnalyzerConfig) Validate() error
type BlockRange ¶ added in v0.1.11
func (BlockRange) Validate ¶ added in v0.1.11
func (r BlockRange) Validate() error
type CacheConfig ¶
type CacheConfig struct { // CacheDir is the directory where the cache data is stored CacheDir string `koanf:"cache_dir"` }
func (*CacheConfig) Validate ¶
func (cfg *CacheConfig) Validate() error
type Config ¶
type Config struct { Analysis *AnalysisConfig `koanf:"analysis"` Server *ServerConfig `koanf:"server"` Log *LogConfig `koanf:"log"` Metrics *MetricsConfig `koanf:"metrics"` }
Config contains the CLI configuration.
func InitConfig ¶
InitConfig initializes configuration from file.
type CustomChainConfig ¶
type CustomChainConfig struct { // History is the sequence of networks in the chain. History *History `koanf:"history"` // ReferenceSwaps is the selected reference swap for each runtime. // See reference_swaps.go for an explanation of what a reference swap is // and how Nexus uses them. ReferenceSwaps map[common.Runtime]ReferenceSwap `koanf:"reference_swaps"` // SDKNetwork is the oasis-sdk Network configuration of the latest // network in the chain. SDKNetwork *sdkConfig.Network `koanf:"sdk_network"` }
type EVMContractVerifierConfig ¶ added in v0.1.13
type EVMContractVerifierConfig struct { ItemBasedAnalyzerConfig `koanf:",squash"` // SourcifyServerUrl is the base URL of the Sourcify server. // Defaults to https://sourcify.dev/server if unset. SourcifyServerUrl string `koanf:"sourcify_server_url"` }
EVMContractVerifierConfig is the configuration for the EVM contracts verifier analyzer.
func (*EVMContractVerifierConfig) Validate ¶ added in v0.1.13
func (cfg *EVMContractVerifierConfig) Validate() error
Validate validates the evm contracts verifier config.
type EvmAbiAnalyzerConfig ¶ added in v0.1.26
type EvmAbiAnalyzerConfig struct {
ItemBasedAnalyzerConfig `koanf:",squash"`
}
type EvmContractCodeAnalyzerConfig ¶
type EvmContractCodeAnalyzerConfig struct {
ItemBasedAnalyzerConfig `koanf:",squash"`
}
type EvmTokensAnalyzerConfig ¶
type EvmTokensAnalyzerConfig struct {
ItemBasedAnalyzerConfig `koanf:",squash"`
}
type FastSyncConfig ¶ added in v0.1.11
type FastSyncConfig struct { // To is the block (inclusive) to which the analyzer // will run in fast sync mode. From this block onwards (exclusive), // the analyzer will run in slow mode. To uint64 `koanf:"to"` // The number of parallel analyzers to run in fast sync mode. Parallelism int `koanf:"parallelism"` }
type HelperList ¶ added in v0.2.10
type HelperList struct {
CachingProxies []HttpCachingProxyConfig `koanf:"caching_proxies"`
}
type History ¶
type History struct { ChainName common.ChainName `koanf:"chain_name"` Records []*Record `koanf:"records"` MissingBlocks map[uint64]struct{} `koanf:"missing_blocks"` }
func (*History) CurrentRecord ¶
func (*History) EarliestRecord ¶
func (*History) RecordForChainContext ¶
type HttpCachingProxyConfig ¶ added in v0.2.10
type HttpCachingProxyConfig struct { HostAddr string `koanf:"host_addr"` // The TCP address for the server to listen on, in the form "host:port" // The base URL of the server to which we'll proxy. TargetURL string `koanf:"target"` }
Config for a HTTP proxy that caches all responses, and serves cached data indefinitely. The cache directory is inferred from the global `source` config.
type IPFSConfig ¶ added in v0.1.16
type IPFSConfig struct { // Gateway is the URL prefix of an IPFS HTTP gateway. Do not include a // trailing slash, e.g. `https://ipfs.io`. Something like // `/ipfs/xxxx/n.json` will be appended. Gateway string `koanf:"gateway"` }
IPFSConfig is information about accessing IPFS.
type ItemBasedAnalyzerConfig ¶ added in v0.1.13
type ItemBasedAnalyzerConfig struct { // BatchSize determines the maximum number of items the item analyzer // processes per batch. This is relevant only when the analyzer // work queue is sufficiently long, most often when the analyzer is first enabled after // the block analyzers have been running for some time. // // Optimal value depends on the item processing speed. Ideally, it should // be set to the number of items that can be processed within 60 seconds. // Note that for some items, the processor will request information from out-of-band // sources such as Sourcify/Github. Care should be taken not to flood them // with too many requests. // // Uses default value of 20 if unset/set to 0. BatchSize uint64 `koanf:"batch_size"` // If StopIfQueueEmptyFor is a non-zero duration, the analyzer will terminate when // there are no items left in the work queue for this specified amount of time. // This is useful during testing when // 1) The number of items in the queue is determinate. // 2) We want the analyzer to naturally terminate after processing all available work items. // // Defaults to 0, i.e. the analyzer never terminates. StopIfQueueEmptyFor time.Duration `koanf:"stop_if_queue_empty_for"` // If Interval is set, the analyzer will process batches at a fixed cadence specified by Interval. // Otherwise, the analyzer will use an adaptive backoff to determine the delay between // batches. Note that the backoff will attempt to run as fast as possible. Interval time.Duration `koanf:"interval"` // InterItemDelay determines the length of time the analyzer waits between spawning // new goroutines to process items within a batch. This is useful for cases where // processItem() makes out of band requests to rate limited resources. InterItemDelay time.Duration `koanf:"inter_item_delay"` }
type LogConfig ¶
type LogConfig struct { Format string `koanf:"format"` Level string `koanf:"level"` File string `koanf:"file"` }
LogConfig contains the logging configuration.
type MetadataRegistryConfig ¶
type MetadataRegistryConfig struct {
ItemBasedAnalyzerConfig `koanf:",squash"`
}
MetadataRegistryConfig is the configuration for the metadata registry analyzer.
func (*MetadataRegistryConfig) Validate ¶
func (cfg *MetadataRegistryConfig) Validate() error
Validate validates the configuration.
type MetricsConfig ¶
type MetricsConfig struct {
PullEndpoint string `koanf:"pull_endpoint"`
}
MetricsConfig contains the metrics configuration.
func (*MetricsConfig) Validate ¶
func (cfg *MetricsConfig) Validate() error
Validate validates the metrics configuration.
type NodeConfig ¶
type NodeConfig struct { // RPC is the node endpoint. RPC string `koanf:"rpc"` }
NodeConfig is information about one oasis-node to connect to.
type NodeStatsConfig ¶ added in v0.1.11
type NodeStatsConfig struct { ItemBasedAnalyzerConfig `koanf:",squash"` // Layers is the list of runtimes and/or consensus that the node-stats analyzer // should query for the latest node height. Layers []common.Layer `koanf:"layers"` }
NodeStatsConfig is the configuration for the node stats analyzer.
func (*NodeStatsConfig) Validate ¶ added in v0.1.11
func (cfg *NodeStatsConfig) Validate() error
type Record ¶
type Record struct { ArchiveName string `koanf:"archive_name"` GenesisHeight int64 `koanf:"genesis_height"` // RuntimeStartRounds has entries for runtimes that already exist at the // genesis of this network. Look these up in the genesis document's // .roothash.runtime_states[runtime_id_hex].round. For clarity, add an // entry stating round 0 in the first network where a runtime is available // (although code does not differentiate between the presence or absence // of a zero entry). RuntimeStartRounds map[common.Runtime]uint64 `koanf:"runtime_start_rounds"` ChainContext string `koanf:"chain_context"` }
type ReferenceSwap ¶ added in v0.4.0
type ReferenceSwap struct { FactoryAddr apiTypes.Address `koanf:"factory_addr"` ReferenceTokenAddr apiTypes.Address `koanf:"reference_token_addr"` }
ReferenceSwap identifies a factory contract and reference token in a runtime. These settings identify a set of swap contracts that allow Nexus to compare the relative value of tokens. Nexus considers swap pair contracts created by a specific factory because behave equivalently, and we can audit the factory and the pair contract template that it uses to ensure that it's fair. Nexus considers pairs that swap between the reference token and another token so that it can compare token values in terms of the reference token value directly.
type ServerConfig ¶
type ServerConfig struct { // Endpoint is the service endpoint from which to serve the API. Endpoint string `koanf:"endpoint"` Storage *StorageConfig `koanf:"storage"` // Source is the configuration for accessing oasis-node(s) and chain // information. Source *SourceConfig `koanf:"source"` }
ServerConfig contains the API server configuration.
func (*ServerConfig) Validate ¶
func (cfg *ServerConfig) Validate() error
Validate validates the server configuration.
type SourceConfig ¶
type SourceConfig struct { // Cache holds the configuration for a file-based caching backend. Cache *CacheConfig `koanf:"cache"` // ChainName is the name of the chain (e.g. mainnet/testnet). Set // this to use one of the default chains. ChainName common.ChainName `koanf:"chain_name"` // CustomChain is information about a custom chain. Set this to use a // chain other than the default chains, e.g. a local testnet. CustomChain *CustomChainConfig `koanf:"custom_chain"` // Nodes describe the oasis-node(s) to connect to. Keys are "archive // names," which are named after mainnet releases, in lowercase e.g. // "cobalt", "damask" and "eden". Nodes map[string]*ArchiveConfig `koanf:"nodes"` // IPFS holds the configuration for accessing IPFS. IPFS *IPFSConfig `koanf:"ipfs"` // If set, the analyzer will skip some initial checks, e.g. that // `rpc` really serves the chain with the chain context we expect. // NOT RECOMMENDED in production; intended for faster testing. FastStartup bool `koanf:"fast_startup"` }
SourceConfig has some controls about what chain we're analyzing and how to connect.
func (*SourceConfig) History ¶
func (sc *SourceConfig) History() *History
func (*SourceConfig) ReferenceSwaps ¶ added in v0.4.0
func (sc *SourceConfig) ReferenceSwaps() map[common.Runtime]ReferenceSwap
func (*SourceConfig) ResolveRuntimeID ¶ added in v0.4.1
func (sc *SourceConfig) ResolveRuntimeID(runtime common.Runtime) (string, error)
func (*SourceConfig) SDKNetwork ¶
func (sc *SourceConfig) SDKNetwork() *sdkConfig.Network
func (*SourceConfig) SDKParaTime ¶
func (sc *SourceConfig) SDKParaTime(runtime common.Runtime) *sdkConfig.ParaTime
func (*SourceConfig) Validate ¶ added in v0.3.0
func (sc *SourceConfig) Validate() error
type StorageBackend ¶
type StorageBackend uint
StorageBackend is a storage backend.
const ( // BackendCockroach is the CockroachDB storage backend. BackendCockroach StorageBackend = iota // BackendPostgres is the PostgreSQL storage backend. BackendPostgres // BackendInMemory is the in-memory storage backend. BackendInMemory )
func (*StorageBackend) Set ¶
func (sb *StorageBackend) Set(s string) error
Set sets the StorageBackend to the value specified by the provided string.
func (*StorageBackend) String ¶
func (sb *StorageBackend) String() string
String returns the string representation of a StorageBackend.
func (*StorageBackend) Type ¶
func (sb *StorageBackend) Type() string
Type returns the list of supported StorageBackends.
type StorageConfig ¶
type StorageConfig struct { // Endpoint is the storage endpoint from which to read/write indexed data. Endpoint string `koanf:"endpoint"` // Backend is the storage backend to select. Backend string `koanf:"backend"` // Migrations is the directory containing schema migrations. Migrations string `koanf:"migrations"` // If true, we'll first delete all tables in the DB to // force a full re-index of the blockchain. WipeStorage bool `koanf:"DANGER__WIPE_STORAGE_ON_STARTUP"` }
StorageConfig contains the storage layer configuration.
func (*StorageConfig) Validate ¶
func (cfg *StorageConfig) Validate(requireMigrations bool) error
Validate validates the storage configuration.
type ValidatorStakingHistoryConfig ¶ added in v0.3.2
type ValidatorStakingHistoryConfig struct { ItemBasedAnalyzerConfig `koanf:",squash"` // From is the height at which the analyzer should start constructing validator // history from. Note: We use a uint64 to match the consensus block config types, but // the analyzer will refuse to start if From > math.MaxInt64. From uint64 `koanf:"from"` }
ValidatorStakingHistoryConfig is the configuration for the validator balances analyzer.
func (*ValidatorStakingHistoryConfig) Validate ¶ added in v0.3.2
func (cfg *ValidatorStakingHistoryConfig) Validate() error