feechain

package
v0.0.0-...-3a5d5d8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 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
	FchNodeSize int
}

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 FeechainConfig

type FeechainConfig 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"`
	Revert     *RevertConfig     `toml:",omitempty"`
	Legacy     *LegacyConfig     `toml:",omitempty"`
	Prometheus *PrometheusConfig `toml:",omitempty"`
	DNSSync    DnsSync
	ShardData  ShardDataConfig
}

FeechainConfig contains all the configs user can set for running feechain 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 GeneralConfig

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

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
}

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
	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
	RosettaFixFile string
	AccountSlots   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