config

package
v0.0.0-...-f498596 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagEnableDynamic = "config.enable-dynamic"

	FlagMempoolRecheck             = "mempool.recheck"
	FlagMempoolForceRecheckGap     = "mempool.force_recheck_gap"
	FlagMempoolSize                = "mempool.size"
	FlagMempoolCacheSize           = "mempool.cache_size"
	FlagMempoolFlush               = "mempool.flush"
	FlagMaxTxNumPerBlock           = "mempool.max_tx_num_per_block"
	FlagMaxGasUsedPerBlock         = "mempool.max_gas_used_per_block"
	FlagEnablePGU                  = "mempool.enable-pgu"
	FlagPGUAdjustment              = "mempool.pgu-adjustment"
	FlagNodeKeyWhitelist           = "mempool.node_key_whitelist"
	FlagMempoolCheckTxCost         = "mempool.check_tx_cost"
	FlagMempoolEnableDeleteMinGPTx = "mempool.enable_delete_min_gp_tx"
	FlagGasLimitBuffer             = "gas-limit-buffer"
	FlagEnableDynamicGp            = "enable-dynamic-gp"
	FlagDynamicGpMode              = "dynamic-gp-mode"
	FlagDynamicGpWeight            = "dynamic-gp-weight"
	FlagDynamicGpCheckBlocks       = "dynamic-gp-check-blocks"
	FlagDynamicGpCoefficient       = "dynamic-gp-coefficient"
	FlagDynamicGpMaxGasUsed        = "dynamic-gp-max-gas-used"
	FlagDynamicGpMaxTxNum          = "dynamic-gp-max-tx-num"
	FlagEnableWrappedTx            = "enable-wtx"
	FlagSentryAddrs                = "p2p.sentry_addrs"
	FlagCsTimeoutPropose           = "consensus.timeout_propose"
	FlagCsTimeoutProposeDelta      = "consensus.timeout_propose_delta"
	FlagCsTimeoutPrevote           = "consensus.timeout_prevote"
	FlagCsTimeoutPrevoteDelta      = "consensus.timeout_prevote_delta"
	FlagCsTimeoutPrecommit         = "consensus.timeout_precommit"
	FlagCsTimeoutPrecommitDelta    = "consensus.timeout_precommit_delta"
	FlagCsTimeoutCommit            = "consensus.timeout_commit"
	FlagEnableHasBlockPartMsg      = "enable-blockpart-ack"
	FlagDebugGcInterval            = "debug.gc-interval"
	FlagCommitGapOffset            = "commit-gap-offset"
)
View Source
const (
	FlagPprofAutoDump              = "pprof-auto-dump"
	FlagPprofCollectInterval       = "pprof-collect-interval"
	FlagPprofCpuTriggerPercentMin  = "pprof-cpu-trigger-percent-min"
	FlagPprofCpuTriggerPercentDiff = "pprof-cpu-trigger-percent-diff"
	FlagPprofCpuTriggerPercentAbs  = "pprof-cpu-trigger-percent-abs"
	FlagPprofMemTriggerPercentMin  = "pprof-mem-trigger-percent-min"
	FlagPprofMemTriggerPercentDiff = "pprof-mem-trigger-percent-diff"
	FlagPprofMemTriggerPercentAbs  = "pprof-mem-trigger-percent-abs"
	FlagPprofCoolDown              = "pprof-cool-down"
	FlagPprofAbciElapsed           = "pprof-trigger-abci-elapsed"
	FlagPprofUseCGroup             = "pprof-use-cgroup"
)
View Source
const FlagApollo = "config.apollo"
View Source
const (
	LocalDynamicConfigPath = "config.dynamic.json"
)

Variables

This section is empty.

Functions

func IsPruningOptionNothing

func IsPruningOptionNothing() bool

func PprofDownload

func PprofDownload(context *server.Context)

PprofDownload auto dump pprof

func RegisterDynamicConfig

func RegisterDynamicConfig(logger log.Logger)

Types

