harmony

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlsConfig

type BlsConfig struct {
	KeyDir   string
	KeyFiles []string
	MaxKeys  int

	PassEnabled    bool
	PassSrcType    string
	PassFile       string
	SavePassphrase bool

	KMSEnabled       bool
	KMSConfigSrcType string
	KMSConfigFile    string
}

type ConsensusConfig

type ConsensusConfig struct {
	MinPeers     int
	AggregateSig bool
}

type DevnetConfig

type DevnetConfig struct {
	NumShards   int
	ShardSize   int
	HmyNodeSize int
	SlotsLimit  int // HIP-16: The absolute number of maximum effective slots per shard limit for each validator. 0 means no limit.
}

type DnsSync

type DnsSync struct {
	Port          int    // replaces: Network.DNSSyncPort
	Zone          string // replaces: Network.DNSZone
	LegacySyncing bool   // replaces: Network.LegacySyncing
	Client        bool   // replaces: Sync.LegacyClient
	Server        bool   // replaces: Sync.LegacyServer
	ServerPort    int
}

type GeneralConfig

type GeneralConfig struct {
	NodeType               string
	NoStaking              bool
	ShardID                int
	IsArchival             bool
	IsBackup               bool
	IsBeaconArchival       bool
	IsOffline              bool
	DataDir                string
	TraceEnable            bool
	EnablePruneBeaconChain bool
}

type HarmonyConfig

type HarmonyConfig struct {
	Version    string
	General    GeneralConfig
	Network    NetworkConfig
	P2P        P2pConfig
	HTTP       HttpConfig
	WS         WsConfig
	RPCOpt     RpcOptConfig
	BLSKeys    BlsConfig
	TxPool     TxPoolConfig
	Pprof      PprofConfig
	Log        LogConfig
	Sync       SyncConfig
	Sys        *SysConfig        `toml:",omitempty"`
	Consensus  *ConsensusConfig  `toml:",omitempty"`
	Devnet     *DevnetConfig     `toml:",omitempty"` // Deprecated
	Revert     *RevertConfig     `toml:",omitempty"`
	Legacy     *LegacyConfig     `toml:",omitempty"`
	Prometheus *PrometheusConfig `toml:",omitempty"`
	DNSSync    DnsSync
	ShardData  ShardDataConfig
}

HarmonyConfig contains all the configs user can set for running harmony binary. Served as the bridge from user set flags to internal node configs. Also user can persist this structure to a toml file to avoid inputting all arguments.

type HttpConfig

type HttpConfig struct {
	Enabled        bool
	IP             string
	Port           int
	AuthPort       int
	RosettaEnabled bool
	RosettaPort    int
}

type LegacyConfig

type LegacyConfig struct {
	WebHookConfig         *string `toml:",omitempty"`
	TPBroadcastInvalidTxn *bool   `toml:",omitempty"`
}

type LogConfig

type LogConfig struct {
	Folder        string
	FileName      string
	RotateSize    int
	RotateCount   int
	RotateMaxAge  int
	Verbosity     int
	VerbosePrints LogVerbosePrints
	Context       *LogContext `toml:",omitempty"`
}

type LogContext

type LogContext struct {
	IP   string
	Port int
}

type LogVerbosePrints

type LogVerbosePrints struct {
	Config bool
}

func FlagSliceToLogVerbosePrints

func FlagSliceToLogVerbosePrints(verbosePrintsFlagSlice []string) LogVerbosePrints

type NetworkConfig

type NetworkConfig struct {
	NetworkType string
	BootNodes   []string
}

type P2pConfig

type P2pConfig struct {
	Port                 int
	IP                   string
	KeyFile              string
	DHTDataStore         *string `toml:",omitempty"`
	DiscConcurrency      int     // Discovery Concurrency value
	MaxConnsPerIP        int
	DisablePrivateIPScan bool
}

type PprofConfig

type PprofConfig struct {
	Enabled            bool
	ListenAddr         string
	Folder             string
	ProfileNames       []string
	ProfileIntervals   []int
	ProfileDebugValues []int
}

type PrometheusConfig

type PrometheusConfig struct {
	Enabled    bool
	IP         string
	Port       int
	EnablePush bool
	Gateway    string
}

type RevertConfig

type RevertConfig struct {
	RevertBeacon bool
	RevertTo     int
	RevertBefore int
}

TODO: make `revert` to a separate command

type RpcOptConfig

type RpcOptConfig struct {
	DebugEnabled       bool   // Enables PrivateDebugService APIs, including the EVM tracer
	EthRPCsEnabled     bool   // Expose Eth RPCs
	StakingRPCsEnabled bool   // Expose Staking RPCs
	LegacyRPCsEnabled  bool   // Expose Legacy RPCs
	RpcFilterFile      string // Define filters to enable/disable RPC exposure
	RateLimterEnabled  bool   // Enable Rate limiter for RPC
	RequestsPerSecond  int    // for RPC rate limiter
}

type ShardDataConfig

type ShardDataConfig struct {
	EnableShardData bool
	DiskCount       int
	ShardCount      int
	CacheTime       int
	CacheSize       int
}

type SyncConfig

type SyncConfig struct {
	// TODO: Remove this bool after stream sync is fully up.
	Enabled        bool // enable the stream sync protocol
	Downloader     bool // start the sync downloader client
	Concurrency    int  // concurrency used for stream sync protocol
	MinPeers       int  // minimum streams to start a sync task.
	InitStreams    int  // minimum streams in bootstrap to start sync loop.
	DiscSoftLowCap int  // when number of streams is below this value, spin discover during check
	DiscHardLowCap int  // when removing stream, num is below this value, spin discovery immediately
	DiscHighCap    int  // upper limit of streams in one sync protocol
	DiscBatch      int  // size of each discovery
}

type SysConfig

type SysConfig struct {
	NtpServer string
}

type TxPoolConfig

type TxPoolConfig struct {
	BlacklistFile     string
	AllowedTxsFile    string
	RosettaFixFile    string
	AccountSlots      uint64
	LocalAccountsFile string
	GlobalSlots       uint64
}

type WsConfig

type WsConfig struct {
	Enabled  bool
	IP       string
	Port     int
	AuthPort int
}

Jump to

Keyboard shortcuts

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