config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 32 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"
	FlagPGUPercentageThreshold     = "mempool.pgu-percentage-threshold"
	FlagPGUConcurrency             = "mempool.pgu-concurrency"
	FlagPGUAdjustment              = "mempool.pgu-adjustment"
	FlagPGUPersist                 = "mempool.pgu-persist"
	FlagNodeKeyWhitelist           = "mempool.node_key_whitelist"
	FlagMempoolCheckTxCost         = "mempool.check_tx_cost"
	FlagMempoolEnableDeleteMinGPTx = "mempool.enable_delete_min_gp_tx"
	FlagPendingPoolBlacklist       = "mempool.pending-pool-blacklist"
	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"
	FlagMaxSubscriptionClients     = "max-subscription-clients"
)
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 GetChainMaxGasUsedPerBlock

func GetChainMaxGasUsedPerBlock() int64

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(brczeroConf *BRCZeroConfig) *ApolloClient

func (*ApolloClient) LoadConfig

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

type BRCZeroConfig

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

func GetBRCZeroConfig

func GetBRCZeroConfig() *BRCZeroConfig

func NewBRCZeroConfig

func NewBRCZeroConfig() *BRCZeroConfig

func (*BRCZeroConfig) GetActiveVC

func (c *BRCZeroConfig) GetActiveVC() bool

func (*BRCZeroConfig) GetBlockCompressFlag

func (c *BRCZeroConfig) GetBlockCompressFlag() int

func (*BRCZeroConfig) GetBlockCompressType

func (c *BRCZeroConfig) GetBlockCompressType() int

func (*BRCZeroConfig) GetBlockPartSize

func (c *BRCZeroConfig) GetBlockPartSize() int

func (*BRCZeroConfig) GetCommitGapHeight

func (c *BRCZeroConfig) GetCommitGapHeight() int64

func (*BRCZeroConfig) GetCommitGapOffset

func (c *BRCZeroConfig) GetCommitGapOffset() int64

func (*BRCZeroConfig) GetCsTimeoutCommit

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

func (*BRCZeroConfig) GetCsTimeoutPrecommit

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

func (*BRCZeroConfig) GetCsTimeoutPrecommitDelta

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

func (*BRCZeroConfig) GetCsTimeoutPrevote

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

func (*BRCZeroConfig) GetCsTimeoutPrevoteDelta

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

func (*BRCZeroConfig) GetCsTimeoutPropose

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

func (*BRCZeroConfig) GetCsTimeoutProposeDelta

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

func (*BRCZeroConfig) GetDeliverTxsExecuteMode

func (c *BRCZeroConfig) GetDeliverTxsExecuteMode() int

func (*BRCZeroConfig) GetDynamicGpCheckBlocks

func (c *BRCZeroConfig) GetDynamicGpCheckBlocks() int

func (*BRCZeroConfig) GetDynamicGpCoefficient

func (c *BRCZeroConfig) GetDynamicGpCoefficient() int

func (*BRCZeroConfig) GetDynamicGpMaxGasUsed

func (c *BRCZeroConfig) GetDynamicGpMaxGasUsed() int64

func (*BRCZeroConfig) GetDynamicGpMaxTxNum

func (c *BRCZeroConfig) GetDynamicGpMaxTxNum() int64

func (*BRCZeroConfig) GetDynamicGpMode

func (c *BRCZeroConfig) GetDynamicGpMode() int

func (*BRCZeroConfig) GetDynamicGpWeight

func (c *BRCZeroConfig) GetDynamicGpWeight() int

func (*BRCZeroConfig) GetEnableAnalyzer

func (c *BRCZeroConfig) GetEnableAnalyzer() bool

func (*BRCZeroConfig) GetEnableDeleteMinGPTx

func (c *BRCZeroConfig) GetEnableDeleteMinGPTx() bool

func (*BRCZeroConfig) GetEnableDynamicGp

func (c *BRCZeroConfig) GetEnableDynamicGp() bool

func (*BRCZeroConfig) GetEnableHasBlockPartMsg

func (c *BRCZeroConfig) GetEnableHasBlockPartMsg() bool

func (*BRCZeroConfig) GetEnablePGU

func (c *BRCZeroConfig) GetEnablePGU() bool

func (*BRCZeroConfig) GetEnableWtx

func (c *BRCZeroConfig) GetEnableWtx() bool

func (*BRCZeroConfig) GetGasLimitBuffer