type ApolloClient

type ApolloClient struct {
	Namespace string
	*agollo.Client
	// contains filtered or unexported fields
}

func NewApolloClient

func NewApolloClient(fecConf *FecConfig) *ApolloClient

func (*ApolloClient) LoadConfig

func (a *ApolloClient) LoadConfig() (loaded bool)

type CustomChangeListener

type CustomChangeListener struct {
	// contains filtered or unexported fields
}

func (*CustomChangeListener) OnChange

func (c *CustomChangeListener) OnChange(changeEvent *storage.ChangeEvent)

func (*CustomChangeListener) OnNewestChange

func (c *CustomChangeListener) OnNewestChange(event *storage.FullChangeEvent)

type FecConfig

type FecConfig struct {
	// contains filtered or unexported fields
}

func GetFecConfig

func GetFecConfig() *FecConfig

func NewFecConfig

func NewFecConfig() *FecConfig

func (*FecConfig) GetActiveVC

func (c *FecConfig) GetActiveVC() bool

func (*FecConfig) GetBlockCompressFlag

func (c *FecConfig) GetBlockCompressFlag() int

func (*FecConfig) GetBlockCompressType

func (c *FecConfig) GetBlockCompressType() int

func (*FecConfig) GetBlockPartSize

func (c *FecConfig) GetBlockPartSize() int

func (*FecConfig) GetCommitGapHeight

func (c *FecConfig) GetCommitGapHeight() int64

func (*FecConfig) GetCommitGapOffset

func (c *FecConfig) GetCommitGapOffset() int64

func (*FecConfig) GetCsTimeoutCommit

func (c *FecConfig) GetCsTimeoutCommit() time.Duration

func (*FecConfig) GetCsTimeoutPrecommit

func (c *FecConfig) GetCsTimeoutPrecommit() time.Duration

func (*FecConfig) GetCsTimeoutPrecommitDelta

func (c *FecConfig) GetCsTimeoutPrecommitDelta() time.Duration

func (*FecConfig) GetCsTimeoutPrevote

func (c *FecConfig) GetCsTimeoutPrevote() time.Duration

func (*FecConfig) GetCsTimeoutPrevoteDelta

func (c *FecConfig) GetCsTimeoutPrevoteDelta() time.Duration

func (*FecConfig) GetCsTimeoutPropose

func (c *FecConfig) GetCsTimeoutPropose() time.Duration

func (*FecConfig) GetCsTimeoutProposeDelta

func (c *FecConfig) GetCsTimeoutProposeDelta() time.Duration

func (*FecConfig) GetDeliverTxsExecuteMode

func (c *FecConfig) GetDeliverTxsExecuteMode() int

func (*FecConfig) GetDynamicGpCheckBlocks

func (c *FecConfig) GetDynamicGpCheckBlocks() int

func (*FecConfig) GetDynamicGpCoefficient

func (c *FecConfig) GetDynamicGpCoefficient() int

func (*FecConfig) GetDynamicGpMaxGasUsed

func (c *FecConfig) GetDynamicGpMaxGasUsed() int64

func (*FecConfig) GetDynamicGpMaxTxNum

func (c *FecConfig) GetDynamicGpMaxTxNum() int64

func (*FecConfig) GetDynamicGpMode

func (c *FecConfig) GetDynamicGpMode() int

func (*FecConfig) GetDynamicGpWeight

func (c *FecConfig) GetDynamicGpWeight() int

func (*FecConfig) GetEnableAnalyzer

func (c *FecConfig) GetEnableAnalyzer() bool

func (*FecConfig) GetEnableDeleteMinGPTx

func (c *FecConfig) GetEnableDeleteMinGPTx() bool

func (*FecConfig) GetEnableDynamicGp

func (c *FecConfig) GetEnableDynamicGp() bool

func (*FecConfig) GetEnableHasBlockPartMsg

func (c *FecConfig) GetEnableHasBlockPartMsg() bool

func (*FecConfig) GetEnablePGU

