retry

package
v0.0.0-...-369a1d7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateRetryParticipantsForKeyGeneration

func EvaluateRetryParticipantsForKeyGeneration(
	groupMembers []chain.Address,
	seed int64,
	retryCount uint,
	retryParticipantsCount uint,
) ([]chain.Address, error)

EvaluateRetryParticipantsForKeyGeneration takes in a slice of `groupMembers` and returns a subslice of those same members of length >= `retryParticipantsCount` randomly according to the provided `seed` and `retryCount`.

This function is intended to be called during key generation after a failure *not* due to inactivity. Assuming that some of the `groupMembers` are sending corrupted information, either on purpose or accidentally, we keep trying to find a subset of `groupMembers` that is as large as possible by first excluding single operators, then pairs of operators, then triplets of operators. We use the `seed` param to generate randomness to shuffle the singles/pairs/triplets of operators to exclude and then use the `retryCount` param to select which single/pair/triplet to exclude.

The `seed` param needs to vary on a per-message basis but must be the same seed between all operators for each invocation. This can be the hash of the message since cryptographically secure randomness isn't important.

The `retryCount` denotes the number of the given retry, so that should be incremented after each attempt while the `seed` stays consistent on a per-message basis.

func EvaluateRetryParticipantsForSigning

func EvaluateRetryParticipantsForSigning(
	groupMembers []chain.Address,
	seed int64,
	retryCount uint,
	retryParticipantsCount uint,
) ([]chain.Address, error)

EvaluateRetryParticipantsForSigning takes in a slice of `groupMembers` and returns a subslice of those same members of length >= `retryParticipantsCount` randomly according to the provided `seed` and `retryCount`.

This function is intended to be called during a signing protocol after a signing event has failed but *not* due to inactivity. Assuming that some of the `groupMembers` are sending corrupted information, either on purpose or accidentally, we keep trying to find a subset of `groupMembers` that is as small as possible, yet still larger than `retryParticipantsCount`.

The `seed` param needs to vary on a per-message basis but must be the same seed between all operators for each invocation. This can be the hash of the message since cryptographically secure randomness isn't important.

The `retryCount` denotes the number of the given retry, so that should be incremented after each attempt while the `seed` stays consistent on a per-message basis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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