Sigil documentation
ReferenceRust referencesigil-storage

sigil-storage · da

Source declarations, signatures and documentation for da.

Source: sigil/node/sigil-storage/src/da.rs. SHA-256: 9d28d40f0ca4d1b2413693be084db6fd3917a49033da988d30bf43b93be1fa52.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

da::DaFragment

An erasure-coded fragment of a block for data availability sampling.

Blocks are split into total_fragments pieces using Reed-Solomon coding so that any subset of sufficient size can reconstruct the original block.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DaFragment {
/// Height of the block this fragment belongs to.

pub block_height: u64,
/// Zero-based index of this fragment within the coding scheme.

pub fragment_index: u32,
/// Total number of fragments the block was split into.

pub total_fragments: u32,
/// The encoded fragment bytes.

pub data: Vec<u8>,
/// Merkle inclusion proof linking this fragment to the block's DA root.

pub proof: Vec<u8>
}

Source line: 14.

da::DaSampleRequest

A request to sample specific DA fragments for a block.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DaSampleRequest {
/// Block height to sample.

pub block_height: u64,
/// Which fragment indices to retrieve.

pub fragment_indices: Vec<u32>
}

Source line: 29.

da::DaSampleResponse

A response to a DA sampling request.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DaSampleResponse {
/// Block height the fragments belong to.

pub block_height: u64,
/// The requested fragments (may be fewer than requested if some are

/// unavailable).

pub fragments: Vec<DaFragment>,
/// Whether the sampled data indicates the block is available.

pub available: bool
}

Source line: 38.

On this page