func (c *FecConfig) GetEnablePGU() bool

func (*FecConfig) GetEnableWtx

func (c *FecConfig) GetEnableWtx() bool

func (*FecConfig) GetGasLimitBuffer

func (c *FecConfig) GetGasLimitBuffer() uint64

func (*FecConfig) GetGcInterval

func (c *FecConfig) GetGcInterval() int

func (*FecConfig) GetIavlAcNoBatch

func (c *FecConfig) GetIavlAcNoBatch() bool

func (*FecConfig) GetIavlCacheSize

func (c *FecConfig) GetIavlCacheSize() int

func (*FecConfig) GetIavlFSCacheSize

func (c *FecConfig) GetIavlFSCacheSize() int64

func (*FecConfig) GetMaxGasUsedPerBlock

func (c *FecConfig) GetMaxGasUsedPerBlock() int64

func (*FecConfig) GetMaxTxNumPerBlock

func (c *FecConfig) GetMaxTxNumPerBlock() int64

func (*FecConfig) GetMempoolCacheSize

func (c *FecConfig) GetMempoolCacheSize() int

func (*FecConfig) GetMempoolCheckTxCost

func (c *FecConfig) GetMempoolCheckTxCost() bool

func (*FecConfig) GetMempoolFlush

func (c *FecConfig) GetMempoolFlush() bool

func (*FecConfig) GetMempoolForceRecheckGap

func (c *FecConfig) GetMempoolForceRecheckGap() int64

func (*FecConfig) GetMempoolRecheck

func (c *FecConfig) GetMempoolRecheck() bool

func (*FecConfig) GetMempoolSize

func (c *FecConfig) GetMempoolSize() int

func (*FecConfig) GetNodeKeyWhitelist

func (c *FecConfig) GetNodeKeyWhitelist() []string

func (*FecConfig) GetPGUAdjustment

func (c *FecConfig) GetPGUAdjustment() float64

func (*FecConfig) GetSentryAddrs

func (c *FecConfig) GetSentryAddrs() []string

func (*FecConfig) SetActiveVC

func (c *FecConfig) SetActiveVC(value bool)

func (*FecConfig) SetBlockCompressFlag

func (c *FecConfig) SetBlockCompressFlag(value int)

func (*FecConfig) SetBlockCompressType

func (c *FecConfig) SetBlockCompressType(value int)

func (*FecConfig) SetBlockPartSize

func (c *FecConfig) SetBlockPartSize(value int)

func (*FecConfig) SetCommitGapHeight

func (c *FecConfig) SetCommitGapHeight(value int64)

func (*FecConfig) SetCommitGapOffset

func (c *FecConfig) SetCommitGapOffset(value int64)

func (*FecConfig) SetCsTimeoutCommit

func (c *FecConfig) SetCsTimeoutCommit(value time.Duration)

func (*FecConfig) SetCsTimeoutPrecommit

func (c *FecConfig) SetCsTimeoutPrecommit(value time.Duration)

func (*FecConfig) SetCsTimeoutPrecommitDelta

func (c *FecConfig) SetCsTimeoutPrecommitDelta(value time.Duration)

func (*FecConfig) SetCsTimeoutPrevote

func (c *FecConfig) SetCsTimeoutPrevote(value time.Duration)

func (*FecConfig) SetCsTimeoutPrevoteDelta

func (c *FecConfig) SetCsTimeoutPrevoteDelta(value time.Duration)

func (*FecConfig) SetCsTimeoutPropose

func (c *FecConfig) SetCsTimeoutPropose(value time.Duration)

func (*FecConfig) SetCsTimeoutProposeDelta

func (c *FecConfig) SetCsTimeoutProposeDelta(value time.Duration)

func (*FecConfig) SetDeliverTxsExecuteMode

func (c *FecConfig) SetDeliverTxsExecuteMode(mode int)

func (*FecConfig) SetDynamicGpCheckBlocks

func (c *FecConfig) SetDynamicGpCheckBlocks(value int)