func (c *BRCZeroConfig) GetGasLimitBuffer() uint64

func (*BRCZeroConfig) GetGcInterval

func (c *BRCZeroConfig) GetGcInterval() int

func (*BRCZeroConfig) GetIavlAcNoBatch

func (c *BRCZeroConfig) GetIavlAcNoBatch() bool

func (*BRCZeroConfig) GetIavlCacheSize

func (c *BRCZeroConfig) GetIavlCacheSize() int

func (*BRCZeroConfig) GetIavlFSCacheSize

func (c *BRCZeroConfig) GetIavlFSCacheSize() int64

func (*BRCZeroConfig) GetMaxGasUsedPerBlock

func (c *BRCZeroConfig) GetMaxGasUsedPerBlock() int64

func (*BRCZeroConfig) GetMaxSubscriptionClients

func (c *BRCZeroConfig) GetMaxSubscriptionClients() int

func (*BRCZeroConfig) GetMaxTxNumPerBlock

func (c *BRCZeroConfig) GetMaxTxNumPerBlock() int64

func (*BRCZeroConfig) GetMempoolCacheSize

func (c *BRCZeroConfig) GetMempoolCacheSize() int

func (*BRCZeroConfig) GetMempoolCheckTxCost

func (c *BRCZeroConfig) GetMempoolCheckTxCost() bool

func (*BRCZeroConfig) GetMempoolFlush

func (c *BRCZeroConfig) GetMempoolFlush() bool

func (*BRCZeroConfig) GetMempoolForceRecheckGap

func (c *BRCZeroConfig) GetMempoolForceRecheckGap() int64

func (*BRCZeroConfig) GetMempoolRecheck

func (c *BRCZeroConfig) GetMempoolRecheck() bool

func (*BRCZeroConfig) GetMempoolSize

func (c *BRCZeroConfig) GetMempoolSize() int

func (*BRCZeroConfig) GetNodeKeyWhitelist

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

func (*BRCZeroConfig) GetPGUAdjustment

func (c *BRCZeroConfig) GetPGUAdjustment() float64

func (*BRCZeroConfig) GetPGUConcurrency

func (c *BRCZeroConfig) GetPGUConcurrency() int

func (*BRCZeroConfig) GetPGUPercentageThreshold

func (c *BRCZeroConfig) GetPGUPercentageThreshold() int64

func (*BRCZeroConfig) GetPGUPersist

func (c *BRCZeroConfig) GetPGUPersist() bool

func (*BRCZeroConfig) GetPendingPoolBlacklist

func (c *BRCZeroConfig) GetPendingPoolBlacklist() string

func (*BRCZeroConfig) GetSentryAddrs

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

func (*BRCZeroConfig) SetActiveVC

func (c *BRCZeroConfig) SetActiveVC(value bool)

func (*BRCZeroConfig) SetBlockCompressFlag

func (c *BRCZeroConfig) SetBlockCompressFlag(value int)

func (*BRCZeroConfig) SetBlockCompressType

func (c *BRCZeroConfig) SetBlockCompressType(value int)

func (*BRCZeroConfig) SetBlockPartSize

func (c *BRCZeroConfig) SetBlockPartSize(value int)

func (*BRCZeroConfig) SetCommitGapHeight

func (c *BRCZeroConfig) SetCommitGapHeight(value int64)

func (*BRCZeroConfig) SetCommitGapOffset

func (c *BRCZeroConfig) SetCommitGapOffset(value int64)

func (*BRCZeroConfig) SetCsTimeoutCommit

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

func (*BRCZeroConfig) SetCsTimeoutPrecommit

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

func (*BRCZeroConfig) SetCsTimeoutPrecommitDelta

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

func (*BRCZeroConfig) SetCsTimeoutPrevote

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

func (*BRCZeroConfig) SetCsTimeoutPrevoteDelta

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

func (*BRCZeroConfig) SetCsTimeoutPropose

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

func (*BRCZeroConfig) SetCsTimeoutProposeDelta

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

func (*BRCZeroConfig) SetDeliverTxsExecuteMode

func (c *BRCZeroConfig) SetDeliverTxsExecuteMode(mode int)

func (*BRCZeroConfig) SetDynamicGpCheckBlocks

func (c *BRCZeroConfig) SetDynamicGpCheckBlocks(value int)

func (*BRCZeroConfig) SetDynamicGpCoefficient

func (c *BRCZeroConfig) SetDynamicGpCoefficient(value int)

