Documentation
¶
Index ¶
Constants ¶
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 )
const ( NodeTypeDefault = "" NodeTypeValidator = "validator" NodeTypeRPC = "rpc" NodeTypeArchive = "archive" )
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 )
const DefaultCronosConfigTemplate = `` /* 1893-byte string literal not displayed */
DefaultCronosConfigTemplate defines the configuration template for cronos configuration
const DefaultRocksDBConfigTemplate = `` /* 836-byte string literal not displayed */
DefaultRocksDBConfigTemplate defines the configuration template for rocksdb configuration
Variables ¶
This section is empty.
Functions ¶
func SetBech32Prefixes ¶
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