keeper

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	*stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, storeService store.KVStoreService, ak stakingtypes.AccountKeeper,
	bk stakingtypes.BankKeeper, govModAddress string, vk types.VolunteerKeeper,
	validatorAddressCodec address.Codec, consensusAddressCodec address.Codec,
) *Keeper

func (Keeper) ApplyAndReturnValidatorSetUpdates

func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) (updates []abci.ValidatorUpdate, err error)

ApplyAndReturnValidatorSetUpdates applies and return accumulated updates to the bonded validator set. Also, * Updates the active valset as keyed by LastValidatorPowerKey. * Updates the total power as keyed by LastTotalPowerKey. * Updates validator status' according to updated powers. * Updates the fee pool bonded vs not-bonded tokens. * Updates relevant indices. It gets called once after genesis, another time maybe after genesis transactions, then once at every EndBlock.

CONTRACT: Only validators with non-zero power or zero-power that were bonded at the previous block height or were removed from the validator set entirely are returned to CometBFT.

func (Keeper) BlockValidatorUpdates

func (k Keeper) BlockValidatorUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error)

BlockValidatorUpdates calculates the ValidatorUpdates for the current block Called in each EndBlock

func (Keeper) GetLastValidators

func (k Keeper) GetLastValidators(ctx context.Context) (validators []types.Validator, err error)

GetLastValidators gets the group of the bonded validators

func (Keeper) TrackHistoricalInfo

func (k Keeper) TrackHistoricalInfo(ctx context.Context) error

TrackHistoricalInfo saves the latest historical-info and deletes the oldest heights that are below pruning height

Jump to

Keyboard shortcuts

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