func (*BRCZeroConfig) SetDynamicGpMaxGasUsed

func (c *BRCZeroConfig) SetDynamicGpMaxGasUsed(value int64)

func (*BRCZeroConfig) SetDynamicGpMaxTxNum

func (c *BRCZeroConfig) SetDynamicGpMaxTxNum(value int64)

func (*BRCZeroConfig) SetDynamicGpMode

func (c *BRCZeroConfig) SetDynamicGpMode(value int)

func (*BRCZeroConfig) SetDynamicGpWeight

func (c *BRCZeroConfig) SetDynamicGpWeight(value int)

func (*BRCZeroConfig) SetEnableAnalyzer

func (c *BRCZeroConfig) SetEnableAnalyzer(value bool)

func (*BRCZeroConfig) SetEnableDeleteMinGPTx

func (c *BRCZeroConfig) SetEnableDeleteMinGPTx(enable bool)

func (*BRCZeroConfig) SetEnableDynamicGp

func (c *BRCZeroConfig) SetEnableDynamicGp(value bool)

func (*BRCZeroConfig) SetEnableHasBlockPartMsg

func (c *BRCZeroConfig) SetEnableHasBlockPartMsg(value bool)

func (*BRCZeroConfig) SetEnablePGU

func (c *BRCZeroConfig) SetEnablePGU(value bool)

func (*BRCZeroConfig) SetEnableWtx

func (c *BRCZeroConfig) SetEnableWtx(value bool)

func (*BRCZeroConfig) SetGasLimitBuffer

func (c *BRCZeroConfig) SetGasLimitBuffer(value uint64)

func (*BRCZeroConfig) SetGcInterval

func (c *BRCZeroConfig) SetGcInterval(value int)

func (*BRCZeroConfig) SetIavlAcNoBatch

func (c *BRCZeroConfig) SetIavlAcNoBatch(value bool)

func (*BRCZeroConfig) SetIavlCacheSize

func (c *BRCZeroConfig) SetIavlCacheSize(value int)

func (*BRCZeroConfig) SetIavlFSCacheSize

func (c *BRCZeroConfig) SetIavlFSCacheSize(value int64)

func (*BRCZeroConfig) SetMaxGasUsedPerBlock

func (c *BRCZeroConfig) SetMaxGasUsedPerBlock(value int64)

func (*BRCZeroConfig) SetMaxSubscriptionClients

func (c *BRCZeroConfig) SetMaxSubscriptionClients(v int)

func (*BRCZeroConfig) SetMaxTxNumPerBlock

func (c *BRCZeroConfig) SetMaxTxNumPerBlock(value int64)

func (*BRCZeroConfig) SetMempoolCacheSize

func (c *BRCZeroConfig) SetMempoolCacheSize(value int)

func (*BRCZeroConfig) SetMempoolCheckTxCost

func (c *BRCZeroConfig) SetMempoolCheckTxCost(value bool)

func (*BRCZeroConfig) SetMempoolFlush

func (c *BRCZeroConfig) SetMempoolFlush(value bool)

func (*BRCZeroConfig) SetMempoolForceRecheckGap

func (c *BRCZeroConfig) SetMempoolForceRecheckGap(value int64)

func (*BRCZeroConfig) SetMempoolRecheck

func (c *BRCZeroConfig) SetMempoolRecheck(value bool)

func (*BRCZeroConfig) SetMempoolSize

func (c *BRCZeroConfig) SetMempoolSize(value int)

func (*BRCZeroConfig) SetNodeKeyWhitelist

func (c *BRCZeroConfig) SetNodeKeyWhitelist(value string)

func (*BRCZeroConfig) SetPGUAdjustment

func (c *BRCZeroConfig) SetPGUAdjustment(value float64)

func (*BRCZeroConfig) SetPGUConcurrency

func (c *BRCZeroConfig) SetPGUConcurrency(value int)

func (*BRCZeroConfig) SetPGUPercentageThreshold

func (c *BRCZeroConfig) SetPGUPercentageThreshold(value int64)

func (*BRCZeroConfig) SetPGUPersist

func (c *BRCZeroConfig) SetPGUPersist(value bool)

func (*BRCZeroConfig) SetPendingPoolBlacklist

func (c *BRCZeroConfig) SetPendingPoolBlacklist(v string)

func (*BRCZeroConfig) SetSentryAddrs

func (c *BRCZeroConfig) SetSentryAddrs(value string)

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, brczeroConf *BRCZeroConfig, 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