Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper types.TSSKeeper, s types.Snapshotter, staker types.StakingKeeper, ...) types.MsgServiceServer
- func NewQuerier(k types.TSSKeeper, v types.Voter, s types.Snapshotter, ...) sdk.Querier
- func QueryExternalKeyID(ctx sdk.Context, k types.TSSKeeper, n types.Nexus, chainStr string) ([]byte, error)
- type Keeper
- func (k Keeper) AssertMatchesRequirements(ctx sdk.Context, snapshotter snapshot.Snapshotter, chain nexus.Chain, ...) error
- func (k Keeper) AssignNextKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole, ...) error
- func (k Keeper) DeleteAllRecoveryInfos(ctx sdk.Context, keyID exported.KeyID)
- func (k Keeper) DeleteInfoForSig(ctx sdk.Context, sigID string)
- func (k Keeper) DeleteKeygenStart(ctx sdk.Context, keyID exported.KeyID)
- func (k Keeper) DeleteMultisigKeygen(ctx sdk.Context, keyID exported.KeyID)
- func (k Keeper) DeleteMultisigSign(ctx sdk.Context, signID string)
- func (k Keeper) DeleteParticipantsInKeygen(ctx sdk.Context, keyID exported.KeyID)
- func (k Keeper) DeleteSnapshotCounterForKeyID(ctx sdk.Context, keyID exported.KeyID)
- func (k Keeper) DoesValidatorParticipateInKeygen(ctx sdk.Context, keyID exported.KeyID, validator sdk.ValAddress) bool
- func (k Keeper) DoesValidatorParticipateInSign(ctx sdk.Context, sigID string, validator sdk.ValAddress) bool
- func (k Keeper) GetAvailableOperators(ctx sdk.Context, keyIDs ...exported.KeyID) []sdk.ValAddress
- func (k Keeper) GetCurrentKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.Key, bool)
- func (k Keeper) GetCurrentKeyID(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.KeyID, bool)
- func (k Keeper) GetExternalKeyIDs(ctx sdk.Context, chain nexus.Chain) ([]exported.KeyID, bool)
- func (k Keeper) GetExternalMultisigThreshold(ctx sdk.Context) utils.Threshold
- func (k Keeper) GetGroupRecoveryInfo(ctx sdk.Context, keyID exported.KeyID) []byte
- func (k Keeper) GetHeartbeatPeriodInBlocks(ctx sdk.Context) int64
- func (k Keeper) GetInfoForSig(ctx sdk.Context, sigID string) (exported.SignInfo, bool)
- func (k Keeper) GetKey(ctx sdk.Context, keyID exported.KeyID) (exported.Key, bool)
- func (k Keeper) GetKeyByRotationCount(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole, ...) (exported.Key, bool)
- func (k Keeper) GetKeyForSigID(ctx sdk.Context, sigID string) (exported.Key, bool)
- func (k Keeper) GetKeyRequirement(ctx sdk.Context, keyRole exported.KeyRole, keyType exported.KeyType) (exported.KeyRequirement, bool)
- func (k Keeper) GetKeyRole(ctx sdk.Context, keyID exported.KeyID) exported.KeyRole
- func (k Keeper) GetKeyType(ctx sdk.Context, keyID exported.KeyID) exported.KeyType
- func (k Keeper) GetKeyUnbondingLockingKeyRotationCount(ctx sdk.Context) int64
- func (k Keeper) GetMaxMissedBlocksPerWindow(ctx sdk.Context) utils.Threshold
- func (k Keeper) GetMaxSimultaneousSignShares(ctx sdk.Context) int64
- func (k Keeper) GetMultisigKeygenInfo(ctx sdk.Context, keyID exported.KeyID) (types.MultisigKeygenInfo, bool)
- func (k Keeper) GetMultisigKeygenQueue(ctx sdk.Context) utils.SequenceKVQueue
- func (k Keeper) GetMultisigPubKey(ctx sdk.Context, keyID exported.KeyID) (exported.MultisigKey, bool)
- func (k Keeper) GetMultisigPubKeysByValidator(ctx sdk.Context, keyID exported.KeyID, val sdk.ValAddress) ([]ecdsa.PublicKey, bool)
- func (k Keeper) GetMultisigSignInfo(ctx sdk.Context, sigID string) (types.MultisigSignInfo, bool)
- func (k Keeper) GetMultisigSignQueue(ctx sdk.Context) utils.SequenceKVQueue
- func (k Keeper) GetNextKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.Key, bool)
- func (k Keeper) GetNextKeyID(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.KeyID, bool)
- func (k Keeper) GetOldActiveKeyIDs(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) ([]exported.KeyID, error)
- func (k Keeper) GetOldActiveKeys(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) ([]exported.Key, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetParticipantsInKeygen(ctx sdk.Context, keyID exported.KeyID) []sdk.ValAddress
- func (k Keeper) GetPrivateRecoveryInfo(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID) []byte
- func (k Keeper) GetRotationCount(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) int64
- func (k Keeper) GetRotationCountOfKeyID(ctx sdk.Context, keyID exported.KeyID) (int64, bool)
- func (k Keeper) GetRouter() types.Router
- func (k Keeper) GetSig(ctx sdk.Context, sigID string) (exported.Signature, exported.SigStatus)
- func (k Keeper) GetSignParticipants(ctx sdk.Context, sigID string) []string
- func (k Keeper) GetSignParticipantsAsJSON(ctx sdk.Context, sigID string) []byte
- func (k Keeper) GetSignParticipantsShares(ctx sdk.Context, sigID string) []int64
- func (k Keeper) GetSignParticipantsSharesAsJSON(ctx sdk.Context, sigID string) []byte
- func (k Keeper) GetSignQueue(ctx sdk.Context) utils.SequenceKVQueue
- func (k Keeper) GetSnapshotCounterForKeyID(ctx sdk.Context, keyID exported.KeyID) (int64, bool)
- func (k Keeper) GetTssSuspendedUntil(ctx sdk.Context, validator sdk.ValAddress) int64
- func (k Keeper) HasKeygenStarted(ctx sdk.Context, keyID exported.KeyID) bool
- func (k Keeper) HasPrivateRecoveryInfos(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID) bool
- func (k Keeper) IsMultisigKeygenCompleted(ctx sdk.Context, keyID exported.KeyID) bool
- func (k Keeper) IsOperatorAvailable(ctx sdk.Context, validator sdk.ValAddress, keyIDs ...exported.KeyID) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) PenalizeCriminal(ctx sdk.Context, criminal sdk.ValAddress, ...)
- func (k Keeper) RotateKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) error
- func (k Keeper) SelectSignParticipants(ctx sdk.Context, snapshotter types.Snapshotter, info exported.SignInfo, ...) ([]snapshot.Validator, []snapshot.Validator, error)
- func (k Keeper) SetAvailableOperator(ctx sdk.Context, validator sdk.ValAddress, presentKeys ...exported.KeyID)
- func (k Keeper) SetExternalKeyIDs(ctx sdk.Context, chain nexus.Chain, keyIDs []exported.KeyID)
- func (k Keeper) SetGroupRecoveryInfo(ctx sdk.Context, keyID exported.KeyID, recoveryInfo []byte)
- func (k Keeper) SetInfoForSig(ctx sdk.Context, sigID string, info exported.SignInfo)
- func (k Keeper) SetKey(ctx sdk.Context, key exported.Key)
- func (k Keeper) SetKeyInfo(ctx sdk.Context, keyInfo types.KeyInfo)
- func (k Keeper) SetMultisigKeygenInfo(ctx sdk.Context, info types.MultisigInfo)
- func (k Keeper) SetMultisigSignInfo(ctx sdk.Context, info types.MultisigInfo)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params)
- func (k Keeper) SetPrivateRecoveryInfo(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID, ...)
- func (k *Keeper) SetRouter(router types.Router)
- func (k Keeper) SetSig(ctx sdk.Context, signature exported.Signature)
- func (k Keeper) SetSigStatus(ctx sdk.Context, sigID string, status exported.SigStatus)
- func (k Keeper) StartKeygen(ctx sdk.Context, voter types.Voter, keyInfo types.KeyInfo, ...) error
- func (k Keeper) StartSign(ctx sdk.Context, info exported.SignInfo, snapshotter types.Snapshotter, ...) error
- func (k Keeper) SubmitPubKeys(ctx sdk.Context, keyID exported.KeyID, validator sdk.ValAddress, ...) bool
- func (k Keeper) SubmitSignatures(ctx sdk.Context, sigID string, validator sdk.ValAddress, sigs ...[]byte) bool
Constants ¶
const ( QuerySignature = "signature" QueryKey = "key" QueryRecovery = "recovery" QueryKeyID = "key-id" QueryNextKeyID = "next-key-id" QueryActiveOldKeys = "active-old-keys" QueryActiveOldKeysByValidator = "active-old-keys-validator" QueryDeactivated = "deactivated" QExternalKeyID = "external-key-id" )
Query paths
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper types.TSSKeeper, s types.Snapshotter, staker types.StakingKeeper, v types.Voter, n types.Nexus, rewarder types.Rewarder) types.MsgServiceServer
NewMsgServerImpl returns an implementation of the broadcast MsgServiceServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k types.TSSKeeper, v types.Voter, s types.Snapshotter, staking types.StakingKeeper, n types.Nexus) sdk.Querier
NewQuerier returns a new querier for the TSS module
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper allows access to the broadcast state
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace params.Subspace, slasher snapshot.Slasher, rewarder types.Rewarder) Keeper
NewKeeper constructs a tss keeper
func (Keeper) AssertMatchesRequirements ¶
func (k Keeper) AssertMatchesRequirements(ctx sdk.Context, snapshotter snapshot.Snapshotter, chain nexus.Chain, keyID exported.KeyID, keyRole exported.KeyRole) error
AssertMatchesRequirements checks if the properties of the given key match the requirements for the given role
func (Keeper) AssignNextKey ¶
func (k Keeper) AssignNextKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole, keyID exported.KeyID) error
AssignNextKey stores a new key for a given chain which will become the default once RotateKey is called
func (Keeper) DeleteAllRecoveryInfos ¶
DeleteAllRecoveryInfos removes all recovery infos (private and group) associated to the given key ID
func (Keeper) DeleteInfoForSig ¶
DeleteInfoForSig deletes the key ID associated with the given signature
func (Keeper) DeleteKeygenStart ¶
DeleteKeygenStart deletes the start height for the given key
func (Keeper) DeleteMultisigKeygen ¶
DeleteMultisigKeygen deletes the multisig keygen info for the given key ID
func (Keeper) DeleteMultisigSign ¶
DeleteMultisigSign deletes the multisig sign info for the given sig ID
func (Keeper) DeleteParticipantsInKeygen ¶
DeleteParticipantsInKeygen deletes the participants in the given key genereation
func (Keeper) DeleteSnapshotCounterForKeyID ¶
DeleteSnapshotCounterForKeyID deletes the snapshot counter for the given key
func (Keeper) DoesValidatorParticipateInKeygen ¶
func (k Keeper) DoesValidatorParticipateInKeygen(ctx sdk.Context, keyID exported.KeyID, validator sdk.ValAddress) bool
DoesValidatorParticipateInKeygen returns true if given validator participates in key gen for the given key ID; otherwise, false
func (Keeper) DoesValidatorParticipateInSign ¶
func (k Keeper) DoesValidatorParticipateInSign(ctx sdk.Context, sigID string, validator sdk.ValAddress) bool
DoesValidatorParticipateInSign returns true if given validator participates in signing for the given sig ID; otherwise, false
func (Keeper) GetAvailableOperators ¶
GetAvailableOperators gets all operators that still have a non-stale heartbeat
func (Keeper) GetCurrentKey ¶
func (k Keeper) GetCurrentKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.Key, bool)
GetCurrentKey returns the current key for given chain and role
func (Keeper) GetCurrentKeyID ¶
func (k Keeper) GetCurrentKeyID(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.KeyID, bool)
GetCurrentKeyID returns the current key ID for given chain and role
func (Keeper) GetExternalKeyIDs ¶
GetExternalKeyIDs retrieves the current list of external key IDs
func (Keeper) GetExternalMultisigThreshold ¶
GetExternalMultisigThreshold returns the external multisig threshold
func (Keeper) GetGroupRecoveryInfo ¶
GetGroupRecoveryInfo returns a party's group recovery info of a specific key ID
func (Keeper) GetHeartbeatPeriodInBlocks ¶
GetHeartbeatPeriodInBlocks returns the heartbeat event period
func (Keeper) GetInfoForSig ¶
GetInfoForSig stores key ID for the given sig ID
func (Keeper) GetKeyByRotationCount ¶
func (k Keeper) GetKeyByRotationCount(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole, rotationCount int64) (exported.Key, bool)
GetKeyByRotationCount returns the key for given chain and key role by rotation count
func (Keeper) GetKeyForSigID ¶
GetKeyForSigID returns the key that produced the signature corresponding to the given ID
func (Keeper) GetKeyRequirement ¶
func (k Keeper) GetKeyRequirement(ctx sdk.Context, keyRole exported.KeyRole, keyType exported.KeyType) (exported.KeyRequirement, bool)
GetKeyRequirement gets the key requirement for a given chain of a given role
func (Keeper) GetKeyRole ¶
GetKeyRole returns the role of the given key
func (Keeper) GetKeyType ¶
GetKeyType returns the key type of the given keyID
func (Keeper) GetKeyUnbondingLockingKeyRotationCount ¶
GetKeyUnbondingLockingKeyRotationCount returns the number of key iterations share holds must stay before they can unbond
func (Keeper) GetMaxMissedBlocksPerWindow ¶
GetMaxMissedBlocksPerWindow returns the maximum percent of blocks a validator is allowed to miss per signing window
func (Keeper) GetMaxSimultaneousSignShares ¶
GetMaxSimultaneousSignShares returns the max simultaneous number of sign shares
func (Keeper) GetMultisigKeygenInfo ¶
func (k Keeper) GetMultisigKeygenInfo(ctx sdk.Context, keyID exported.KeyID) (types.MultisigKeygenInfo, bool)
GetMultisigKeygenInfo returns the MultisigKeygenInfo
func (Keeper) GetMultisigKeygenQueue ¶
func (k Keeper) GetMultisigKeygenQueue(ctx sdk.Context) utils.SequenceKVQueue
GetMultisigKeygenQueue returns the multisig keygen timeout queue
func (Keeper) GetMultisigPubKey ¶
func (k Keeper) GetMultisigPubKey(ctx sdk.Context, keyID exported.KeyID) (exported.MultisigKey, bool)
GetMultisigPubKey returns the pub keys for a given keyID, if it exists
func (Keeper) GetMultisigPubKeysByValidator ¶
func (k Keeper) GetMultisigPubKeysByValidator(ctx sdk.Context, keyID exported.KeyID, val sdk.ValAddress) ([]ecdsa.PublicKey, bool)
GetMultisigPubKeysByValidator returns the pub keys a validator has for the given keyID
func (Keeper) GetMultisigSignInfo ¶
GetMultisigSignInfo returns the MultisigSignInfo
func (Keeper) GetMultisigSignQueue ¶
func (k Keeper) GetMultisigSignQueue(ctx sdk.Context) utils.SequenceKVQueue
GetMultisigSignQueue returns the multisig sign timeout queue
func (Keeper) GetNextKey ¶
func (k Keeper) GetNextKey(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.Key, bool)
GetNextKey returns the next key for given chain and role
func (Keeper) GetNextKeyID ¶
func (k Keeper) GetNextKeyID(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) (exported.KeyID, bool)
GetNextKeyID returns the next key ID for given chain and role
func (Keeper) GetOldActiveKeyIDs ¶
func (k Keeper) GetOldActiveKeyIDs(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) ([]exported.KeyID, error)
GetOldActiveKeyIDs gets all the old key IDs of given key role that are still active for chain
func (Keeper) GetOldActiveKeys ¶
func (k Keeper) GetOldActiveKeys(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) ([]exported.Key, error)
GetOldActiveKeys gets all the old keys of given key role that are still active for chain
func (Keeper) GetParticipantsInKeygen ¶
GetParticipantsInKeygen gets the keygen participants in the given keyID
func (Keeper) GetPrivateRecoveryInfo ¶
func (k Keeper) GetPrivateRecoveryInfo(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID) []byte
GetPrivateRecoveryInfo returns a party's private recovery info of a specific key ID
func (Keeper) GetRotationCount ¶
func (k Keeper) GetRotationCount(ctx sdk.Context, chain nexus.Chain, keyRole exported.KeyRole) int64
GetRotationCount returns the current rotation count for the given chain and key role
func (Keeper) GetRotationCountOfKeyID ¶
GetRotationCountOfKeyID returns the rotation count of the given key ID
func (Keeper) GetRouter ¶
GetRouter returns the tss router. If no router was set, it returns a (sealed) router with no handlers
func (Keeper) GetSig ¶
GetSig returns the signature associated with sigID or nil, nil if no such signature exists
func (Keeper) GetSignParticipants ¶
GetSignParticipants returns the list of participants for specified sig ID
func (Keeper) GetSignParticipantsAsJSON ¶
GetSignParticipantsAsJSON returns the list of participants for specified sig ID in JSON format
func (Keeper) GetSignParticipantsShares ¶
GetSignParticipantsShares returns the list of participants share counts for specified sig ID
func (Keeper) GetSignParticipantsSharesAsJSON ¶
GetSignParticipantsSharesAsJSON returns the list of participant share counts for specified sig ID in JSON format
func (Keeper) GetSignQueue ¶
func (k Keeper) GetSignQueue(ctx sdk.Context) utils.SequenceKVQueue
GetSignQueue returns the sign queue
func (Keeper) GetSnapshotCounterForKeyID ¶
GetSnapshotCounterForKeyID returns the snapshot round in which the key with the given ID was created, if the key exists
func (Keeper) GetTssSuspendedUntil ¶
GetTssSuspendedUntil returns the block number at which a validator is released from TSS suspension
func (Keeper) HasKeygenStarted ¶ added in v0.8.1
HasKeygenStarted returns true if a key session for the given key ID exists; false otherwise
func (Keeper) HasPrivateRecoveryInfos ¶
func (k Keeper) HasPrivateRecoveryInfos(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID) bool
HasPrivateRecoveryInfos returns true if the private recovery infos for a given party exists
func (Keeper) IsMultisigKeygenCompleted ¶
IsMultisigKeygenCompleted returns true if multisig keygen completed for the given key ID
func (Keeper) IsOperatorAvailable ¶
func (k Keeper) IsOperatorAvailable(ctx sdk.Context, validator sdk.ValAddress, keyIDs ...exported.KeyID) bool
IsOperatorAvailable returns true if the validator has a non-stale ack and holds the specified keys
func (Keeper) PenalizeCriminal ¶
func (k Keeper) PenalizeCriminal(ctx sdk.Context, criminal sdk.ValAddress, crimeType tofnd.MessageOut_CriminalList_Criminal_CrimeType)
PenalizeCriminal penalizes the criminal caught during tss protocol according to the given crime type
func (Keeper) RotateKey ¶
RotateKey rotates to the next stored key. Returns an error if no new key has been prepared
func (Keeper) SelectSignParticipants ¶
func (k Keeper) SelectSignParticipants(ctx sdk.Context, snapshotter types.Snapshotter, info exported.SignInfo, snap snapshot.Snapshot, keyType exported.KeyType) ([]snapshot.Validator, []snapshot.Validator, error)
SelectSignParticipants appoints a subset of the specified validators to participate in sign ID and returns the active share count and excluded validators if no error
func (Keeper) SetAvailableOperator ¶
func (k Keeper) SetAvailableOperator(ctx sdk.Context, validator sdk.ValAddress, presentKeys ...exported.KeyID)
SetAvailableOperator signals that a validator sent an ack
func (Keeper) SetExternalKeyIDs ¶
SetExternalKeyIDs stores the given list of external key IDs
func (Keeper) SetGroupRecoveryInfo ¶
SetGroupRecoveryInfo sets the group recovery info for a given party
func (Keeper) SetInfoForSig ¶
SetInfoForSig stores key ID for the given sig ID
func (Keeper) SetKeyInfo ¶
SetKeyInfo stores the role and type of the given key
func (Keeper) SetMultisigKeygenInfo ¶
func (k Keeper) SetMultisigKeygenInfo(ctx sdk.Context, info types.MultisigInfo)
SetMultisigKeygenInfo store the MultisigKeygenInfo
func (Keeper) SetMultisigSignInfo ¶
func (k Keeper) SetMultisigSignInfo(ctx sdk.Context, info types.MultisigInfo)
SetMultisigSignInfo stores the MultisigInfo for a multisig sign info
func (Keeper) SetPrivateRecoveryInfo ¶
func (k Keeper) SetPrivateRecoveryInfo(ctx sdk.Context, sender sdk.ValAddress, keyID exported.KeyID, recoveryInfo []byte)
SetPrivateRecoveryInfo sets the private recovery info for a given party
func (Keeper) SetSigStatus ¶
SetSigStatus defines the status of some sign sig ID
func (Keeper) StartKeygen ¶
func (k Keeper) StartKeygen(ctx sdk.Context, voter types.Voter, keyInfo types.KeyInfo, snapshot snapshot.Snapshot) error
StartKeygen starts a keygen protocol with the specified parameters
func (Keeper) StartSign ¶
func (k Keeper) StartSign(ctx sdk.Context, info exported.SignInfo, snapshotter types.Snapshotter, voter types.InitPoller) error
StartSign kickstarts signing
func (Keeper) SubmitPubKeys ¶
func (k Keeper) SubmitPubKeys(ctx sdk.Context, keyID exported.KeyID, validator sdk.ValAddress, pubKeys ...[]byte) bool
SubmitPubKeys stores public keys a validator has under the given multisig key ID
func (Keeper) SubmitSignatures ¶
func (k Keeper) SubmitSignatures(ctx sdk.Context, sigID string, validator sdk.ValAddress, sigs ...[]byte) bool
SubmitSignatures stores signatures a validator has under the given multisig sigID