keeper

package
v3.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 19 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.

func NewQueryServer

func NewQueryServer(k *Keeper) types.QueryServer

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	authzKeeper types.AuthzKeeper,
	rollingseedKeeper types.RollingseedKeeper,
	contentRouter *types.ContentRouter,
	cbRouter *types.CallbackRouter,
	authority string,
) *Keeper

func (Keeper) ActivateMember

func (k Keeper) ActivateMember(ctx sdk.Context, groupID tss.GroupID, address sdk.AccAddress) error

ActivateMember sets a boolean flag represent activeness of the user to true.

func (Keeper) AddCoefficientCommits

func (k Keeper) AddCoefficientCommits(
	ctx sdk.Context,
	groupID tss.GroupID,
	coefficientCommits tss.Points,
) error

AddCoefficientCommits adds each coefficient commit into the accumulated commit of its index.

func (Keeper) AddComplaintsWithStatus

func (k Keeper) AddComplaintsWithStatus(
	ctx sdk.Context,
	groupID tss.GroupID,
	complaintsWithStatus types.ComplaintsWithStatus,
)

AddComplaintsWithStatus adds the complaints with status of a member in the store and increments the confirm and complain count.

func (Keeper) AddConfirm

func (k Keeper) AddConfirm(
	ctx sdk.Context,
	groupID tss.GroupID,
	confirm types.Confirm,
)

AddConfirm adds the confirm of a member in the store and increments the confirm and complain count.

func (Keeper) AddGroup

func (k Keeper) AddGroup(
	ctx sdk.Context,
	size uint64,
	threshold uint64,
	moduleOwner string,
) tss.GroupID

AddGroup creates a new group in the store and returns the id of the group.

func (Keeper) AddPartialSignature

func (k Keeper) AddPartialSignature(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
	memberID tss.MemberID,
	signature tss.Signature,
)

AddPartialSignature adds the partial signature of a specific signing ID from the given member ID and increments the count of partial signature.

func (Keeper) AddPartialSignatureCount

