Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Attestator
- type ConsensusMsg
- type Keeper
- func (k Keeper) AddConcencusQueueType(queueTypeName types.ConsensusQueueType, typ any)
- func (k Keeper) AddMessageSignature(ctx sdk.Context, valAddr sdk.ValAddress, ...) error
- func (k Keeper) CheckAndProcessAttestedMessages(ctx sdk.Context) error
- func (k Keeper) ConsensusReached(goCtx context.Context, req *types.QueryConsensusReachedRequest) (*types.QueryConsensusReachedResponse, error)
- func (k Keeper) GetMessagesForSigning(ctx sdk.Context, queueTypeName types.ConsensusQueueType, val sdk.ValAddress) (msgs []types.QueuedSignedMessageI, err error)
- func (k Keeper) GetMessagesThatHaveReachedConsensus(ctx sdk.Context, queueTypeName types.ConsensusQueueType) ([]types.QueuedSignedMessageI, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PutMessageForSigning(ctx sdk.Context, queueTypeName types.ConsensusQueueType, msg ConsensusMsg) error
- func (k Keeper) QueuedMessagesForSigning(goCtx context.Context, req *types.QueryQueuedMessagesForSigningRequest) (*types.QueryQueuedMessagesForSigningResponse, error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) Store(ctx sdk.Context) sdk.KVStore
Constants ¶
View Source
const ( ErrIncorrectMessageType = whoops.Errorf("underlying message type does not match: %T") ErrUnableToSaveMessageWithoutID = whoops.String("unable to save message without an ID") ErrConsensusQueueNotImplemented = whoops.Errorf("consensus queue not implemented for queueTypeName %s") ErrMessageDoesNotExist = whoops.Errorf("message id %d does not exist") ErrUnableToFindPubKeyForValidator = whoops.Errorf("unable to find public key for validator: %s") ErrSignatureVerificationFailed = whoops.Errorf("signature verification failed (msgId: %d, valAddr: %s, pubKey: %s)") )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Attestator ¶
type Attestator struct { ConsensusKeeper *Keeper // contains filtered or unexported fields }
func NewAttestator ¶
func NewAttestator() *Attestator
func (*Attestator) RegisterAttestator ¶
func (a *Attestator) RegisterAttestator(att types.Attestator)
type ConsensusMsg ¶
type ConsensusMsg = types.ConsensusMsg
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, valsetKeeper types.ValsetKeeper, attestator *Attestator, ) *Keeper
func (Keeper) AddConcencusQueueType ¶
func (k Keeper) AddConcencusQueueType(queueTypeName types.ConsensusQueueType, typ any)
func (Keeper) AddMessageSignature ¶
func (k Keeper) AddMessageSignature( ctx sdk.Context, valAddr sdk.ValAddress, msgs []*types.MsgAddMessagesSignatures_MsgSignedMessage, ) error
AddMessageSignature adds signatures to the messages.
func (Keeper) CheckAndProcessAttestedMessages ¶
CheckAndProcessAttestedMessages is supposed to be used within the EndBlocker. It will get messages for the attestators that have reached a consensus and process them.
func (Keeper) ConsensusReached ¶
func (k Keeper) ConsensusReached(goCtx context.Context, req *types.QueryConsensusReachedRequest) (*types.QueryConsensusReachedResponse, error)
ConsensusReached returns messages that given a queueTypeName have reched a consensus.
func (Keeper) GetMessagesForSigning ¶
func (k Keeper) GetMessagesForSigning(ctx sdk.Context, queueTypeName types.ConsensusQueueType, val sdk.ValAddress) (msgs []types.QueuedSignedMessageI, err error)
GetMessagesForSigning returns messages for a single validator that needs to be signed.
func (Keeper) GetMessagesThatHaveReachedConsensus ¶
func (k Keeper) GetMessagesThatHaveReachedConsensus(ctx sdk.Context, queueTypeName types.ConsensusQueueType) ([]types.QueuedSignedMessageI, error)
GetMessagesThatHaveReachedConsensus returns messages from a given queueTypeName that have reached consensus based on the latest snapshot available.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PutMessageForSigning ¶
func (k Keeper) PutMessageForSigning(ctx sdk.Context, queueTypeName types.ConsensusQueueType, msg ConsensusMsg) error
func (Keeper) QueuedMessagesForSigning ¶
func (k Keeper) QueuedMessagesForSigning(goCtx context.Context, req *types.QueryQueuedMessagesForSigningRequest) (*types.QueryQueuedMessagesForSigningResponse, error)
Click to show internal directories.
Click to hide internal directories.