keeper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_RETRIES = 5
View Source
const (
	PrivateGovIdentity = "private-gov-identity"
)

Variables

View Source
var SupportedIDTypes = []string{PrivateGovIdentity}

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 {
	*types.IBCKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	scopedKeeper types.ScopedKeeper,
	connectionKeeper types.ConnectionKeeper,
	pk types.PepKeeper,
	stakingKeeper types.StakingKeeper,
	govKeeper types.GovKeeper,
) *Keeper

func (Keeper) AggregatedKeyShare

AggregatedKeyShare returns the aggregated key share for a particular height

func (Keeper) AggregatedKeyShareAll

AggregatedKeyShareAll returns the paginated list of all aggregated keyshares

func (Keeper) Commitments

Commitments returns the list of all keyshares submitted

func (Keeper) DecreaseAuthorizedCount

func (k Keeper) DecreaseAuthorizedCount(
	ctx sdk.Context,
	creator string,
)

func (Keeper) DeleteActiveCommitments

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

DeleteActiveCommitments deletes the active public key in the store

func (Keeper) DeleteActivePubKey

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

DeleteActivePubKey deletes the active public key in the store

func (Keeper) DeleteQueuedCommitments

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

DeleteQueuedCommitments deletes the queued public key in the store

func (Keeper) DeleteQueuedPubKey

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

DeleteQueuedPubKey deletes the queued public key in the store

func (Keeper) GetActiveCommitments

func (k Keeper) GetActiveCommitments(
	ctx sdk.Context,
) (val types.Commitments, found bool)

GetActiveCommitments returns the Active public key

func (Keeper) GetActivePubKey

func (k Keeper) GetActivePubKey(
	ctx sdk.Context,
) (val types.ActivePubKey, found bool)

GetActivePubKey returns the Active public key

func (Keeper) GetAggregatedKeyShare

func (k Keeper) GetAggregatedKeyShare(
	ctx sdk.Context,
	height uint64,

) (val types.AggregatedKeyShare, found bool)

GetAggregatedKeyShare returns a aggregatedKeyShare from its index

func (Keeper) GetAggregatedKeyShareLength

func (k Keeper) GetAggregatedKeyShareLength(
	ctx sdk.Context,
) uint64

GetAggregatedKeyShareLength returns the length of aggregatedKeyShare

func (Keeper) GetAllAggregatedKeyShare

func (k Keeper) GetAllAggregatedKeyShare(ctx sdk.Context) (list []types.AggregatedKeyShare)

GetAllAggregatedKeyShare returns all aggregatedKeyShare

func (Keeper) GetAllAuthorizedAddress

func (k Keeper) GetAllAuthorizedAddress(ctx sdk.Context) (list []types.AuthorizedAddress)

GetAllAuthorizedAddress returns all authorizedAddress

func (Keeper) GetAllGeneralKeyShare

func (k Keeper) GetAllGeneralKeyShare(ctx sdk.Context) (list []types.GeneralKeyShare)

GetAllGeneralKeyShare returns all generalKeyShare

func (Keeper) GetAllKeyShare

func (k Keeper) GetAllKeyShare(ctx sdk.Context) (list []types.KeyShare)

GetAllKeyShare returns all keyShare

func (Keeper) GetAllKeyShareRequests

func (k Keeper) GetAllKeyShareRequests(ctx sdk.Context) (list []types.KeyShareRequest)

GetAllKeyShareRequests returns all keyShare requests

func (Keeper) GetAllValidatorSet

func (k Keeper) GetAllValidatorSet(ctx sdk.Context) (list []types.ValidatorSet)

GetAllValidatorSet returns all validatorSet

func (Keeper) GetAuthorizedAddress

func (k Keeper) GetAuthorizedAddress(
	ctx sdk.Context,
	target string,

) (val types.AuthorizedAddress, found bool)

GetAuthorizedAddress returns a authorizedAddress from its index

func (Keeper) GetAuthorizedCount

func (k Keeper) GetAuthorizedCount(
	ctx sdk.Context,
	creator string,
) uint64

func (Keeper) GetGeneralKeyShare

func (k Keeper) GetGeneralKeyShare(
	ctx sdk.Context,
	validator string,
	idType string,
	idValue string,
) (val types.GeneralKeyShare, found bool)

GetGeneralKeyShare returns a generalKeyShare from its index

func (Keeper) GetKeyShare

func (k Keeper) GetKeyShare(
	ctx sdk.Context,
	validator string,
	blockHeight uint64,

) (val types.KeyShare, found bool)

GetKeyShare returns a keyShare from its index

func (Keeper) GetKeyShareRequest

func (k Keeper) GetKeyShareRequest(
	ctx sdk.Context,
	identity string,

) (val types.KeyShareRequest, found bool)

GetKeyShareRequest returns a keyShare request from its index

func (Keeper) GetLastSubmittedHeight

func (k Keeper) GetLastSubmittedHeight(ctx sdk.Context, validator string) uint64

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetQueuedCommitments

func (k Keeper) GetQueuedCommitments(
	ctx sdk.Context,
) (val types.Commitments, found bool)

GetQueuedCommitments returns the Queued public key

func (Keeper) GetQueuedPubKey

func (k Keeper) GetQueuedPubKey(
	ctx sdk.Context,
) (val types.QueuedPubKey, found bool)

GetQueuedPubKey returns the Queued public key

func (Keeper) GetRequestCount

func (k Keeper) GetRequestCount(ctx sdk.Context) string

GetRequestCount returns the request count

func (Keeper) GetValidatorSet

func (k Keeper) GetValidatorSet(
	ctx sdk.Context,
	index string,

) (val types.ValidatorSet, found bool)

GetValidatorSet returns a validatorSet from its index

func (Keeper) IncreaseAuthorizedCount

func (k Keeper) IncreaseAuthorizedCount(
	ctx sdk.Context,
	creator string,
)

func (Keeper) KeyExpiry

func (k Keeper) KeyExpiry(ctx sdk.Context) (res uint64)

KeyExpiry returns the KeyExpiry param

func (Keeper) KeyShare

KeyShare returns a single keyshare submitted by a particular validator for a particular block height

func (Keeper) KeyShareAll

KeyShareAll returns the list of all keyshares submitted

func (Keeper) Logger

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

func (Keeper) MaxIdledBlock

func (k Keeper) MaxIdledBlock(ctx sdk.Context) (res uint64)

MaxIdledBlock returns the MaxIdledBlock param

func (Keeper) MinimumBonded

func (k Keeper) MinimumBonded(ctx sdk.Context) (res uint64)

MinimumBonded returns the MinimumBonded param

func (Keeper) OnAcknowledgementAggrKeyshareDataPacket

func (k Keeper) OnAcknowledgementAggrKeyshareDataPacket(ctx sdk.Context, packet channeltypes.Packet, data types.AggrKeyshareDataPacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementAggrKeyshareDataPacket responds to the the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnRecvGetAggrKeysharePacket

func (k Keeper) OnRecvGetAggrKeysharePacket(ctx sdk.Context, packet channeltypes.Packet, data types.GetAggrKeysharePacketData) (packetAck types.GetAggrKeysharePacketAck, err error)

OnRecvGetAggrKeysharePacket processes packet reception

func (Keeper) OnRecvRequestAggrKeysharePacket

func (k Keeper) OnRecvRequestAggrKeysharePacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	data types.RequestAggrKeysharePacketData,
) (packetAck types.RequestAggrKeysharePacketAck, err error)

OnRecvRequestAggrKeysharePacket processes packet reception

func (Keeper) OnTimeoutAggrKeyshareDataPacket

func (k Keeper) OnTimeoutAggrKeyshareDataPacket(ctx sdk.Context, packet channeltypes.Packet, data types.AggrKeyshareDataPacketData) error

OnTimeoutAggrKeyshareDataPacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) OnTimeoutGetAggrKeysharePacket

func (k Keeper) OnTimeoutGetAggrKeysharePacket(ctx sdk.Context, packet channeltypes.Packet, data types.GetAggrKeysharePacketData) error

OnTimeoutGetAggrKeysharePacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) OnTimeoutRequestAggrKeysharePacket

func (k Keeper) OnTimeoutRequestAggrKeysharePacket(ctx sdk.Context, packet channeltypes.Packet, data types.RequestAggrKeysharePacketData) error

OnTimeoutRequestAggrKeysharePacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) Params

func (Keeper) ProcessGetKeyshareRequest added in v0.4.0

func (k Keeper) ProcessGetKeyshareRequest(ctx sdk.Context, msg commontypes.MsgGetAggrKeyshare,
) (rsp commontypes.MsgGetAggrKeyshareResponse, err error)

func (Keeper) ProcessKeyshareRequest added in v0.4.0

func (k Keeper) ProcessKeyshareRequest(ctx sdk.Context, msg commontypes.MsgRequestAggrKeyshare,
) (rsp commontypes.MsgRequestAggrKeyshareResponse, err error)

func (Keeper) PubKey

PubKey returns the lates public keys

func (Keeper) RemoveAggregatedKeyShare

func (k Keeper) RemoveAggregatedKeyShare(
	ctx sdk.Context,
	height uint64,

)

RemoveAggregatedKeyShare removes a aggregatedKeyShare from the store

func (Keeper) RemoveAuthorizedAddress

func (k Keeper) RemoveAuthorizedAddress(
	ctx sdk.Context,
	target string,

)

RemoveAuthorizedAddress removes a authorizedAddress from the store

func (Keeper) RemoveGeneralKeyShare

func (k Keeper) RemoveGeneralKeyShare(
	ctx sdk.Context,
	validator string,
	idType string,
	idValue string,

)

RemoveGeneralKeyShare removes a generalKeyShare from the store

func (Keeper) RemoveKeyShare

