Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error)
- func (k Keeper) CountLastValidators(ctx sdk.Context) (count int)
- func (k Keeper) DisableValidatorApprovalsCount(ctx sdk.Context) int
- func (k Keeper) DisableValidatorRejectApprovalsCount(ctx sdk.Context) int
- func (k Keeper) DisabledValidator(c context.Context, req *types.QueryGetDisabledValidatorRequest) (*types.QueryGetDisabledValidatorResponse, error)
- func (k Keeper) DisabledValidatorAll(c context.Context, req *types.QueryAllDisabledValidatorRequest) (*types.QueryAllDisabledValidatorResponse, error)
- func (k Keeper) GetAllDisabledValidator(ctx sdk.Context) (list []types.DisabledValidator)
- func (k Keeper) GetAllLastValidatorPower(ctx sdk.Context) (list []types.LastValidatorPower)
- func (k Keeper) GetAllLastValidators(ctx sdk.Context) (validators []types.Validator)
- func (k Keeper) GetAllProposedDisableValidator(ctx sdk.Context) (list []types.ProposedDisableValidator)
- func (k Keeper) GetAllRejectedDisableValidator(ctx sdk.Context) (list []types.RejectedDisableValidator)
- func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)
- func (k Keeper) GetDisabledValidator(ctx sdk.Context, address string) (val types.DisabledValidator, found bool)
- func (k Keeper) GetLastValidatorPower(ctx sdk.Context, owner sdk.ValAddress) (val types.LastValidatorPower, found bool)
- func (k Keeper) GetProposedDisableValidator(ctx sdk.Context, address string) (val types.ProposedDisableValidator, found bool)
- func (k Keeper) GetRejectedNode(ctx sdk.Context, owner string) (val types.RejectedDisableValidator, found bool)
- func (k Keeper) GetValidator(ctx sdk.Context, owner sdk.ValAddress) (val types.Validator, found bool)
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)
- func (k Keeper) HandleDoubleSign(ctx sdk.Context, evidence *evidencetypes.Equivocation)
- func (k Keeper) IsLastValidatorPowerPresent(ctx sdk.Context, owner sdk.ValAddress) bool
- func (k Keeper) IsValidatorPresent(ctx sdk.Context, owner sdk.ValAddress) bool
- func (k Keeper) IterateLastValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
- func (k Keeper) IterateValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
- func (k Keeper) Jail(ctx sdk.Context, validator types.Validator, reason string)
- func (k Keeper) LastValidatorPower(c context.Context, req *types.QueryGetLastValidatorPowerRequest) (*types.QueryGetLastValidatorPowerResponse, error)
- func (k Keeper) LastValidatorPowerAll(c context.Context, req *types.QueryAllLastValidatorPowerRequest) (*types.QueryAllLastValidatorPowerResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ProposedDisableValidator(c context.Context, req *types.QueryGetProposedDisableValidatorRequest) (*types.QueryGetProposedDisableValidatorResponse, error)
- func (k Keeper) ProposedDisableValidatorAll(c context.Context, req *types.QueryAllProposedDisableValidatorRequest) (*types.QueryAllProposedDisableValidatorResponse, error)
- func (k Keeper) RejectedDisableValidator(c context.Context, req *types.QueryGetRejectedDisableValidatorRequest) (*types.QueryGetRejectedDisableValidatorResponse, error)
- func (k Keeper) RejectedDisableValidatorAll(c context.Context, req *types.QueryAllRejectedDisableValidatorRequest) (*types.QueryAllRejectedDisableValidatorResponse, error)
- func (k Keeper) RemoveDisabledValidator(ctx sdk.Context, address string)
- func (k Keeper) RemoveLastValidatorPower(ctx sdk.Context, owner sdk.ValAddress)
- func (k Keeper) RemoveProposedDisableValidator(ctx sdk.Context, address string)
- func (k Keeper) RemoveRejectedNode(ctx sdk.Context, owner string)
- func (k Keeper) RemoveValidator(ctx sdk.Context, owner sdk.ValAddress)
- func (k Keeper) SetDisabledValidator(ctx sdk.Context, disabledValidator types.DisabledValidator)
- func (k Keeper) SetLastValidatorPower(ctx sdk.Context, lastValidatorPower types.LastValidatorPower)
- func (k Keeper) SetProposedDisableValidator(ctx sdk.Context, proposedDisableValidator types.ProposedDisableValidator)
- func (k Keeper) SetRejectedNode(ctx sdk.Context, rejectedDisableValidator types.RejectedDisableValidator)
- func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) error
- func (k Keeper) Unjail(ctx sdk.Context, validator types.Validator)
- func (k Keeper) Validator(c context.Context, req *types.QueryGetValidatorRequest) (*types.QueryGetValidatorResponse, error)
- func (k Keeper) ValidatorAll(c context.Context, req *types.QueryAllValidatorRequest) (*types.QueryAllValidatorResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 ¶
count total number of active validators.
func (Keeper) DisableValidatorApprovalsCount ¶ added in v0.10.0
func (Keeper) DisableValidatorRejectApprovalsCount ¶ added in v0.11.0
func (Keeper) DisabledValidator ¶ added in v0.10.0
func (k Keeper) DisabledValidator(c context.Context, req *types.QueryGetDisabledValidatorRequest) (*types.QueryGetDisabledValidatorResponse, error)
func (Keeper) DisabledValidatorAll ¶ added in v0.10.0
func (k Keeper) DisabledValidatorAll(c context.Context, req *types.QueryAllDisabledValidatorRequest) (*types.QueryAllDisabledValidatorResponse, error)
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 ¶
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 ¶
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 ¶
Check if the validator power record associated with validator address is present in the store or not.
func (Keeper) IsValidatorPresent ¶
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) LastValidatorPower ¶
func (k Keeper) LastValidatorPower(c context.Context, req *types.QueryGetLastValidatorPowerRequest) (*types.QueryGetLastValidatorPowerResponse, error)
func (Keeper) LastValidatorPowerAll ¶
func (k Keeper) LastValidatorPowerAll(c context.Context, req *types.QueryAllLastValidatorPowerRequest) (*types.QueryAllLastValidatorPowerResponse, error)
func (Keeper) ProposedDisableValidator ¶ added in v0.10.0
func (k Keeper) ProposedDisableValidator(c context.Context, req *types.QueryGetProposedDisableValidatorRequest) (*types.QueryGetProposedDisableValidatorResponse, error)
func (Keeper) ProposedDisableValidatorAll ¶ added in v0.10.0
func (k Keeper) ProposedDisableValidatorAll(c context.Context, req *types.QueryAllProposedDisableValidatorRequest) (*types.QueryAllProposedDisableValidatorResponse, error)
func (Keeper) RejectedDisableValidator ¶ added in v0.11.0
func (k Keeper) RejectedDisableValidator(c context.Context, req *types.QueryGetRejectedDisableValidatorRequest) (*types.QueryGetRejectedDisableValidatorResponse, error)
func (Keeper) RejectedDisableValidatorAll ¶ added in v0.11.0
func (k Keeper) RejectedDisableValidatorAll(c context.Context, req *types.QueryAllRejectedDisableValidatorRequest) (*types.QueryAllRejectedDisableValidatorResponse, error)
func (Keeper) RemoveDisabledValidator ¶ added in v0.10.0
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
RemoveProposedDisableValidator removes a proposedDisableValidator from the store.
func (Keeper) RemoveRejectedNode ¶ added in v0.11.0
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 ¶
SetValidator set a specific validator in the store from its index.
func (Keeper) SetValidatorByConsAddr ¶
validator index.
func (Keeper) Validator ¶
func (k Keeper) Validator(c context.Context, req *types.QueryGetValidatorRequest) (*types.QueryGetValidatorResponse, error)
func (Keeper) ValidatorAll ¶
func (k Keeper) ValidatorAll(c context.Context, req *types.QueryAllValidatorRequest) (*types.QueryAllValidatorResponse, error)
Source Files ¶
- disabled_validator.go
- grpc_query.go
- grpc_query_disabled_validator.go
- grpc_query_last_validator_power.go
- grpc_query_proposed_disable_validator.go
- grpc_query_rejected_node.go
- grpc_query_validator.go
- keeper.go
- last_validator_power.go
- msg_server.go
- msg_server_approve_disable_validator.go
- msg_server_create_validator.go
- msg_server_disable_validator.go
- msg_server_enable_validator.go
- msg_server_propose_disable_validator.go
- msg_server_reject_disable_node.go
- process_malicious.go
- process_validator_set_change.go
- proposed_disable_validator.go
- rejected_node.go
- validator.go