Function run

Source
pub async fn run<T, R>(
    setup: T,
    seed: Seed,
    relay: R,
) -> Result<Option<Keyshare>, KeygenError>
where T: QuorumChangeSetupMessage<Keyshare, ProjectivePoint>, R: Relay,
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 the QuorumChangeSetupMessage trait
  • R - A type implementing the Relay trait for message communication

§Arguments

  • setup - The protocol setup configuration containing participant information
  • seed - The random seed for cryptographic operations
  • relay - The message relay for communication between parties

§Returns

  • Ok(Some(Keyshare)) - The new key share if the protocol succeeds
  • Ok(None) - If the participant is not part of the new quorum
  • Err(KeygenError) - If the protocol fails

§Errors

This function may return the following errors:

  • KeygenError::AbortProtocol - If the protocol is aborted by a participant
  • KeygenError::SendMessage - If there’s an error sending messages
  • Other KeygenError variants for various protocol failures