Skip to main content

Module collector

Module collector 

Source
Expand description

Share collector: a certificate is q verified shares from distinct replicas over one exact key (docs/rhdl_ubft-view-change.md).

Problem. Upstream counts a cached signature as verified without checking the message (U01), checks certificates on a thread that races the cache (U34), re-verifies every share on every poll (UN-F10), and counts votes without their view (U08, UE-C1).

Idea.

  • A window of G slots, each collecting for one key (view, instance, digest) of one role. A share counts only for exactly its slot’s key.
  • Each incoming share is verified once, through a scoreboard of PQ pending verifications. The verdict comes back with its tag and the collector’s epoch, and counts only if the slot still has the same key (there is no cache to go stale).
  • Signers are a bitmask of distinct, in-range replicas. A signer whose share fails verification is barred for that key, so a Byzantine replica cannot make the collector verify without bound.
  • Verified shares go to an external share RAM (slot · 16 + signer), so a certificate can be forwarded (a NEWVIEW carries other replicas’ history certificates).

Structs§

CollConfig
One-time configuration.
CollIn
Inputs.
CollOut
Outputs.
CollState
State.
CollVerdict
A verdict for a tag.
CollVerify
Verify sig under replica signer’s key for the share context.
Open
Start collecting for a key (clears its slot, instance mod G).
Pending
One pending verification.
ShareIn
A share: from the network, or our own (own, trusted, not verified).
ShareWrite
Store a verified share.
Slot
One slot.

Constants§

PQ
Pending verifications.

Functions§

coll_step
One cycle of the collector.
empty_slot
A cleared slot, for kernels.
free_pending
A free pending entry, for kernels.
popcount16
Number of set bits.