Skip to main content

Module signer

Module signer 

Source
Expand description

The signing half of super::UbftEngine: a stream in front of the batch engine’s slices and certificate unit.

§What changes against crate::engine

Batch engineHere
crate::msg_reader reads messages from HBM and deals message n to slice n mod SLICESthe dealer takes one request beat at a time and gives it to the first idle slice
one crate::hbm_writer per slice writes frames to HBMthe arbiter sends whole frames, one slice at a time, on one stream
the run ends after count framesthe session ends after sign_count frames

The slices, the certificate unit and every register on the links between them (crate::relay) are the batch engine’s, unchanged.

§The dealer

Each slice has a one-message buffer. The request stream is ready while any buffer is empty; a request goes to the first empty buffer at or after a rotating pointer, so a lone request never waits behind a busy slice. A buffer empties when the slice’s message link takes it.

§The certificate announce

Each batch certificate (the 64-byte commitment and its Ed25519 signature) is copied, as the certificate unit hands it to slice 0, to the m_axis_cert stream: commitment beat, then signature beat (tlast). uBFT sends it to the peers ahead of the batch’s signatures, so their verifiers check it before the first one arrives (see super::verifier). The copy is best-effort: if the previous one is still waiting, the new one is skipped and that batch’s first record simply checks its certificate itself.

§The arbiter

A frame is 26 beats. The arbiter picks a slice whose beat pipe offers a beat, sends that slice’s beats until the one with last, then picks again (round robin), so frames never interleave on the stream.

Structs§

SignConfig
The session’s signing configuration (host arguments).
SignerIn
Signer inputs.
SignerOut
Signer outputs.
UbftSigner
The signing half.

Functions§

ubft_signer_kernel
The signer’s logic.