keeper

package
v0.0.1-alphawasmd3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrValidatorAlreadyRegistered     = whoops.String("validator is already registered")
	ErrValidatorWithAddrNotFound      = whoops.Errorf("validator with addr %s was not found")
	ErrPublicKeyOrSignatureIsInvalid  = whoops.String("public key or signature is invalid. couldn't validate the signature.")
	ErrExternalChainAlreadyRegistered = whoops.Errorf("external chain info for chain id %s with address %s already exists")
)

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 sdk.StoreKey,
	ps paramtypes.Subspace,
	staking types.StakingKeeper,

) *Keeper

func (Keeper) GetCurrentSnapshot

func (k Keeper) GetCurrentSnapshot(ctx sdk.Context) (*types.Snapshot, error)

GetCurrentSnapshot returns the currently active snapshot.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetSigningKey

func (k Keeper) GetSigningKey(ctx sdk.Context, valAddr sdk.ValAddress) crypto.PubKey

GetSigningKey returns a signing key used by the conductor to sign arbitrary messages.

func (Keeper) Heartbeat

func (k Keeper) Heartbeat(ctx sdk.Context)

TODO: not required now

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) PunishValidator

func (k Keeper) PunishValidator(ctx sdk.Context)

TODO: not required now

func (Keeper) Register

func (k Keeper) Register(ctx sdk.Context, msg *types.MsgRegisterConductor) error

Register registers the validator as being a part of a conductor's network.

func (Keeper) RemoveExternalChainInfo

func (k Keeper) RemoveExternalChainInfo(ctx sdk.Context)

TODO: this is not required for the private alpha

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) TriggerSnapshotBuild

func (k Keeper) TriggerSnapshotBuild(ctx sdk.Context) error

TriggerSnapshotBuild creates the snapshot of currently active validators that are active and registered as conductors.

func (Keeper) ValidatorInfo

ValidatorInfo returns validator info. It's not related to a snapshot.

Jump to

Keyboard shortcuts

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