config

package
v0.0.0-...-69704c5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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(oecConf *OecConfig) *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 LocalClient

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

func NewLocalClient

func NewLocalClient(path string, oecConf *OecConfig, 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 OecConfig

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

func GetOecConfig

func GetOecConfig() *OecConfig

func NewOecConfig

func NewOecConfig() *OecConfig

func (*OecConfig) GetActiveVC

func (c *OecConfig) GetActiveVC() bool

func (*OecConfig) GetBlockCompressFlag

func (c *OecConfig) GetBlockCompressFlag() int

func (*OecConfig) GetBlockCompressType

func (c *OecConfig) GetBlockCompressType() int

func (*OecConfig) GetBlockPartSize

func (c *OecConfig) GetBlockPartSize() int

func (*OecConfig) GetCommitGapHeight

func (c *OecConfig) GetCommitGapHeight() int64

func (*OecConfig) GetCommitGapOffset

func (c *OecConfig) GetCommitGapOffset() int64

func (*OecConfig) GetCsTimeoutCommit

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

func (*OecConfig) GetCsTimeoutPrecommit

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

func (*OecConfig) GetCsTimeoutPrecommitDelta

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

func (*OecConfig) GetCsTimeoutPrevote

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

func (*OecConfig) GetCsTimeoutPrevoteDelta

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

func (*OecConfig) GetCsTimeoutPropose

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

func (*OecConfig) GetCsTimeoutProposeDelta

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

func (*OecConfig) GetDeliverTxsExecuteMode

func (c *OecConfig) GetDeliverTxsExecuteMode() int

func (*OecConfig) GetDynamicGpCheckBlocks

func (c *OecConfig) GetDynamicGpCheckBlocks() int

func (*OecConfig) GetDynamicGpCoefficient

func (c *OecConfig) GetDynamicGpCoefficient() int

func (*OecConfig) GetDynamicGpMaxGasUsed

func (c *OecConfig) GetDynamicGpMaxGasUsed() int64

func (*OecConfig) GetDynamicGpMaxTxNum

func (c *OecConfig) GetDynamicGpMaxTxNum() int64

func (*OecConfig) GetDynamicGpMode

func (c *OecConfig) GetDynamicGpMode() int

func (*OecConfig) GetDynamicGpWeight

func (c *OecConfig) GetDynamicGpWeight() int

func (*OecConfig) GetEnableAnalyzer

func (c *OecConfig) GetEnableAnalyzer() bool

func (*OecConfig) GetEnableDeleteMinGPTx

func (c *OecConfig) GetEnableDeleteMinGPTx() bool

func (*OecConfig) GetEnableDynamicGp

func (c *OecConfig) GetEnableDynamicGp() bool

func (*OecConfig) GetEnableHasBlockPartMsg

func (c *OecConfig) GetEnableHasBlockPartMsg() bool

func (*OecConfig) GetEnablePGU

func (c *OecConfig) GetEnablePGU() bool

func (*OecConfig) GetEnableWtx

func (c *OecConfig) GetEnableWtx() bool

func (*OecConfig) GetGasLimitBuffer

func (c *OecConfig) GetGasLimitBuffer() uint64

func (*OecConfig) GetGcInterval

func (c *OecConfig) GetGcInterval() int

func (*OecConfig) GetIavlAcNoBatch

func (c *OecConfig) GetIavlAcNoBatch() bool

func (*OecConfig) GetIavlCacheSize

func (c *OecConfig) GetIavlCacheSize() int

func (*OecConfig) GetIavlFSCacheSize

func (c *OecConfig) GetIavlFSCacheSize() int64

func (*OecConfig) GetMaxGasUsedPerBlock

func (c *OecConfig) GetMaxGasUsedPerBlock() int64

func (*OecConfig) GetMaxTxNumPerBlock

func (c *OecConfig) GetMaxTxNumPerBlock() int64

func (*OecConfig) GetMempoolCacheSize

func (c *OecConfig) GetMempoolCacheSize() int

func (*OecConfig) GetMempoolCheckTxCost

func (c *OecConfig) GetMempoolCheckTxCost() bool

func (*OecConfig) GetMempoolFlush

func (c *OecConfig) GetMempoolFlush() bool

func (*OecConfig) GetMempoolForceRecheckGap

func (c *OecConfig) GetMempoolForceRecheckGap() int64

func (*OecConfig) GetMempoolRecheck

func (c *OecConfig) GetMempoolRecheck() bool

func (*OecConfig) GetMempoolSize

func (c *OecConfig) GetMempoolSize() int

func (*OecConfig) GetNodeKeyWhitelist

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

func (*OecConfig) GetPGUAdjustment

func (c *OecConfig) GetPGUAdjustment() float64

func (*OecConfig) GetSentryAddrs

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

func (*OecConfig) SetActiveVC

func (c *OecConfig) SetActiveVC(value bool)

func (*OecConfig) SetBlockCompressFlag

func (c *OecConfig) SetBlockCompressFlag(value int)

func (*OecConfig) SetBlockCompressType

func (c *OecConfig) SetBlockCompressType(value int)

func (*OecConfig) SetBlockPartSize

func (c *OecConfig) SetBlockPartSize(value int)

func (*OecConfig) SetCommitGapHeight

func (c *OecConfig) SetCommitGapHeight(value int64)

func (*OecConfig) SetCommitGapOffset

func (c *OecConfig) SetCommitGapOffset(value int64)

func (*OecConfig) SetCsTimeoutCommit

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

func (*OecConfig) SetCsTimeoutPrecommit

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

func (*OecConfig) SetCsTimeoutPrecommitDelta

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

func (*OecConfig) SetCsTimeoutPrevote

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

func (*OecConfig) SetCsTimeoutPrevoteDelta

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

func (*OecConfig) SetCsTimeoutPropose

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

func (*OecConfig) SetCsTimeoutProposeDelta

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

func (*OecConfig) SetDeliverTxsExecuteMode

func (c *OecConfig) SetDeliverTxsExecuteMode(mode int)

func (*OecConfig) SetDynamicGpCheckBlocks

func (c *OecConfig) SetDynamicGpCheckBlocks(value int)

func (*OecConfig) SetDynamicGpCoefficient

func (c *OecConfig) SetDynamicGpCoefficient(value int)

func (*OecConfig) SetDynamicGpMaxGasUsed

func (c *OecConfig) SetDynamicGpMaxGasUsed(value int64)

func (*OecConfig) SetDynamicGpMaxTxNum

func (c *OecConfig) SetDynamicGpMaxTxNum(value int64)

func (*OecConfig) SetDynamicGpMode

func (c *OecConfig) SetDynamicGpMode(value int)

func (*OecConfig) SetDynamicGpWeight

func (c *OecConfig) SetDynamicGpWeight(value int)

func (*OecConfig) SetEnableAnalyzer

func (c *OecConfig) SetEnableAnalyzer(value bool)

func (*OecConfig) SetEnableDeleteMinGPTx

func (c *OecConfig) SetEnableDeleteMinGPTx(enable bool)

func (*OecConfig) SetEnableDynamicGp

func (c *OecConfig) SetEnableDynamicGp(value bool)

func (*OecConfig) SetEnableHasBlockPartMsg

func (c *OecConfig) SetEnableHasBlockPartMsg(value bool)

func (*OecConfig) SetEnablePGU

func (c *OecConfig) SetEnablePGU(value bool)

func (*OecConfig) SetEnableWtx

func (c *OecConfig) SetEnableWtx(value bool)

func (*OecConfig) SetGasLimitBuffer

func (c *OecConfig) SetGasLimitBuffer(value uint64)

func (*OecConfig) SetGcInterval

func (c *OecConfig) SetGcInterval(value int)

func (*OecConfig) SetIavlAcNoBatch

func (c *OecConfig) SetIavlAcNoBatch(value bool)

func (*OecConfig) SetIavlCacheSize

func (c *OecConfig) SetIavlCacheSize(value int)

func (*OecConfig) SetIavlFSCacheSize

func (c *OecConfig) SetIavlFSCacheSize(value int64)

func (*OecConfig) SetMaxGasUsedPerBlock

func (c *OecConfig) SetMaxGasUsedPerBlock(value int64)

func (*OecConfig) SetMaxTxNumPerBlock

func (c *OecConfig) SetMaxTxNumPerBlock(value int64)

func (*OecConfig) SetMempoolCacheSize

func (c *OecConfig) SetMempoolCacheSize(value int)

func (*OecConfig) SetMempoolCheckTxCost

func (c *OecConfig) SetMempoolCheckTxCost(value bool)

func (*OecConfig) SetMempoolFlush

func (c *OecConfig) SetMempoolFlush(value bool)

func (*OecConfig) SetMempoolForceRecheckGap

func (c *OecConfig) SetMempoolForceRecheckGap(value int64)

func (*OecConfig) SetMempoolRecheck

func (c *OecConfig) SetMempoolRecheck(value bool)

func (*OecConfig) SetMempoolSize

func (c *OecConfig) SetMempoolSize(value int)

func (*OecConfig) SetNodeKeyWhitelist

func (c *OecConfig) SetNodeKeyWhitelist(value string)

func (*OecConfig) SetPGUAdjustment

func (c *OecConfig) SetPGUAdjustment(value float64)

func (*OecConfig) SetSentryAddrs

func (c *OecConfig) SetSentryAddrs(value string)

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