Documentation
¶
Index ¶
- Constants
- func CountAssignedSignings(events sdk.StringEvents, address string) int64
- func GenerateDEs(n uint64, secret tss.Scalar, db DEGetter) (privDEs []store.DE, err error)
- type DE
- type DECounter
- func (dec *DECounter) AfterDEsCommitted(numDE int64)
- func (dec *DECounter) AfterDEsRejected(numDE int64)
- func (dec *DECounter) AfterSyncWithChain(existing uint64, expectedDESize uint64, blockHeight int64) int64
- func (dec *DECounter) EvaluateDECreationFromUsage(deUsed int64, threshold uint64, blockHeight int64) int64
- func (dec *DECounter) String() string
- type DEGetter
- type DeleteDE
- type PubDE
- type UpdateDE
Constants ¶
const MAX_DE_BATCH_SIZE = int64(50)
const (
MaxDuplicateDEAttempts = 5
)
Variables ¶
This section is empty.
Functions ¶
func CountAssignedSignings ¶ added in v3.0.1
func CountAssignedSignings(events sdk.StringEvents, address string) int64
CountAssignedSignings counts the number of assigned signings for the given address.
Types ¶
type DE ¶
type DE struct {
// contains filtered or unexported fields
}
DE is a worker responsible for managing own nonce (DE) that being used for signing process
func New ¶
New creates a new instance of the DE-related workers. It initializes the necessary components and returns the created DE instance or an error if initialization fails.
func (*DE) GetResponseReceivers ¶ added in v3.0.1
func (de *DE) GetResponseReceivers() []*msg.ResponseReceiver
GetResponseReceivers returns the message response receivers of the worker.
type DECounter ¶ added in v3.0.1
type DECounter struct {
// contains filtered or unexported fields
}
DECounter tracks the number of vacant and pending DEs. It estimates the expected on-chain DE count, assuming all MsgSubmitDE transactions are eventually committed.
func NewDECounter ¶ added in v3.0.1
func NewDECounter() *DECounter
NewDECounter creates a new DECounter.
func (*DECounter) AfterDEsCommitted ¶ added in v3.0.1
AfterDEsCommitted updates internal counters after DEs are successfully committed.
func (*DECounter) AfterDEsRejected ¶ added in v3.0.1
AfterDEsRejected updates internal counters after DEs are rejected.
func (*DECounter) AfterSyncWithChain ¶ added in v3.0.1
func (dec *DECounter) AfterSyncWithChain( existing uint64, expectedDESize uint64, blockHeight int64, ) int64
AfterSyncWithChain syncs local state with actual on-chain DE count and updates internal counters.
func (*DECounter) EvaluateDECreationFromUsage ¶ added in v3.0.1
func (dec *DECounter) EvaluateDECreationFromUsage( deUsed int64, threshold uint64, blockHeight int64, ) int64
EvaluateDECreationFromUsage updates the internal counters based on the usage data. and return the number of DEs that needs to be created based on the given threshold.
type DeleteDE ¶
type DeleteDE struct {
// contains filtered or unexported fields
}
DeleteDE is a worker responsible for deleting DEs from the store once being triggered by the related chain events
func NewDeleteDE ¶
NewDeleteDE creates a new DeleteDE worker.
func (*DeleteDE) GetResponseReceivers ¶ added in v3.0.1
func (d *DeleteDE) GetResponseReceivers() []*msg.ResponseReceiver
GetResponseReceivers returns the message response receivers of the worker.
type PubDE ¶
PubDE represents the data structure for public D,E being retrieved from events.
func ParsePubDEFromEvents ¶
func ParsePubDEFromEvents(events sdk.StringEvents, eventType string) ([]PubDE, error)
ParsePubDEFromEvents parses the events into PubDE struct from the given events and event type. It extracts the public D and E from the log and returns the parsed Events or an error if parsing fails.
type UpdateDE ¶
type UpdateDE struct {
// contains filtered or unexported fields
}
UpdateDE is a worker responsible for updating DEs in the store and chains
func NewUpdateDE ¶
NewUpdateDE creates a new UpdateDE worker.
func (*UpdateDE) GetResponseReceivers ¶ added in v3.0.1
func (u *UpdateDE) GetResponseReceivers() []*msg.ResponseReceiver
GetResponseReceivers returns the message response receivers of the worker.