Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

params source realm

Package params provides functions for creating parameter executors that interface with the Params Keeper.

Overview

Package params provides functions for creating parameter executors that interface with the Params Keeper.

This package enables setting various parameter types (such as strings, integers, booleans, and byte slices) through the GovDAO proposal mechanism. Each function returns an executor that, when called, sets the specified parameter in the Params Keeper.

The executors are designed to be used within governance proposals to modify parameters dynamically. The integration with the GovDAO allows for parameter changes to be proposed and executed in a controlled manner, ensuring that modifications are subject to governance processes.

Example usage:

Example
1// This executor can be used in a governance proposal to set the parameter.
2pr := params.NewSysParamStringPropExecutor("bank", "p", "restricted_denoms")

Functions 23

func GetValoperRegisterFee

Action
1func GetValoperRegisterFee() uint64
source

GetValoperRegisterFee returns the fee (in ugnot) required to call valopers.Register. Defaults to 0 if governance hasn't set it.

func GetValoperRotationFee

Action
1func GetValoperRotationFee() uint64
source

GetValoperRotationFee returns the fee (in ugnot) required to call valopers.UpdateSigningKey. Defaults to 0.

func GetValoperRotationPeriodBlocks

Action
1func GetValoperRotationPeriodBlocks() int64
source

GetValoperRotationPeriodBlocks returns the per-operator rotation throttle (in blocks). Defaults to ~1h worth at 6s/block (600). This is the primary anti-spam defense pre-fee while rotation_fee stays at 0; tightens further once non-zero fees become enforceable.

func GetValsetEffective

Action
1func GetValsetEffective() []validators.Validator
source

GetValsetEffective returns the set that WILL be active at H+2: valset:proposed if dirty, else valset:current. Used by v3 so that (a) reads after a same-block proposal callback see that proposal's effects, and (b) sequential same-block proposals accumulate correctly on top of each other.

Misuse warning: this exists for r/sys/validators/v3's internal reads. Other realms making "is X a validator" decisions should call v3.IsValidator, not this directly, so future changes to v3's read semantics propagate uniformly.

func GetValsetEntries

Action
1func GetValsetEntries() []validators.Validator
source

GetValsetEntries returns the chain's authoritative committed validator set (the contents of valset:current). This is the V_{H+2} view — the set that will be active at H+2 once the most recent EndBlock's updates apply, NOT the set signing the current block. Callers that want "what v3 reports as the current validator set" — including the in-flight proposed set during the dirty window — should call GetValsetEffective instead.

func GetValsetPubKeyTypes

Action
1func GetValsetPubKeyTypes() []string
source

GetValsetPubKeyTypes returns the validator pubkey-type allow-list mirrored from consensus params (empty means accept any).

func NewSetHaltRequest

crossing Action
1func NewSetHaltRequest(cur realm, height int64, minVersion string) dao.ProposalRequest
source

NewSetHaltRequest creates a GovDAO proposal to halt all chain nodes at the given block height. Once approved and executed, nodes will gracefully stop after committing the specified block, enabling coordinated chain upgrades.

minVersion, if non-empty, sets the minimum binary version required to resume after the halt. Nodes will refuse to restart unless their version satisfies the minimum requirement, preventing old binaries from accidentally resuming a chain halted for an upgrade. Example: minVersion="chain/gnoland1.1" prevents gnoland1.0 from resuming.

Use height=0 to cancel a previously scheduled halt.

func SetValsetProposal

crossing Action
1func SetValsetProposal(cur realm, entries []string)
source

SetValsetProposal publishes the realm's desired valset. Each entry is "<bech32-pubkey>:<decimal-power>"; power=0 removes the validator. The chain reads this on the next EndBlocker, diffs it against valset:current, and propagates the changes to consensus.

func ValsetDirty

Action
1func ValsetDirty() bool
source

ValsetDirty reports whether valset:proposed is awaiting EndBlocker. Realm callers MUST treat this as transient: the dirty flag is set by SetValsetProposal and cleared by the chain's EndBlocker (every block where dirty=true on entry exits with dirty=false).

Imports 7

Source Files 10