keeper

package
v1.4.2-dev1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,

	dclauthKeeper types.DclauthKeeper,
) *Keeper

func (Keeper) ApplyAndReturnValidatorSetUpdates

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

Apply and return accumulated updates to the bonded validator set. It gets called once after genesis and at every EndBlock.

Only validators that were added or were removed from the validator set are returned to Tendermint.

func (Keeper) CountLastValidators

func (k Keeper) CountLastValidators(ctx sdk.Context) (count int)

count total number of active validators.

func (Keeper) DisableValidatorApprovalsCount added in v0.10.0

func (k Keeper) DisableValidatorApprovalsCount(ctx sdk.Context) int

func (Keeper) DisableValidatorRejectApprovalsCount added in v0.11.0

func (k Keeper) DisableValidatorRejectApprovalsCount(ctx sdk.Context) int

func (Keeper) DisabledValidator added in v0.10.0

func (Keeper) DisabledValidatorAll added in v0.10.0

func (Keeper) GetAllDisabledValidator added in v0.10.0

func (k Keeper) GetAllDisabledValidator(ctx sdk.Context) (list []types.DisabledValidator)

GetAllDisabledValidator returns all disabledValidator.

func (Keeper) GetAllLastValidatorPower

func (k Keeper) GetAllLastValidatorPower(ctx sdk.Context) (list []types.LastValidatorPower)

GetAllLastValidatorPower returns all lastValidatorPower.

func (Keeper) GetAllLastValidators

func (k Keeper) GetAllLastValidators(ctx sdk.Context) (validators []types.Validator)

get all active validator set.

func (Keeper) GetAllProposedDisableValidator added in v0.10.0

func (k Keeper) GetAllProposedDisableValidator(ctx sdk.Context) (list []types.ProposedDisableValidator)

GetAllProposedDisableValidator returns all proposedDisableValidator.

func (Keeper) GetAllRejectedDisableValidator added in v0.11.0

func (k Keeper) GetAllRejectedDisableValidator(ctx sdk.Context) (list []types.RejectedDisableValidator)

GetAllRejectedNode returns all rejectedNode.

func (Keeper) GetAllValidator

func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)

GetAllValidator returns all validator.

func (Keeper) GetDisabledValidator added in v0.10.0

func (k Keeper) GetDisabledValidator(
	ctx sdk.Context,
	address string,
) (val types.DisabledValidator, found bool)

GetDisabledValidator returns a disabledValidator from its index.

func (Keeper) GetLastValidatorPower

func (k Keeper) GetLastValidatorPower(
	ctx sdk.Context,
	owner sdk.ValAddress,
) (val types.LastValidatorPower, found bool)

GetLastValidatorPower returns a lastValidatorPower from its index.

func (Keeper) GetProposedDisableValidator added in v0.10.0

func (k Keeper) GetProposedDisableValidator(
	ctx sdk.Context,
	address string,
) (val types.ProposedDisableValidator, found bool)

GetProposedDisableValidator returns a proposedDisableValidator from its index.

func (Keeper) GetRejectedNode added in v0.11.0

func (k Keeper) GetRejectedNode(
	ctx sdk.Context,
	owner string,
) (val types.RejectedDisableValidator, found bool)

GetRejectedNode returns a rejectedNode from its index.

func (Keeper) GetValidator

func (k Keeper) GetValidator(
	ctx sdk.Context,
	owner sdk.ValAddress,
) (val types.Validator, found bool)

GetValidator returns a validator from its index.

func (Keeper) GetValidatorByConsAddr

func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)

get a single validator by consensus address.

func (Keeper) HandleDoubleSign

func (k Keeper) HandleDoubleSign(ctx sdk.Context, evidence *evidencetypes.Equivocation)

handle a validator signing two blocks at the same height Zeros validator power and jail it. So validator will be removed from validator set at the end of the block.

func (Keeper) IsLastValidatorPowerPresent

func (k Keeper) IsLastValidatorPowerPresent(ctx sdk.Context, owner sdk.ValAddress) bool

Check if the validator power record associated with validator address is present in the store or not.

func (Keeper) IsValidatorPresent

func (k Keeper) IsValidatorPresent(ctx sdk.Context, owner sdk.ValAddress) bool

Check if the Validator record associated with a validator address is present in the store or not.

func (Keeper) IterateLastValidators

func (k Keeper) IterateLastValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))

iterate through the active validator set and perform the provided function.

func (Keeper) IterateValidators

func (k Keeper) IterateValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))

iterate over validators and apply function.

func (Keeper) Jail

func (k Keeper) Jail(ctx sdk.Context, validator types.Validator, reason string)

jail a validator.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) RemoveDisabledValidator added in v0.10.0

func (k Keeper) RemoveDisabledValidator(
	ctx sdk.Context,
	address string,
)

RemoveDisabledValidator removes a disabledValidator from the store.

func (Keeper) RemoveLastValidatorPower

func (k Keeper) RemoveLastValidatorPower(
	ctx sdk.Context,
	owner sdk.ValAddress,
)

RemoveLastValidatorPower removes a lastValidatorPower from the store.

func (Keeper) RemoveProposedDisableValidator added in v0.10.0

func (k Keeper) RemoveProposedDisableValidator(
	ctx sdk.Context,
	address string,
)

RemoveProposedDisableValidator removes a proposedDisableValidator from the store.

func (Keeper) RemoveRejectedNode added in v0.11.0

func (k Keeper) RemoveRejectedNode(
	ctx sdk.Context,
	owner string,
)

RemoveRejectedNode removes a rejectedNode from the store.

func (Keeper) RemoveValidator

func (k Keeper) RemoveValidator(
	ctx sdk.Context,
	owner sdk.ValAddress,
)

RemoveValidator removes a validator from the store.

func (Keeper) SetDisabledValidator added in v0.10.0

func (k Keeper) SetDisabledValidator(ctx sdk.Context, disabledValidator types.DisabledValidator)

SetDisabledValidator set a specific disabledValidator in the store from its index.

func (Keeper) SetLastValidatorPower

func (k Keeper) SetLastValidatorPower(ctx sdk.Context, lastValidatorPower types.LastValidatorPower)

SetLastValidatorPower set a specific lastValidatorPower in the store from its index.

func (Keeper) SetProposedDisableValidator added in v0.10.0

func (k Keeper) SetProposedDisableValidator(ctx sdk.Context, proposedDisableValidator types.ProposedDisableValidator)

SetProposedDisableValidator set a specific proposedDisableValidator in the store from its index.

func (Keeper) SetRejectedNode added in v0.11.0

func (k Keeper) SetRejectedNode(ctx sdk.Context, rejectedDisableValidator types.RejectedDisableValidator)

SetRejectedNode set a specific rejectedNode in the store from its index.

func (Keeper) SetValidator

func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)

SetValidator set a specific validator in the store from its index.

func (Keeper) SetValidatorByConsAddr

func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) error

validator index.

func (Keeper) Unjail

func (k Keeper) Unjail(ctx sdk.Context, validator types.Validator)

unjail a validator.

Jump to

Keyboard shortcuts

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