Documentation ¶
Index ¶
- type BlsConfig
- type ConsensusConfig
- type DevnetConfig
- type DnsSync
- type GasPriceOracleConfig
- type GeneralConfig
- type HttpConfig
- type IntelchainConfig
- type LegacyConfig
- type LogConfig
- type LogContext
- type LogVerbosePrints
- type NetworkConfig
- type P2pConfig
- type PprofConfig
- type PreimageConfig
- type PriceLimit
- type PrometheusConfig
- type RevertConfig
- type RpcOptConfig
- type ShardDataConfig
- type StagedSyncConfig
- type SyncConfig
- type SysConfig
- type TiKVConfig
- type TxPoolConfig
- type WsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusConfig ¶
type DevnetConfig ¶
type GasPriceOracleConfig ¶
type GasPriceOracleConfig struct { // the number of blocks to sample Blocks int // the number of transactions to sample, per block Transactions int // the percentile to pick from there Percentile int // the default gas price, if the above data is not available DefaultPrice int64 // the maximum suggested gas price MaxPrice int64 // when block usage (gas) for last `Blocks` blocks is below `LowUsageThreshold`, // we return the Default price LowUsageThreshold int // hack: our block header reports an 80m gas limit, but it is actually 30M. // if set to non-zero, this is applied UNCHECKED BlockGasLimit int }
type GeneralConfig ¶
type HttpConfig ¶
type IntelchainConfig ¶
type IntelchainConfig 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"` TiKV *TiKVConfig `toml:",omitempty"` DNSSync DnsSync ShardData ShardDataConfig GPO GasPriceOracleConfig Preimage *PreimageConfig }
IntelchainConfig contains all the configs user can set for running Intelchain 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.
func (IntelchainConfig) ToRPCServerConfig ¶
func (hc IntelchainConfig) ToRPCServerConfig() nodeconfig.RPCServerConfig
type LegacyConfig ¶
type LogConfig ¶
type LogConfig struct { Console bool Folder string FileName string RotateSize int RotateCount int RotateMaxAge int Verbosity int VerbosePrints LogVerbosePrints Context *LogContext `toml:",omitempty"` }
type LogContext ¶
type LogVerbosePrints ¶
type LogVerbosePrints struct {
Config bool
}
func FlagSliceToLogVerbosePrints ¶
func FlagSliceToLogVerbosePrints(verbosePrintsFlagSlice []string) LogVerbosePrints
type NetworkConfig ¶
type P2pConfig ¶
type P2pConfig struct { Port int IP string KeyFile string DHTDataStore *string `toml:",omitempty"` DiscConcurrency int // Discovery Concurrency value MaxConnsPerIP int DisablePrivateIPScan bool MaxPeers int64 // In order to disable Connection Manager, it only needs to // set both the high and low watermarks to zero. In this way, // using Connection Manager will be an optional feature. ConnManagerLowWatermark int ConnManagerHighWatermark int WaitForEachPeerToConnect bool }
type PprofConfig ¶
type PreimageConfig ¶
type PriceLimit ¶
type PriceLimit int64
func (PriceLimit) MarshalTOML ¶
func (s PriceLimit) MarshalTOML() ([]byte, error)
func (*PriceLimit) UnmarshalTOML ¶
func (s *PriceLimit) UnmarshalTOML(data interface{}) error
type PrometheusConfig ¶
type RevertConfig ¶
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 EvmCallTimeout string // Timeout for eth_call PreimagesEnabled bool // Expose preimage API }
type ShardDataConfig ¶
type StagedSyncConfig ¶
type StagedSyncConfig struct { TurboMode bool // turn on turbo mode DoubleCheckBlockHashes bool // double check all block hashes before download blocks MaxBlocksPerSyncCycle uint64 // max number of blocks per each sync cycle, if set to zero, all blocks will be synced in one full cycle MaxBackgroundBlocks uint64 // max number of background blocks in turbo mode InsertChainBatchSize int // number of blocks to build a batch and insert to chain in staged sync MaxMemSyncCycleSize uint64 // max number of blocks to use a single transaction for staged sync VerifyAllSig bool // verify signatures for all blocks regardless of height and batch size VerifyHeaderBatchSize uint64 // batch size to verify header before insert to chain UseMemDB bool // it uses memory by default. set it to false to use disk LogProgress bool // log the full sync progress in console DebugMode bool // log every single process and error to help to debug syncing issues (DebugMode is not accessible to the end user and is only an aid for development) }
type SyncConfig ¶
type SyncConfig struct { // TODO: Remove this bool after stream sync is fully up. Enabled bool // enable the stream sync protocol SyncMode uint32 // sync mode (default:Full sync, 1: Fast Sync, 2: Snap Sync(not implemented yet)) Downloader bool // start the sync downloader client StagedSync bool // use staged sync StagedSyncCfg StagedSyncConfig // staged sync configurations 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. MaxAdvertiseWaitTime int // maximum time duration between advertisements 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 TiKVConfig ¶
type TxPoolConfig ¶
Click to show internal directories.
Click to hide internal directories.