Skip to main content

context_pack_digest

Function context_pack_digest 

Source
pub fn context_pack_digest(
    lineage: &ContextPackLineageReceipt,
    bytes: &[u8],
) -> SpawnContextDigest
Expand description

The one definition of the context pack digest formula: SHA256(domain || JSON(lineage) || 0x00 || bytes), rendered sha256:<hex>. Both the node (computing a pack’s digest when it exports one) and the harness (recomputing a fetched pack’s digest to check it against a mailed receipt) call this instead of keeping their own copy, so the formula can only drift in one place.