pub struct RoastCoordinator {
pub threshold: usize,
pub pubkey_package: PublicKeyPackage,
pub message: Vec<u8>,
pub responsive_signers: BTreeSet<Identifier>,
pub commitment_queues: BTreeMap<Identifier, VecDeque<(NonceSlotId, SigningCommitments)>>,
pub active_sessions: BTreeMap<u128, RoastSession>,
pub signer_to_session: BTreeMap<Identifier, u128>,
pub banished_signers: BTreeSet<Identifier>,
/* private fields */
}Expand description
ROAST Coordinator (Ruffing et al., CCS 2022) wrapping preprocessed FROST(Ed25519, SHA-512). Automatically spawns parallel sessions with available signers so up to n-t stalling or malicious signers cannot delay certificate issuance.
Fields§
§threshold: usize§pubkey_package: PublicKeyPackage§message: Vec<u8>§responsive_signers: BTreeSet<Identifier>Signers currently available (not busy in an in-flight session).
commitment_queues: BTreeMap<Identifier, VecDeque<(NonceSlotId, SigningCommitments)>>Preprocessed commitments per signer.
active_sessions: BTreeMap<u128, RoastSession>Active concurrent sessions.
signer_to_session: BTreeMap<Identifier, u128>Maps a busy signer to the session_id it is currently serving.
banished_signers: BTreeSet<Identifier>Malicious signers detected via verify_signature_share failure.
Implementations§
Source§impl RoastCoordinator
impl RoastCoordinator
Sourcepub fn new(
threshold: usize,
pubkey_package: PublicKeyPackage,
message: Vec<u8>,
) -> Self
pub fn new( threshold: usize, pubkey_package: PublicKeyPackage, message: Vec<u8>, ) -> Self
Creates a fresh ROAST coordinator for a target message buffer.
Sourcepub fn register_commitments(
&mut self,
signer_id: Identifier,
commitments: Vec<(NonceSlotId, SigningCommitments)>,
)
pub fn register_commitments( &mut self, signer_id: Identifier, commitments: Vec<(NonceSlotId, SigningCommitments)>, )
Registers a batch of preprocessed commitments from a signer and marks it responsive.
Sourcepub fn try_spawn_session(
&mut self,
) -> Option<(u128, SigningPackage, BTreeMap<Identifier, NonceSlotId>)>
pub fn try_spawn_session( &mut self, ) -> Option<(u128, SigningPackage, BTreeMap<Identifier, NonceSlotId>)>
Attempts to spawn a new parallel FROST session if responsive_signers has at least threshold
signers with available preprocessed commitments.
Receives and verifies a partial SignatureShare from signer_id.
Immediately isolates culprits via verify_signature_share, returns honest signers
to the responsive pool, and completes signing as soon as any session gathers threshold shares.