config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressConfig

type AddressConfig struct {
	Length int    `json:"length"`
	Prefix string `json:"prefix"`
}

AddressConfig will map the json address configuration

type AntifloodConfig

type AntifloodConfig struct {
	Enabled                   bool
	NumConcurrentResolverJobs int32
	Cache                     CacheConfig
	BlackList                 BlackListConfig
	PeerMaxMessagesPerSecond  uint32
	PeerMaxTotalSizePerSecond uint64
	MaxMessagesPerSecond      uint32
	MaxTotalSizePerSecond     uint64
	WebServer                 WebServerAntifloodConfig
	Topic                     TopicAntifloodConfig
	TxAccumulator             TxAccumulatorConfig
}

AntifloodConfig will hold all p2p antiflood parameters

type BlackListConfig

type BlackListConfig struct {
	ThresholdNumMessagesPerSecond uint32
	ThresholdSizePerSecond        uint64
	NumFloodingRounds             uint32
	PeerBanDurationInSeconds      uint32
}

BlackListConfig will hold the p2p peer black list threshold values

type BlockSizeThrottleConfig

type BlockSizeThrottleConfig struct {
	MinSizeInBytes uint32
	MaxSizeInBytes uint32
}

BlockSizeThrottleConfig will hold the configuration for adaptive block size throttle

type BloomFilterConfig

type BloomFilterConfig struct {
	Size     uint     `json:"size"`
	HashFunc []string `json:"hashFunc"`
}

BloomFilterConfig will map the json bloom filter configuration

type CacheConfig

type CacheConfig struct {
	Type        string `json:"type"`
	Size        uint32 `json:"size"`
	SizeInBytes uint32 `json:"sizeInBytes"`
	Shards      uint32 `json:"shards"`
}

CacheConfig will map the json cache configuration

type Config

type Config struct {
	MiniBlocksStorage          StorageConfig
	MiniBlockHeadersStorage    StorageConfig
	PeerBlockBodyStorage       StorageConfig
	BlockHeaderStorage         StorageConfig
	TxStorage                  StorageConfig
	UnsignedTransactionStorage StorageConfig
	RewardTxStorage            StorageConfig
	ShardHdrNonceHashStorage   StorageConfig
	MetaHdrNonceHashStorage    StorageConfig
	StatusMetricsStorage       StorageConfig

	BootstrapStorage StorageConfig
	MetaBlockStorage StorageConfig

	AccountsTrieStorage     StorageConfig
	PeerAccountsTrieStorage StorageConfig
	TrieSnapshotDB          DBConfig
	EvictionWaitingList     EvictionWaitingListConfig
	StateTriesConfig        StateTriesConfig
	BadBlocksCache          CacheConfig

	TxBlockBodyDataPool         CacheConfig
	PeerBlockBodyDataPool       CacheConfig
	TxDataPool                  CacheConfig
	UnsignedTransactionDataPool CacheConfig
	RewardTransactionDataPool   CacheConfig
	TrieNodesDataPool           CacheConfig
	EpochStartConfig            EpochStartConfig
	Address                     AddressConfig
	BLSPublicKey                AddressConfig
	Hasher                      TypeConfig
	MultisigHasher              TypeConfig
	Marshalizer                 MarshalizerConfig
	VmMarshalizer               TypeConfig
	TxSignMarshalizer           TypeConfig

	PublicKeyShardId CacheConfig
	PublicKeyPeerId  CacheConfig
	PeerIdShardId    CacheConfig

	Antiflood       AntifloodConfig
	ResourceStats   ResourceStatsConfig
	Heartbeat       HeartbeatConfig
	GeneralSettings GeneralSettingsConfig
	Consensus       TypeConfig
	StoragePruning  StoragePruningConfig

	NTPConfig               NTPConfig
	HeadersPoolConfig       HeadersPoolConfig
	BlockSizeThrottleConfig BlockSizeThrottleConfig
	VirtualMachineConfig    VirtualMachineConfig
}

Config will hold the entire application configuration parameters

type DBConfig

type DBConfig struct {
	FilePath          string `json:"file"`
	Type              string `json:"type"`
	BatchDelaySeconds int    `json:"batchDelaySeconds"`
	MaxBatchSize      int    `json:"maxBatchSize"`
	MaxOpenFiles      int    `json:"maxOpenFiles"`
}

DBConfig will map the json db configuration

type EconomicsConfig

type EconomicsConfig struct {
	GlobalSettings    GlobalSettings
	RewardsSettings   RewardsSettings
	FeeSettings       FeeSettings
	ValidatorSettings ValidatorSettings
}

