keeper

package
v0.4.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 14 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 {
	Schema collections.Schema
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService, stk types.StakingKeeper, slk types.SlashingKeeper, valAddrCdc address.Codec, authority string) *Keeper

func (Keeper) CancelProvingSchemeActivation

func (k Keeper) CancelProvingSchemeActivation(ctx sdk.Context, index utils.SEDAKeyIndex) error

func (Keeper) CheckKeyRegistrationRate

func (k Keeper) CheckKeyRegistrationRate(ctx sdk.Context, keyIndex utils.SEDAKeyIndex) (bool, error)

CheckKeyRegistrationRate checks if the current registration rate of public keys of the given key scheme exceeds the threshold.

func (Keeper) EndBlock

func (k Keeper) EndBlock(ctx sdk.Context) (err error)

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState

ExportGenesis extracts all data from store to genesis state.

func (Keeper) GetActivationBlockDelay

func (k Keeper) GetActivationBlockDelay(ctx sdk.Context) (int64, error)

func (Keeper) GetActivationThresholdPercent

func (k Keeper) GetActivationThresholdPercent(ctx sdk.Context) (uint32, error)

func (Keeper) GetAllProvingSchemes

func (k Keeper) GetAllProvingSchemes(ctx sdk.Context) ([]types.ProvingScheme, error)

func (Keeper) GetAllValidatorPubKeys

func (k Keeper) GetAllValidatorPubKeys(ctx context.Context) ([]types.ValidatorPubKeys, error)

GetAllValidatorPubKeys returns all validator public keys in the store.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetParams

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

func (Keeper) GetProvingScheme

func (k Keeper) GetProvingScheme(ctx context.Context, index utils.SEDAKeyIndex) (types.ProvingScheme, error)

func (Keeper) GetValidatorKeyAtIndex

func (k Keeper) GetValidatorKeyAtIndex(ctx context.Context, validatorAddr sdk.ValAddress, index utils.SEDAKeyIndex) ([]byte, error)

func (Keeper) GetValidatorKeys

func (k Keeper) GetValidatorKeys(ctx context.Context, validatorAddr string) (result types.ValidatorPubKeys, err error)

GetValidatorKeys returns all public keys of a given validator.

func (Keeper) HasRegisteredKey

func (k Keeper) HasRegisteredKey(ctx context.Context, validatorAddr sdk.ValAddress, index utils.SEDAKeyIndex) (bool, error)

HasRegisteredKey returns true if the validator has registered a key at the index.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)

InitGenesis initializes the store based on the given genesis state.

func (Keeper) IsProvingSchemeActivated

func (k Keeper) IsProvingSchemeActivated(ctx context.Context, index utils.SEDAKeyIndex) (bool, error)

func (Keeper) JailValidators

func (k Keeper) JailValidators(ctx sdk.Context, keyIndex utils.SEDAKeyIndex) error

JailValidators goes through all validators in the store and jails validators without the public key corresponding to the given key scheme.

func (Keeper) Logger

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

func (Keeper) SetParams

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

func (Keeper) SetProvingScheme

func (k Keeper) SetProvingScheme(ctx context.Context, scheme types.ProvingScheme) error

func (Keeper) SetValidatorKeyAtIndex

func (k Keeper) SetValidatorKeyAtIndex(ctx context.Context, validatorAddr sdk.ValAddress, index utils.SEDAKeyIndex, pubKey []byte) error

func (Keeper) StartProvingSchemeActivation

func (k Keeper) StartProvingSchemeActivation(ctx sdk.Context, index utils.SEDAKeyIndex) error

StartProvingSchemeActivation starts the activation of the given proving scheme.

func (Keeper) StoreIndexedPubKeys

func (k Keeper) StoreIndexedPubKeys(ctx sdk.Context, valAddr sdk.ValAddress, pubKeys []types.IndexedPubKey) error

StoreIndexedPubKeys stores the given list of indexed public keys for a validator.

type Querier

type Querier struct {
	*Keeper
}

Directories

Path Synopsis
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.

Jump to

Keyboard shortcuts

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