pub async fn run<T, R>(
setup: T,
seed: Seed,
relay: R,
) -> Result<Option<Keyshare>, KeygenError>
Expand description
Executes the Quorum Change Protocol.
This function orchestrates the quorum change process, allowing participants to:
- Add new participants to the quorum
- Remove existing participants
- Change the threshold value
- Modify participant ranks
§Type Parameters
T
- A type implementing theQuorumChangeSetupMessage
traitR
- A type implementing theRelay
trait for message communication
§Arguments
setup
- The protocol setup configuration containing participant informationseed
- The random seed for cryptographic operationsrelay
- The message relay for communication between parties
§Returns
Ok(Some(Keyshare))
- The new key share if the protocol succeedsOk(None)
- If the participant is not part of the new quorumErr(KeygenError)
- If the protocol fails
§Errors
This function may return the following errors:
KeygenError::AbortProtocol
- If the protocol is aborted by a participantKeygenError::SendMessage
- If there’s an error sending messages- Other
KeygenError
variants for various protocol failures