Skip to main content

Module shards

Module shards 

Source
Expand description

Shard engine for erasure-coded block distribution and reconstruction.

§Overview

The shards subsystem distributes erasure-coded blocks, validates shard authenticity, and reconstructs blocks on demand. It ensures every validator contributes bandwidth proportional to a single shard while allowing any node to recover the entire super::types::CodedBlock once enough shards are available.

§Responsibilities

  • Engine accepts commands over Mailbox to broadcast proposer shards, validate and reshare received shards, and serve reconstruction requests.
  • Maintains an ephemeral cache of reconstructed blocks, evicted when marshal signals durability.
  • Tracks subscriptions for shard arrival and block reconstruction, notifying waiters when data becomes available.

Structs§

Config
Configuration for the Engine.
Engine
A network layer for broadcasting and receiving CodedBlocks as Shards.
Mailbox
A mailbox for sending messages to the Engine.

Enums§

Error
An error that can occur during reconstruction of a CodedBlock from Shards
Message
A message that can be sent to the coding Engine.