func (k Keeper) RemoveKeyShare(
	ctx sdk.Context,
	validator string,
	blockHeight uint64,

)

RemoveKeyShare removes a keyShare from the store

func (Keeper) RemoveKeyShareRequest

func (k Keeper) RemoveKeyShareRequest(
	ctx sdk.Context,
	identity string,

)

RemoveKeyShareRequest removes a keyShare request from the store

func (Keeper) RemoveValidatorSet

func (k Keeper) RemoveValidatorSet(
	ctx sdk.Context,
	index string,

)

RemoveValidatorSet removes a validatorSet from the store

func (Keeper) SetActiveCommitments

func (k Keeper) SetActiveCommitments(ctx sdk.Context, commits types.Commitments)

SetActiveCommitments set a specific public key to active in the store

func (Keeper) SetActivePubKey

func (k Keeper) SetActivePubKey(ctx sdk.Context, activePubKey types.ActivePubKey)

SetActivePubKey set a specific public key to active in the store

func (Keeper) SetAggregatedKeyShare

func (k Keeper) SetAggregatedKeyShare(ctx sdk.Context, aggregatedKeyShare types.AggregatedKeyShare)

SetAggregatedKeyShare set a specific aggregatedKeyShare in the store from its index

func (Keeper) SetAggregatedKeyShareLength

func (k Keeper) SetAggregatedKeyShareLength(ctx sdk.Context, length uint64)

SetAggregatedKeyShareLength set a specific length to aggregatedKeyShareLength

func (Keeper) SetAuthorizedAddress

func (k Keeper) SetAuthorizedAddress(ctx sdk.Context, authorizedAddress types.AuthorizedAddress)

SetAuthorizedAddress set a specific authorizedAddress in the store from its index

func (Keeper) SetGeneralKeyShare

func (k Keeper) SetGeneralKeyShare(ctx sdk.Context, generalKeyShare types.GeneralKeyShare)

SetGeneralKeyShare set a specific generalKeyShare in the store from its index

func (*Keeper) SetGovKeeper added in v0.4.0

func (k *Keeper) SetGovKeeper(govKeeper types.GovKeeper) *Keeper

func (Keeper) SetKeyShare

func (k Keeper) SetKeyShare(ctx sdk.Context, keyShare types.KeyShare)

SetKeyShare set a specific keyShare in the store from its index

func (Keeper) SetKeyShareRequest

func (k Keeper) SetKeyShareRequest(ctx sdk.Context, KeyShareRequest types.KeyShareRequest)

SetKeyShareRequest set a specific keyShare request in the store by its index

func (Keeper) SetLastSubmittedHeight

func (k Keeper) SetLastSubmittedHeight(ctx sdk.Context, validator, height string)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetQueuedCommitments

func (k Keeper) SetQueuedCommitments(ctx sdk.Context, commits types.Commitments)

SetQueuedCommitments set a specific public key in the store

func (Keeper) SetQueuedPubKey

func (k Keeper) SetQueuedPubKey(ctx sdk.Context, queuedPubKey types.QueuedPubKey)

SetQueuedPubKey set a specific public key in the store

func (Keeper) SetRequestCount

func (k Keeper) SetRequestCount(ctx sdk.Context, requestNumber uint64)

SetRequestCount sets RequestCount

func (Keeper) SetValidatorSet

func (k Keeper) SetValidatorSet(ctx sdk.Context, validatorSet types.ValidatorSet)

SetValidatorSet set a specific validatorSet in the store from its index

func (Keeper) SlashFractionNoKeyshare

func (k Keeper) SlashFractionNoKeyshare(ctx sdk.Context) (res sdk.Dec)

SlashFractionNoKeyshare returns the SlashFractionNoKeyshare param

func (Keeper) SlashFractionWrongKeyshare

func (k Keeper) SlashFractionWrongKeyshare(ctx sdk.Context) (res sdk.Dec)

SlashFractionWrongKeyshare returns the SlashFractionWrongKeyshare param

func (Keeper) StakingKeeper

func (k Keeper) StakingKeeper() types.StakingKeeper

func (Keeper) TransmitAggrKeyshareDataPacket

func (k Keeper) TransmitAggrKeyshareDataPacket(
	ctx sdk.Context,
	packetData types.AggrKeyshareDataPacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) (uint64, error)

TransmitAggrKeyshareDataPacket transmits the packet over IBC with the specified source port and source channel

func (Keeper) TransmitRequestAggrKeysharePacket

func (k Keeper) TransmitRequestAggrKeysharePacket(
	ctx sdk.Context,
	packetData types.RequestAggrKeysharePacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) (uint64, error)

TransmitRequestAggrKeysharePacket transmits the packet over IBC with the specified source port and source channel

func (Keeper) TrustedAddresses

func (k Keeper) TrustedAddresses(ctx sdk.Context) (res []string)

TrustedAddresses returns the TrustedAddresses param

func (Keeper) ValidatorSetAll

ValidatorSetAll returns the complete list of registered validators

Jump to

Keyboard shortcuts

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