Skip to main content

Module reconstruct

Module reconstruct 

Source

Structsยง

ObtainedPayload
A blockโ€™s payload in hand, with what the node needs to file it.
VidReconstructError
A failed reconstruction attempt for one view and claimed commitment.
VidReconstructor
VidShareAccumulator ๐Ÿ”’

Enumsยง

PinnedBy
What vouches for the proposal a view is pinned to.
VidReconstructErrorKind
Why a reconstruction attempt failed.

Functionsยง

decode_and_recommit ๐Ÿ”’
Decode shares and return the payload bytes only if they re-commit to payload_commitment. Recovery alone does not bind the decoded bytes to the commitment: a Byzantine disperser can commit to a non-codeword, and a bad share poisons the erasure decoding.
matches_commitment ๐Ÿ”’
Whether payload is what payload_commitment commits to, sliced by the headerโ€™s namespace table ns_table.
reconstruct ๐Ÿ”’
Decode the shares and accept the result only if it re-commits to payload_commitment. On failure, report the shares that fail verification against the commitment (each share is self-authenticating via its merkle proofs) so they can be weeded out. If every share verifies, the payload is unrecoverable: the shares cover the recovery threshold with disjoint ranges, so the disperser committed to a non-codeword and no share subset can ever succeed.
share_verifies ๐Ÿ”’
Whether share verifies against a common already known to be hash-bound to the commitment (a verify_with_verified_common success).

Type Aliasesยง

Metadata ๐Ÿ”’
ReconstructResult ๐Ÿ”’