EconomicsConfig will hold economics config

type ElasticSearchConfig

type ElasticSearchConfig struct {
	Enabled  bool
	URL      string
	Username string
	Password string
}

ElasticSearchConfig will hold the configuration for the elastic search

type EpochStartConfig

type EpochStartConfig struct {
	MinRoundsBetweenEpochs int64
	RoundsPerEpoch         int64
}

EpochStartConfig will hold the configuration of EpochStart settings

type EvictionWaitingListConfig

type EvictionWaitingListConfig struct {
	Size uint     `json:"size"`
	DB   DBConfig `json:"db"`
}

EvictionWaitingListConfig will hold the configuration for the EvictionWaitingList

type ExternalConfig

type ExternalConfig struct {
	ElasticSearchConnector ElasticSearchConfig
}

ExternalConfig will hold the configurations for external tools, such as Explorer or Elastic Search

type FacadeConfig

type FacadeConfig struct {
	RestApiInterface string
	PprofEnabled     bool
}

FacadeConfig will hold different configuration option that will be passed to the main ElrondFacade

type FeeSettings

type FeeSettings struct {
	MaxGasLimitPerBlock  string
	GasPerDataByte       string
	DataLimitForBaseCalc string
	MinGasPrice          string
	MinGasLimit          string
}

FeeSettings will hold economics fee settings

type General added in v0.0.5

type General struct {
	StartRating           uint32
	MaxRating             uint32
	MinRating             uint32
	SignedBlocksThreshold float32
	SelectionChances      []*SelectionChance
}

General will hold ratings settings both for metachain and shardChain

type GeneralSettingsConfig

type GeneralSettingsConfig struct {
	StatusPollingIntervalSec int
	MaxComputableRounds      uint64
}

GeneralSettingsConfig will hold the general settings for a node

type GlobalSettings

type GlobalSettings struct {
	TotalSupply      string
	MinimumInflation float64
	MaximumInflation float64
}

GlobalSettings will hold general economic values

type HeadersPoolConfig

type HeadersPoolConfig struct {
	MaxHeadersPerShard            int
	NumElementsToRemoveOnEviction int
}

HeadersPoolConfig will map the headers cache configuration

type HeartbeatConfig

type HeartbeatConfig struct {
	Enabled                             bool
	MinTimeToWaitBetweenBroadcastsInSec int
	MaxTimeToWaitBetweenBroadcastsInSec int
	DurationInSecToConsiderUnresponsive int
	HeartbeatStorage                    StorageConfig
}

HeartbeatConfig will hold all heartbeat settings

type KadDhtPeerDiscoveryConfig

type KadDhtPeerDiscoveryConfig struct {
	Enabled                          bool
	RefreshIntervalInSec             uint32
	RandezVous                       string
	InitialPeerList                  []string
	BucketSize                       uint32
	RoutingTableRefreshIntervalInSec uint32
}

KadDhtPeerDiscoveryConfig will hold the kad-dht discovery config settings

type MarshalizerConfig

type MarshalizerConfig struct {
	Type           string `json:"type"`
	SizeCheckDelta uint32 `json:"sizeCheckDelta"`
}

MarshalizerConfig holds the marshalizer related configuration

type MetaChain added in v0.0.5

type MetaChain struct {
	RatingSteps
}

MetaChain will hold RatingSteps for the Meta

type NTPConfig

type NTPConfig struct {
	Hosts               []string
	Port                int
	TimeoutMilliseconds int
	SyncPeriodSeconds   int
	Version             int
}

NTPConfig will hold the configuration for NTP queries

type NodeConfig

type NodeConfig struct {
	Port uint32
	Seed string
}

NodeConfig will hold basic p2p settings

type P2PConfig

type P2PConfig struct {
	Node                NodeConfig
	KadDhtPeerDiscovery KadDhtPeerDiscoveryConfig
	Sharding            ShardingConfig
}

P2PConfig will hold all the P2P settings

type Preferences

type Preferences struct {
	Preferences PreferencesConfig
}

Preferences will hold the configuration related to node's preferences

type PreferencesConfig

type PreferencesConfig struct {
	DestinationShardAsObserver string
	NodeDisplayName            string
}

PreferencesConfig will hold the fields which are node specific such as the display name

type RatingSteps added in v0.0.5

type RatingSteps struct {
	ProposerIncreaseRatingStep     int32
	ProposerDecreaseRatingStep     int32
	ValidatorIncreaseRatingStep    int32
	ValidatorDecreaseRatingStep    int32
	ConsecutiveMissedBlocksPenalty float32
}