func (*FecConfig) SetDynamicGpCoefficient

func (c *FecConfig) SetDynamicGpCoefficient(value int)

func (*FecConfig) SetDynamicGpMaxGasUsed

func (c *FecConfig) SetDynamicGpMaxGasUsed(value int64)

func (*FecConfig) SetDynamicGpMaxTxNum

func (c *FecConfig) SetDynamicGpMaxTxNum(value int64)

func (*FecConfig) SetDynamicGpMode

func (c *FecConfig) SetDynamicGpMode(value int)

func (*FecConfig) SetDynamicGpWeight

func (c *FecConfig) SetDynamicGpWeight(value int)

func (*FecConfig) SetEnableAnalyzer

func (c *FecConfig) SetEnableAnalyzer(value bool)

func (*FecConfig) SetEnableDeleteMinGPTx

func (c *FecConfig) SetEnableDeleteMinGPTx(enable bool)

func (*FecConfig) SetEnableDynamicGp

func (c *FecConfig) SetEnableDynamicGp(value bool)

func (*FecConfig) SetEnableHasBlockPartMsg

func (c *FecConfig) SetEnableHasBlockPartMsg(value bool)

func (*FecConfig) SetEnablePGU

func (c *FecConfig) SetEnablePGU(value bool)

func (*FecConfig) SetEnableWtx

func (c *FecConfig) SetEnableWtx(value bool)

func (*FecConfig) SetGasLimitBuffer

func (c *FecConfig) SetGasLimitBuffer(value uint64)

func (*FecConfig) SetGcInterval

func (c *FecConfig) SetGcInterval(value int)

func (*FecConfig) SetIavlAcNoBatch

func (c *FecConfig) SetIavlAcNoBatch(value bool)

func (*FecConfig) SetIavlCacheSize

func (c *FecConfig) SetIavlCacheSize(value int)

func (*FecConfig) SetIavlFSCacheSize

func (c *FecConfig) SetIavlFSCacheSize(value int64)

func (*FecConfig) SetMaxGasUsedPerBlock

func (c *FecConfig) SetMaxGasUsedPerBlock(value int64)

func (*FecConfig) SetMaxTxNumPerBlock

func (c *FecConfig) SetMaxTxNumPerBlock(value int64)

func (*FecConfig) SetMempoolCacheSize

func (c *FecConfig) SetMempoolCacheSize(value int)

func (*FecConfig) SetMempoolCheckTxCost

func (c *FecConfig) SetMempoolCheckTxCost(value bool)

func (*FecConfig) SetMempoolFlush

func (c *FecConfig) SetMempoolFlush(value bool)

func (*FecConfig) SetMempoolForceRecheckGap

func (c *FecConfig) SetMempoolForceRecheckGap(value int64)

func (*FecConfig) SetMempoolRecheck

func (c *FecConfig) SetMempoolRecheck(value bool)

func (*FecConfig) SetMempoolSize

func (c *FecConfig) SetMempoolSize(value int)

func (*FecConfig) SetNodeKeyWhitelist

func (c *FecConfig) SetNodeKeyWhitelist(value string)

func (*FecConfig) SetPGUAdjustment

func (c *FecConfig) SetPGUAdjustment(value float64)

func (*FecConfig) SetSentryAddrs

func (c *FecConfig) SetSentryAddrs(value string)

type LocalClient

type LocalClient struct {
	// contains filtered or unexported fields
}

func NewLocalClient

func NewLocalClient(path string, oecConf *FecConfig, logger log.Logger) (*LocalClient, error)

func (*LocalClient) Close

func (a *LocalClient) Close() error

func (*LocalClient) Enable

func (a *LocalClient) Enable() (err error)

func (*LocalClient) LoadConfig

func (a *LocalClient) LoadConfig() (loaded bool)

type PporfConfig

type PporfConfig struct {
	// contains filtered or unexported fields
}

func LoadPprofFromConfig

func LoadPprofFromConfig() *PporfConfig

Jump to

Keyboard shortcuts

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