Skip to main content

Module vid

Module vid 

Source
Expand description

Verifiable information dispersal (VID) for the new protocol.

A block’s payload is erasure-coded per namespace and spread across the committee so the block can be recovered from any subset of storage nodes whose shards cover the recovery threshold. This module owns the three stages of that lifecycle, one per submodule:

  • disperse – the leader side. The block builder erasure-codes each namespace into a BuiltDispersal and folds the payload commitment from it. VidDisperser coalesces namespaces into size-balanced buckets and unicasts to every node a stream of AvidmGf2DisperseShareFragment messages (one per bucket), each carrying that node’s shares for the bucket’s namespaces. Without a built dispersal it erasure-codes the namespaces itself.

  • fragments – the receive side of dispersal, the mirror of VidDisperser. VidFragmentAccumulator buffers the fragments a node receives for its own share and, once every namespace has arrived, reassembles them into a complete VidDisperseShare2. That share is then verified, attached to this node’s vote, and fed to the reconstructor.

  • reconstruct – block recovery. VidReconstructor collects the verified shares contributed by many voters (each node’s own share, carried on its vote) and decodes the payload once their shards cover the recovery threshold.

Modules§

disperse 🔒
fragments 🔒
reconstruct 🔒

Structs§

BuiltDispersal
A block’s dispersal, computed by the block builder together with its commitment, so the disperser only signs and sends it.
ObtainedPayload
A block’s payload in hand, with what the node needs to file it.
VidDisperseOutput
VidDisperseRequest
VidDisperser
VidFragmentAccumulator
VidReconstructError
A failed reconstruction attempt for one view and claimed commitment.
VidReconstructor

Enums§

Dispersal
A block for disperse_payload to send.
PinnedBy
What vouches for the proposal a view is pinned to.
VidDisperseError
VidFragmentError
VidReconstructErrorKind
Why a reconstruction attempt failed.

Functions§

disperse_payload
Signs a block’s dispersal and hands every recipient’s fragment of each bucket of namespaces to send, which the disperser points at the network. A Dispersal::Encode is erasure-coded bucket by bucket first. The block_build bench in espresso-types passes a send that only serializes; the spans time each step.
expected_vid_param
The VID erasure parameters the committee for epoch fixes, matching what an honest disperser derives. Used to reject shares whose common.param is forged (the commitment binds ns_commits, not param) and to verify payloads fetched whole. None if the committee cannot be resolved.
ns_lens_match_metadata 🔒
Whether common.ns_lens are the namespace lengths an honest disperser derives from the header’s namespace table ns_table at the payload length the common claims, which the table must be sized for if it is one.