pub struct ModuleInfo {
pub total_size: u64,
pub module_hash: HexId,
pub chunk_hashes: Vec<HexId>,
pub chunk_lens: Vec<u64>,
}Expand description
Result for dig.getModuleInfo — the
transfer descriptor of a whole .dig module.
The whole-module blob is content-addressed + immutable (the .dig container
is byte-identical by construction). module_hash is the
content id of the assembled blob; a puller verifies each pulled range against
chunk_hashes (per-peer attribution on a multi-source
pull) and the fully-assembled blob against module_hash, THEN verifies the
assembled module against its chain-anchored root before admitting + resharing
(NC-9 verified-content-not-safe-content).
Fields§
§total_size: u64The total byte length of the whole .dig module blob.
module_hash: HexIdThe content id of the fully-assembled module blob (64-hex SHA-256 of the
module bytes). The puller checks the assembled blob against this.
chunk_hashes: Vec<HexId>Per-chunk content hashes (64-hex each) in ascending chunk order, covering
the blob in total_size-spanning fixed-size chunks
(the trailing chunk may be short). A puller checks each pulled
RangeFrame against the covering entries for per-source attribution on a
multi-source pull (a tampered range fails closed before assembly).
chunk_lens: Vec<u64>Per-chunk byte lengths (in the same order as chunk_hashes).
MUST have the same length as chunk_hashes and MUST sum to total_size.
A puller uses these to map a fetched byte range to the covering chunk hash(es).
Trait Implementations§
Source§impl Clone for ModuleInfo
impl Clone for ModuleInfo
Source§fn clone(&self) -> ModuleInfo
fn clone(&self) -> ModuleInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more