RatingSteps holds the necessary increases and decreases of the rating steps

type RatingValue

type RatingValue struct {
	Name  string
	Value int32
}

RatingValue will hold different rating options with increase and decrease steps

type RatingsConfig added in v0.0.5

type RatingsConfig struct {
	General    General
	ShardChain ShardChain
	MetaChain  MetaChain
}

RatingsConfig will hold the configuration data needed for the ratings

type ResourceStatsConfig

type ResourceStatsConfig struct {
	Enabled              bool
	RefreshIntervalInSec int
}

ResourceStatsConfig will hold all resource stats settings

type RewardsSettings

type RewardsSettings struct {
	LeaderPercentage               float64
	DeveloperPercentage            float64
	DenominationCoefficientForView string
}

RewardsSettings will hold economics rewards settings

type SelectionChance

type SelectionChance struct {
	MaxThreshold  uint32
	ChancePercent uint32
}

SelectionChance will hold the percentage modifier for up to the specified threshold

type ShardChain added in v0.0.5

type ShardChain struct {
	RatingSteps
}

ShardChain will hold RatingSteps for the Shard

type ShardingConfig

type ShardingConfig struct {
	TargetPeerCount         int
	PrioBits                uint32
	MaxIntraShardValidators uint32
	MaxCrossShardValidators uint32
	MaxIntraShardObservers  uint32
	MaxCrossShardObservers  uint32
	Type                    string
}

ShardingConfig will hold the network sharding config settings

type StateTriesConfig

type StateTriesConfig struct {
	CheckpointRoundsModulus     uint
	AccountsStatePruningEnabled bool
	PeerStatePruningEnabled     bool
}

StateTriesConfig will hold information about state tries

type StorageConfig

type StorageConfig struct {
	Cache CacheConfig       `json:"cache"`
	DB    DBConfig          `json:"db"`
	Bloom BloomFilterConfig `json:"bloom"`
}

StorageConfig will map the json storage unit configuration

type StoragePruningConfig

type StoragePruningConfig struct {
	Enabled             bool
	FullArchive         bool
	NumEpochsToKeep     uint64
	NumActivePersisters uint64
}

StoragePruningConfig will hold settings relates to storage pruning

type TopicAntifloodConfig

type TopicAntifloodConfig struct {
	DefaultMaxMessagesPerSec uint32
	MaxMessages              []TopicMaxMessagesConfig
}

TopicAntifloodConfig will hold the maximum values per second to be used in certain topics

type TopicMaxMessagesConfig

type TopicMaxMessagesConfig struct {
	Topic             string
	NumMessagesPerSec uint32
}

TopicMaxMessagesConfig will hold the maximum number of messages/sec per topic value

type TxAccumulatorConfig

type TxAccumulatorConfig struct {
	MaxAllowedTimeInMilliseconds   uint32
	MaxDeviationTimeInMilliseconds uint32
}

TxAccumulatorConfig will hold the tx accumulator config values

type TypeConfig

type TypeConfig struct {
	Type string `json:"type"`
}

TypeConfig will map the json string type configuration

type ValidatorSettings

type ValidatorSettings struct {
	GenesisNodePrice         string
	UnBondPeriod             string
	TotalSupply              string
	MinStepValue             string
	NumNodes                 uint32
	AuctionEnableNonce       string
	StakeEnableNonce         string
	NumRoundsWithoutBleed    string
	MaximumPercentageToBleed string
	BleedPercentagePerRound  string
	UnJailValue              string
}

ValidatorSettings will hold the validator settings

type VirtualMachineConfig added in v0.0.5

type VirtualMachineConfig struct {
	OutOfProcessEnabled bool
	OutOfProcessConfig  VirtualMachineOutOfProcessConfig
}

VirtualMachineConfig holds configuration for the Virtual Machine(s)

type VirtualMachineOutOfProcessConfig added in v0.0.5

type VirtualMachineOutOfProcessConfig struct {
	LogsMarshalizer     string
	MessagesMarshalizer string
	MaxLoopTime         int
}

VirtualMachineOutOfProcessConfig holds configuration for out-of-process virtual machine(s)

type WebServerAntifloodConfig

type WebServerAntifloodConfig struct {
	SimultaneousRequests         uint32
	SameSourceRequests           uint32
	SameSourceResetIntervalInSec uint32
}

WebServerAntifloodConfig will hold the anti-lflooding parameters for the web server

Jump to

Keyboard shortcuts

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