config

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultTxCacheMaxTxBytes = 65536
	// DefaultMempoolGossipTTL is the re-gossip suppression window used when MempoolGossipTTL is unset.
	DefaultMempoolGossipTTL = 15 * time.Second
	// DefaultMaxTxPerBlock is the tx-per-block budget used when MaxTxPerBlock is unset.
	DefaultMaxTxPerBlock = 2900
	// DefaultMempoolTTLNumBlocks evicts mempool.type=app txs older than this many
	// blocks by arrival height, draining proposal-skipped txs that never commit.
	DefaultMempoolTTLNumBlocks = 120
)
View Source
const (
	NodeTypeDefault   = ""
	NodeTypeValidator = "validator"
	NodeTypeRPC       = "rpc"
	NodeTypeArchive   = "archive"
)
View Source
const (
	// Bech32Prefix defines the Bech32 prefix used for Cronos Accounts
	Bech32Prefix = "crc"

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)
View Source
const DefaultCronosConfigTemplate = `` /* 1893-byte string literal not displayed */

DefaultCronosConfigTemplate defines the configuration template for cronos configuration

View Source
const DefaultRocksDBConfigTemplate = `` /* 836-byte string literal not displayed */

DefaultRocksDBConfigTemplate defines the configuration template for rocksdb configuration

Variables

This section is empty.

Functions

func SetBech32Prefixes

func SetBech32Prefixes(config *sdk.Config)

SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.

Types

type CronosConfig added in v1.7.0

type CronosConfig struct {
	// Set to true to disable tx replacement.
	DisableTxReplacement bool `mapstructure:"disable-tx-replacement"`
	// Set to true to disable optimistic execution.
	DisableOptimisticExecution bool `mapstructure:"disable-optimistic-execution"`
	// Capacity of the sharded LRU tx encode/decode cache.
	// 0 = derive from mempool.max-txs at startup (cache off if unbounded/disabled). -1 = disable.
	MempoolTxCacheSize int `mapstructure:"mempool-tx-cache-size"`
	// MempoolGossipTTL is the re-gossip suppression window for mempool.type=app:
	// a tx reaped for gossip is not re-broadcast until this elapses. Bounds the
	// AppReactor's per-tick re-broadcast of the whole pool. <=0 uses the default.
	MempoolGossipTTL time.Duration `mapstructure:"mempool-gossip-ttl"`
	// MaxTxPerBlock is the shared budget used as both the gossip-reap cap
	// (txs per 500ms tick ≈ one block) and the recheck-batch cap (candidates per
	// Commit cycle ≈ one block of senders). <=0 uses the default.
	MaxTxPerBlock int `mapstructure:"mempool-txs-per-block"`
	// MempoolTxTTLEnabled evicts mempool.type=app txs older than
	// DefaultMempoolTTLNumBlocks blocks (by arrival height), draining
	// proposal-skipped txs whose sender never commits. Default true.
	MempoolTxTTLEnabled bool `mapstructure:"mempool-tx-ttl-enabled"`
	// Caches the PendingTxs() pool-scan result, invalidated on tx admission
	// and block completion. Default true. false always walks the pool.
	MempoolPendingTxCacheEnabled bool `mapstructure:"mempool-pending-tx-cache-enabled"`
}

func DefaultCronosConfig added in v1.7.0

func DefaultCronosConfig() CronosConfig

type RocksDBConfig added in v1.8.0

type RocksDBConfig struct {
	// Defines the tuning profile for RocksDB based on the node's primary workload.
	// Valid values: "", "validator", "rpc", "archive"
	NodeType string `mapstructure:"node_type"`
}

func DefaultRocksDBConfig added in v1.8.0

func DefaultRocksDBConfig() RocksDBConfig

func (*RocksDBConfig) Validate added in v1.8.0

func (c *RocksDBConfig) Validate() error

Jump to

Keyboard shortcuts

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