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
Gslots, 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
PQpending 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§
- Coll
Config - One-time configuration.
- CollIn
- Inputs.
- CollOut
- Outputs.
- Coll
State - State.
- Coll
Verdict - A verdict for a tag.
- Coll
Verify - Verify
sigunder replicasigner’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). - Share
Write - 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.