func (k Keeper) AddPartialSignatureCount(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

AddPartialSignatureCount increments the count of partial signatures of a given signing ID in the store.

func (Keeper) AddPendingProcessGroup

func (k Keeper) AddPendingProcessGroup(ctx sdk.Context, groupID tss.GroupID)

AddPendingProcessGroup adds a new pending process group to the store.

func (Keeper) AddPendingProcessSigning

func (k Keeper) AddPendingProcessSigning(ctx sdk.Context, signingID tss.SigningID)

AddPendingProcessSigning adds a new pending process signing to the store.

func (Keeper) AddRound1Info

func (k Keeper) AddRound1Info(ctx sdk.Context, groupID tss.GroupID, round1Info types.Round1Info)

AddRound1Info adds the round1Info of a member in the store and increments the count of round1Info.

func (Keeper) AddRound2Info

func (k Keeper) AddRound2Info(ctx sdk.Context, groupID tss.GroupID, round2Info types.Round2Info)

AddRound2Info adds the round2Info of a member in the store and increments the count of round2Info.

func (Keeper) AddSigningExpiration

func (k Keeper) AddSigningExpiration(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

AddPendingProcessSigning adds a new pending process signing to the store.

func (Keeper) AggregatePartialSignatures

func (k Keeper) AggregatePartialSignatures(ctx sdk.Context, signingID tss.SigningID) error

AggregatePartialSignatures aggregates partial signatures and update the signing info if success.

func (Keeper) AssignMembersForSigning

func (k Keeper) AssignMembersForSigning(
	ctx sdk.Context,
	groupID tss.GroupID,
	msg []byte,
	nonce []byte,
) (types.AssignedMembers, error)

AssignMembersForSigning handles the assignment of members for a group signature process.

func (Keeper) CheckIsGrantee

func (k Keeper) CheckIsGrantee(ctx sdk.Context, granter sdk.AccAddress, grantee sdk.AccAddress) bool

CheckIsGrantee checks if the granter granted permissions to the grantee.

func (Keeper) CreateGroup

func (k Keeper) CreateGroup(
	ctx sdk.Context,
	members []sdk.AccAddress,
	threshold uint64,
	moduleOwner string,
) (tss.GroupID, error)

CreateGroup creates a new group with the given members and threshold.

func (Keeper) CreateSigning

func (k Keeper) CreateSigning(
	ctx sdk.Context,
	groupID tss.GroupID,
	originator []byte,
	contentMsg []byte,
) (tss.SigningID, error)

CreateSigning creates a signing object from an originator and contentMsg.

func (Keeper) DeactivateMember

func (k Keeper) DeactivateMember(ctx sdk.Context, groupID tss.GroupID, address sdk.AccAddress) error

DeactivateMember sets a boolean flag represent activeness of the user to false.

func (Keeper) DeleteAccumulatedCommit

func (k Keeper) DeleteAccumulatedCommit(ctx sdk.Context, groupID tss.GroupID, index uint64)

DeleteAccumulatedCommit removes a accumulated commit of a index of the group from the store.

func (Keeper) DeleteAccumulatedCommits

func (k Keeper) DeleteAccumulatedCommits(ctx sdk.Context, groupID tss.GroupID)

DeleteAccumulatedCommits removes all accumulated commit associated with a specific group ID from the store.

func (Keeper) DeleteAllComplainsWithStatus

func (k Keeper) DeleteAllComplainsWithStatus(ctx sdk.Context, groupID tss.GroupID)

DeleteAllComplainsWithStatus removes all complains with status associated with a specific group ID from the store.

func (Keeper) DeleteAllDKGInterimData

func (k Keeper) DeleteAllDKGInterimData(ctx sdk.Context, groupID tss.GroupID)

DeleteAllDKGInterimData deletes all DKG interim data for a given groupID.

func (Keeper) DeleteConfirmComplainCount

func (k Keeper) DeleteConfirmComplainCount(ctx sdk.Context, groupID tss.GroupID)

DeleteConfirmComplainCount remove the confirm complaint count data of a group from the store.

func (Keeper) DeleteConfirmComplains

func (k Keeper) DeleteConfirmComplains(ctx sdk.Context, groupID tss.GroupID)

func (Keeper) DeleteConfirms

func (k Keeper) DeleteConfirms(ctx sdk.Context, groupID tss.GroupID)

DeleteConfirms removes all confirm with a specific group ID from the store.

func (Keeper) DeleteDE

func (k Keeper) DeleteDE(ctx sdk.Context, address sdk.AccAddress, index uint64)

DeleteDE deletes the DE from the store.

func (Keeper) DeleteDKGContext

func (k Keeper) DeleteDKGContext(ctx sdk.Context, groupID tss.GroupID)

DeleteDKGContext removes the DKG context data of a group from the store.

func (Keeper) DeleteInterimSigningData

func (k Keeper) DeleteInterimSigningData(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

DeleteInterimSigningData deletes the interim signing data from the store.

func (Keeper) DeletePartialSignatureCount

func (k Keeper) DeletePartialSignatureCount(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

DeletePartialSignatureCount delete the signature count data of a given signingID and attempt from the store.

func (Keeper) DeletePartialSignatures

func (k Keeper) DeletePartialSignatures(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

DeletePartialSignatures delete partial signatures data of a given signing and attempt from the store.

func (Keeper) DeleteRound1InfoCount

func (k Keeper) DeleteRound1InfoCount(ctx sdk.Context, groupID tss.GroupID)

DeleteRound1InfoCount remove the round1Info count data of a group from the store.

func (Keeper) DeleteRound1Infos

func (k Keeper) DeleteRound1Infos(ctx sdk.Context, groupID tss.GroupID)

DeleteRound1Infos removes all round1Info associated with a specific group ID from the store.

func (Keeper) DeleteRound2InfoCount

func (k Keeper) DeleteRound2InfoCount(ctx sdk.Context, groupID tss.GroupID)

DeleteRound2InfoCount remove the round2Info count data of a group from the store.

func (Keeper) DeleteRound2Infos

func (k Keeper) DeleteRound2Infos(ctx sdk.Context, groupID tss.GroupID)

DeleteRound2Infos removes all round2Info associated with a specific group ID from the store.

func (Keeper) DeleteSigningAttempt

func (k Keeper) DeleteSigningAttempt(ctx sdk.Context, signingID tss.SigningID, attempt uint64)

DeleteSigningAttempt delete signingAttempt of a given signing ID and attempt from the store.

func (Keeper) DequeueDE

func (k Keeper) DequeueDE(ctx sdk.Context, address sdk.AccAddress) (types.DE, error)

DequeueDE retrieves a DE object from the context's KVStore for a given address and remove from the queue. Returns an error if no DE in the queue.

func (Keeper) DequeueDEs

func (k Keeper) DequeueDEs(ctx sdk.Context, members []types.Member) ([]types.DE, error)

DequeueDEs dequeues DEs from the selected members. It takes a list of member IDs (mids) and members information (members) and returns the list of selected DEs ordered by selected members.

func (Keeper) EnqueueDEs

func (k Keeper) EnqueueDEs(ctx sdk.Context, address sdk.AccAddress, des []types.DE) error

EnqueueDEs insert multiple DE objects for a given address in the context's KVStore them into the queue. It returns an error if the DE size exceeds the maximum limit.

func (Keeper) ExportGenesis

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

ExportGenesis returns a GenesisState for a given context and keeper.

func (Keeper) GetAccumulatedCommit

func (k Keeper) GetAccumulatedCommit(ctx sdk.Context, groupID tss.GroupID, index uint64) tss.Point

GetAccumulatedCommit retrieves accumulated commit of a index of the group from the store.

func (Keeper) GetAccumulatedCommitIterator

func (k Keeper) GetAccumulatedCommitIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetAccumulatedCommitIterator gets an iterator over all accumulated commits of a group.

func (Keeper) GetAllAccumulatedCommits

func (k Keeper) GetAllAccumulatedCommits(ctx sdk.Context, groupID tss.GroupID) tss.Points

GetAllAccumulatedCommits retrieves all accumulated commits of a group from the store.

func (Keeper) GetAllComplainsWithStatus

func (k Keeper) GetAllComplainsWithStatus(ctx sdk.Context, groupID tss.GroupID) []types.ComplaintsWithStatus

GetAllComplainsWithStatus retrieves all complaints with status for a given group from the store.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/tss module's authority.

func (Keeper) GetAvailableMembers

func (k Keeper) GetAvailableMembers(ctx sdk.Context, groupID tss.GroupID) []types.Member

GetAvailableMembers retrieves all members in the given group that are active and have an existing DE.

func (Keeper) GetComplainsWithStatusIterator

func (k Keeper) GetComplainsWithStatusIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetComplainsWithStatusIterator gets an iterator over all complaints with status data of a group.

func (Keeper) GetComplaintsWithStatus

func (k Keeper) GetComplaintsWithStatus(
	ctx sdk.Context,
	groupID tss.GroupID,
	memberID tss.MemberID,
) (types.ComplaintsWithStatus, error)

GetComplaintsWithStatus retrieves the complaints with status for a specific groupID and memberID from the store.

func (Keeper) GetConfirm

func (k Keeper) GetConfirm(
	ctx sdk.Context,
	groupID tss.GroupID,
	memberID tss.MemberID,
) (types.Confirm, error)

GetConfirm retrieves the confirm for a specific groupID and memberID from the store.

func (Keeper) GetConfirmComplainCount

func (k Keeper) GetConfirmComplainCount(ctx sdk.Context, groupID tss.GroupID) uint64

GetConfirmComplainCount retrieves the confirm complaint count for a specific groupID from the store.

func (Keeper) GetConfirmIterator

func (k Keeper) GetConfirmIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetConfirmIterator gets an iterator over all confirm data of a group.

func (Keeper) GetConfirms

func (k Keeper) GetConfirms(ctx sdk.Context, groupID tss.GroupID) []types.Confirm

GetConfirms retrieves all confirm for a given group from the store.

func (Keeper) GetDE

func (k Keeper) GetDE(ctx sdk.Context, address sdk.AccAddress, index uint64) (types.DE, error)

GetDE retrieves the DE's of a given address at the given index.

func (Keeper) GetDEQueue

func (k Keeper) GetDEQueue(ctx sdk.Context, address sdk.AccAddress) types.DEQueue

GetDEQueue retrieves the DE's queue information of a given address.

func (Keeper) GetDEQueueIterator

func (k Keeper) GetDEQueueIterator(ctx sdk.Context) dbm.Iterator

GetDEQueueIterator gets an iterator over all de queue from the context's KVStore

func (Keeper) GetDEsGenesis

func (k Keeper) GetDEsGenesis(ctx sdk.Context) []types.DEGenesis

GetDEsGenesis retrieves all de from the context's KVStore.

func (Keeper) GetDKGContext

func (k Keeper) GetDKGContext(ctx sdk.Context, groupID tss.GroupID) ([]byte, error)

GetDKGContext retrieves DKG context of a group from the store.

func (Keeper) GetGroup

func (k Keeper) GetGroup(ctx sdk.Context, groupID tss.GroupID) (types.Group, error)

GetGroup retrieves a group from the store.

func (Keeper) GetGroupCount

func (k Keeper) GetGroupCount(ctx sdk.Context) uint64

GetGroupCount returns the current number of all groups ever existed.

func (Keeper) GetGroupMembers

func (k Keeper) GetGroupMembers(ctx sdk.Context, groupID tss.GroupID) ([]types.Member, error)

GetGroupMembers retrieves all members of a group from the store.

func (Keeper) GetGroupMembersIterator

func (k Keeper) GetGroupMembersIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetGroupMembersIterator gets an iterator over all members of a group.

func (Keeper) GetGroupResponse

func (k Keeper) GetGroupResponse(
	ctx sdk.Context,
	groupID tss.GroupID,
) (*types.GroupResult, error)

GetGroupResponse queries group information from the given id.

func (Keeper) GetGroups

func (k Keeper) GetGroups(ctx sdk.Context) []types.Group

GetGroups retrieves all group of the store.

func (Keeper) GetGroupsIterator

func (k Keeper) GetGroupsIterator(ctx sdk.Context) dbm.Iterator

GetGroupsIterator gets an iterator all group.

func (Keeper) GetLastExpiredGroupID

func (k Keeper) GetLastExpiredGroupID(ctx sdk.Context) tss.GroupID

GetLastExpiredGroupID retrieves the last expired group ID from the store.

func (Keeper) GetMember

func (k Keeper) GetMember(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) (types.Member, error)

GetMember function retrieves a member of a group from the store.

func (Keeper) GetMemberByAddress

func (k Keeper) GetMemberByAddress(
	ctx sdk.Context,
	groupID tss.GroupID,
	address string,
) (types.Member, error)

GetMemberByAddress function retrieves a member of a group from the store by using address.

func (Keeper) GetMembers

func (k Keeper) GetMembers(ctx sdk.Context) []types.Member

GetMembers retrieves all members from store.

func (Keeper) GetMembersNotSubmitSignature

func (k Keeper) GetMembersNotSubmitSignature(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
) []sdk.AccAddress

GetMembersNotSubmitSignature get assigned members that haven't signed a requested message.

func (Keeper) GetParams

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

GetParams returns the current x/tss module parameters.

func (Keeper) GetPartialSignature

func (k Keeper) GetPartialSignature(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
	memberID tss.MemberID,
) (tss.Signature, error)

GetPartialSignature retrieves the partial signature of a specific signing ID and member ID from the store.

func (Keeper) GetPartialSignatureBySigningAttemptIterator

func (k Keeper) GetPartialSignatureBySigningAttemptIterator(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
) dbm.Iterator

GetPartialSignatureBySigningAttemptIterator gets an iterator over all partial signature of the signing at the specific attempts.

func (Keeper) GetPartialSignatureCount

func (k Keeper) GetPartialSignatureCount(ctx sdk.Context, signingID tss.SigningID, attempt uint64) uint64

GetPartialSignatureCount retrieves the count of partial signatures of a given signing ID from the store.

func (Keeper) GetPartialSignatures

func (k Keeper) GetPartialSignatures(ctx sdk.Context, signingID tss.SigningID, attempt uint64) tss.Signatures

GetPartialSignatures retrieves all partial signatures for a specific signing ID of the specific attempt from the store.

func (Keeper) GetPartialSignaturesWithKey

func (k Keeper) GetPartialSignaturesWithKey(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
) []types.PartialSignature

GetPartialSignaturesWithKey retrieves all partial signatures for a specific signing ID from the store along with their corresponding member IDs.

func (Keeper) GetPendingProcessGroups

func (k Keeper) GetPendingProcessGroups(ctx sdk.Context) []tss.GroupID

GetPendingProcessGroups retrieves the list of pending process groups from the store. It returns an empty list if the key does not exist in the store.

func (Keeper) GetPendingProcessSignings

func (k Keeper) GetPendingProcessSignings(ctx sdk.Context) []tss.SigningID

GetPendingProcessSignings retrieves the list of pending process signings from the store. It returns an empty list if the key does not exist in the store.

func (Keeper) GetPendingSignings

func (k Keeper) GetPendingSignings(ctx sdk.Context, address sdk.AccAddress) []tss.SigningID

GetPendingSignings retrieves the pending signing objects associated with the given account address.

func (Keeper) GetPendingSigningsByPubKey

func (k Keeper) GetPendingSigningsByPubKey(ctx sdk.Context, pubKey tss.Point) []tss.SigningID

GetPendingSigningsByPubKey retrieves the pending signing objects associated with the given tss public key.

func (Keeper) GetRandomMembers

func (k Keeper) GetRandomMembers(
	ctx sdk.Context,
	groupID tss.GroupID,
	nonce []byte,
) ([]types.Member, error)

GetRandomMembers select a random members from the given group for a signing process. It selects a number of 'group.Threshold' assigned members out of the available members from the given group using a deterministic random number generator (DRBG).

func (Keeper) GetRound1Info

func (k Keeper) GetRound1Info(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) (types.Round1Info, error)

GetRound1Info retrieves round1Info of a member from the store.

func (Keeper) GetRound1InfoCount

func (k Keeper) GetRound1InfoCount(ctx sdk.Context, groupID tss.GroupID) uint64

GetRound1InfoCount retrieves the count of round1Info for a group from the store.

func (Keeper) GetRound1InfoIterator

func (k Keeper) GetRound1InfoIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetRound1InfoIterator gets an iterator over all round1Info of a group.

func (Keeper) GetRound1Infos

func (k Keeper) GetRound1Infos(ctx sdk.Context, groupID tss.GroupID) []types.Round1Info

GetRound1Infos retrieves round1Infos for a group from the store.

func (Keeper) GetRound2Info

func (k Keeper) GetRound2Info(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) (types.Round2Info, error)

GetRound2Info retrieves the round2Info of a member from the store.

func (Keeper) GetRound2InfoCount

func (k Keeper) GetRound2InfoCount(ctx sdk.Context, groupID tss.GroupID) uint64

GetRound2InfoCount retrieves the count of round2Info from the store.

func (Keeper) GetRound2InfoIterator

func (k Keeper) GetRound2InfoIterator(ctx sdk.Context, groupID tss.GroupID) dbm.Iterator

GetRound2InfoIterator gets an iterator over all round2Info of a group.

func (Keeper) GetRound2Infos

func (k Keeper) GetRound2Infos(ctx sdk.Context, groupID tss.GroupID) []types.Round2Info

GetRound2Infos retrieves all round2Info for a given group from the store.

func (Keeper) GetSigning

func (k Keeper) GetSigning(ctx sdk.Context, signingID tss.SigningID) (types.Signing, error)

GetSigning retrieves the signing data of a given signing ID from the store.

func (Keeper) GetSigningAttempt

func (k Keeper) GetSigningAttempt(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
) (types.SigningAttempt, error)

GetSigningAttempt retrieves the signing attempt of a given ID and attempt from the store.

func (Keeper) GetSigningCount

func (k Keeper) GetSigningCount(ctx sdk.Context) uint64

GetSigningCount returns the current number of all signing ever existed.

func (Keeper) GetSigningExpirations

func (k Keeper) GetSigningExpirations(ctx sdk.Context) []types.SigningExpiration

GetSigningExpirations retrieves the list of signing expiration process. It returns an empty list if the key does not exist in the store.

func (Keeper) GetSigningResult

func (k Keeper) GetSigningResult(ctx sdk.Context, signingID tss.SigningID) (*types.SigningResult, error)

GetSigningResult returns the signing result of the given tss signingID.

func (Keeper) HandleExpiredGroups

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

HandleExpiredGroups cleans up expired groups and removes them from the store.

func (Keeper) HandleExpiredSignings

func (k Keeper) HandleExpiredSignings(ctx sdk.Context) []tss.SigningID

HandleExpiredSignings dequeues the first signing expiration from the store and returns list of signing IDs that should be retried.

func (Keeper) HandleFailedSigning

func (k Keeper) HandleFailedSigning(ctx sdk.Context, signingID tss.SigningID, reason string)

HandleFailedSigning handles the failed signing process by setting the signing status to fallen and emitting an event.

func (Keeper) HandleProcessGroup

func (k Keeper) HandleProcessGroup(ctx sdk.Context, groupID tss.GroupID)

HandleProcessGroup handles the pending process group based on its status. It updates the group status and emits appropriate events.

func (Keeper) HandleSigningEndBlock

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

HandleSigningEndBlock handles the logic that related to signing process at the end of a block.

func (Keeper) HasComplaintsWithStatus

func (k Keeper) HasComplaintsWithStatus(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) bool

HasComplaintsWithStatus checks if the complaints with status exists for a specific groupID and memberID in the store.

func (Keeper) HasConfirm

func (k Keeper) HasConfirm(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) bool

HasConfirm checks if a confirm exists for a specific groupID and memberID in the store.

func (Keeper) HasDE

func (k Keeper) HasDE(ctx sdk.Context, address sdk.AccAddress) bool

HasDE checks if the DE exists in the store.

func (Keeper) HasPartialSignature

func (k Keeper) HasPartialSignature(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
	memberID tss.MemberID,
) bool

HasPartialSignature checks if the partial signature of a specific signing ID and member ID exists in the store.

func (Keeper) HasRound1Info

func (k Keeper) HasRound1Info(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) bool

HasRound1Info checks if a round1Info of a member exists in the store.

func (Keeper) HasRound2Info

func (k Keeper) HasRound2Info(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) bool

HasRound2Info checks if the round2Info of a member exists in the store.

func (Keeper) InitGenesis

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

InitGenesis performs genesis initialization for the tss module.

func (Keeper) InitiateNewSigningRound

func (k Keeper) InitiateNewSigningRound(ctx sdk.Context, signingID tss.SigningID) error

InitiateNewSigningRound updates the signing information (finding new assigned members, generate group public nonce, and set the expiration height) and return the new signing information.

func (Keeper) Logger

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

func (Keeper) MarkMemberMalicious

func (k Keeper) MarkMemberMalicious(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) error

MarkMemberMalicious change member status to malicious.

func (Keeper) MustGetCurrentAssignedMembers

func (k Keeper) MustGetCurrentAssignedMembers(ctx sdk.Context, signingID tss.SigningID) []sdk.AccAddress

MustGetCurrentAssignedMembers retrieves the assigned members of a specific signing ID from the store. It will panic if the signing ID or signingAttempt does not exist.

func (Keeper) MustGetGroup

func (k Keeper) MustGetGroup(ctx sdk.Context, groupID tss.GroupID) types.Group

MustGetGroup returns the group for the given ID. Panics error if not exists.

func (Keeper) MustGetMember

func (k Keeper) MustGetMember(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) types.Member

MustGetMember returns the member for the given groupID and memberID. Panics error if not exists.

func (Keeper) MustGetMembers

func (k Keeper) MustGetMembers(ctx sdk.Context, groupID tss.GroupID) []types.Member

MustGetMembers retrieves all members of a group from the store. Panics error if not exists.

func (Keeper) MustGetSigning

func (k Keeper) MustGetSigning(ctx sdk.Context, signingID tss.SigningID) types.Signing

MustGetSigning returns the signing of the given ID. Panics error if not exists.

func (Keeper) MustGetSigningAttempt

func (k Keeper) MustGetSigningAttempt(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
) types.SigningAttempt

MustGetSigningAttempt returns the signing attempt of the given ID and attempt. Panics error if not exists.

func (Keeper) ProcessComplaint

func (k Keeper) ProcessComplaint(
	ctx sdk.Context,
	complaints []types.Complaint,
	groupID tss.GroupID,
	sender string,
) ([]types.ComplaintWithStatus, error)

ProcessComplaint processes the complaints of a group and mark the malicious member.

func (Keeper) RequestSigning

func (k Keeper) RequestSigning(
	ctx sdk.Context,
	groupID tss.GroupID,
	originator types.Originator,
	content types.Content,
) (tss.SigningID, error)

RequestSigning creates a signing request on the given content from the specific groupID.

func (Keeper) ResetDE

func (k Keeper) ResetDE(ctx sdk.Context, address sdk.AccAddress) error

ResetDE removes all DEs from the queue for a given address.

func (Keeper) SetAccumulatedCommit

func (k Keeper) SetAccumulatedCommit(ctx sdk.Context, groupID tss.GroupID, index uint64, commit tss.Point)

SetAccumulatedCommit sets accumulated commit for a index of a group.

func (Keeper) SetComplaintsWithStatus

func (k Keeper) SetComplaintsWithStatus(
	ctx sdk.Context,
	groupID tss.GroupID,
	complaintsWithStatus types.ComplaintsWithStatus,
)

SetComplaintsWithStatus sets the complaints with status for a specific groupID and memberID in the store.

func (Keeper) SetConfirm

func (k Keeper) SetConfirm(
	ctx sdk.Context,
	groupID tss.GroupID,
	confirm types.Confirm,
)

SetConfirm sets the confirm for a specific groupID and memberID in the store.

func (Keeper) SetConfirmComplainCount

func (k Keeper) SetConfirmComplainCount(ctx sdk.Context, groupID tss.GroupID, count uint64)

SetConfirmComplainCount sets the confirm complaint count for a specific groupID in the store.

func (Keeper) SetDE

func (k Keeper) SetDE(ctx sdk.Context, address sdk.AccAddress, index uint64, de types.DE)

SetDE sets a DE object in the context's KVStore for a given address at the given index.

func (Keeper) SetDEQueue

func (k Keeper) SetDEQueue(ctx sdk.Context, address sdk.AccAddress, deQueue types.DEQueue)

SetDEQueue sets the DE's queue information of a given address.

func (Keeper) SetDKGContext

func (k Keeper) SetDKGContext(ctx sdk.Context, groupID tss.GroupID, dkgContext []byte)

SetDKGContext sets DKG context for a group in the store.

func (Keeper) SetGroup

func (k Keeper) SetGroup(ctx sdk.Context, group types.Group)

SetGroup set a group in the store.

func (Keeper) SetGroupCount

func (k Keeper) SetGroupCount(ctx sdk.Context, count uint64)

SetGroupCount sets the number of group count to the given value.

func (Keeper) SetGroupGenesis

func (k Keeper) SetGroupGenesis(ctx sdk.Context, groups []types.Group)

SetGroupGenesis sets the group genesis state.

func (Keeper) SetLastExpiredGroupID

func (k Keeper) SetLastExpiredGroupID(ctx sdk.Context, groupID tss.GroupID)

SetLastExpiredGroupID sets the last expired group ID in the store.

func (Keeper) SetMember

func (k Keeper) SetMember(ctx sdk.Context, member types.Member)

SetMember sets a member of a group in the store.

func (Keeper) SetMemberIsActive

func (k Keeper) SetMemberIsActive(ctx sdk.Context, groupID tss.GroupID, address sdk.AccAddress, status bool) error

SetMemberIsActive sets a boolean flag represent activeness of the user.

func (Keeper) SetMembers

func (k Keeper) SetMembers(ctx sdk.Context, members []types.Member)

SetMembers sets members of a group in the store.

func (Keeper) SetParams

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

SetParams sets the x/tss module parameters.

func (Keeper) SetPartialSignature

func (k Keeper) SetPartialSignature(
	ctx sdk.Context,
	signingID tss.SigningID,
	attempt uint64,
	memberID tss.MemberID,
	signature tss.Signature,
)

SetPartialSignature sets the partial signature of a specific signing ID and member ID.

func (Keeper) SetPartialSignatureCount

func (k Keeper) SetPartialSignatureCount(ctx sdk.Context, signingID tss.SigningID, attempt uint64, count uint64)

SetPartialSignatureCount sets the count of partial signatures of a given signing ID in the store.

func (Keeper) SetPendingProcessGroups

func (k Keeper) SetPendingProcessGroups(ctx sdk.Context, pgs types.PendingProcessGroups)

SetPendingProcessGroups sets the given pending process groups in the store.

func (Keeper) SetPendingProcessSignings

func (k Keeper) SetPendingProcessSignings(ctx sdk.Context, pgs types.PendingProcessSignings)

SetPendingProcessSignings sets the given pending process signings in the store.

func (Keeper) SetRound1Info

func (k Keeper) SetRound1Info(ctx sdk.Context, groupID tss.GroupID, round1Info types.Round1Info)

SetRound1Info sets round1Info for a member of a group.

func (Keeper) SetRound1InfoCount

func (k Keeper) SetRound1InfoCount(ctx sdk.Context, groupID tss.GroupID, count uint64)

SetRound1InfoCount sets the count of round1Info for a group in the store.

func (Keeper) SetRound2Info

func (k Keeper) SetRound2Info(ctx sdk.Context, groupID tss.GroupID, round2Info types.Round2Info)

SetRound2Info sets the round2Info of a member in the store and increments the count of round2Info.

func (Keeper) SetRound2InfoCount

func (k Keeper) SetRound2InfoCount(ctx sdk.Context, groupID tss.GroupID, count uint64)

SetRound2InfoCount sets the count of round2Info in the store.

func (Keeper) SetSigning

func (k Keeper) SetSigning(ctx sdk.Context, signing types.Signing)

SetSigning sets the signing data of a given signing ID.

func (Keeper) SetSigningAttempt

func (k Keeper) SetSigningAttempt(ctx sdk.Context, sa types.SigningAttempt)

SetSigningAttempt sets the signing attempt of a given signing ID.

func (Keeper) SetSigningCount

func (k Keeper) SetSigningCount(ctx sdk.Context, count uint64)

SetSigningCount sets the number of signing count to the given value.

func (Keeper) SetSigningExpirations

func (k Keeper) SetSigningExpirations(ctx sdk.Context, signingExpires types.SigningExpirations)

SetSigningExpirations sets the expiration of a signing process.

func (Keeper) UpdateMemberPubKey

func (k Keeper) UpdateMemberPubKey(ctx sdk.Context, groupID tss.GroupID, memberID tss.MemberID) error

UpdateMemberPubKey computes own public key and set it to the member.

func (Keeper) ValidateMemberID

func (k Keeper) ValidateMemberID(
	ctx sdk.Context,
	groupID tss.GroupID,
	memberID tss.MemberID,
	address string,
) error

ValidateMemberID checks if the address is the given memberID of the group.

func (Keeper) ValidateRound1Info

func (k Keeper) ValidateRound1Info(
	ctx sdk.Context,
	group types.Group,
	round1Info types.Round1Info,
) error

ValidateRound1Info validates the round1Info of a group member.

func (Keeper) VerifyComplaint

func (k Keeper) VerifyComplaint(
	ctx sdk.Context,
	groupID tss.GroupID,
	complaint types.Complaint,
) error

VerifyComplaint verifies the complaint signature for a given groupID and complaint.

func (Keeper) VerifyOwnPubKeySignature

func (k Keeper) VerifyOwnPubKeySignature(
	ctx sdk.Context,
	groupID tss.GroupID,
	memberID tss.MemberID,
	ownPubKeySig tss.Signature,
) error

VerifyOwnPubKeySignature verifies the own public key signature for a given groupID, memberID, and ownPubKeySig.

Jump to

Keyboard shortcuts

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