Expand description
Stream chunking + cross-chunk integrity hash for mk1 multi-string cards.
Per design/SPEC_mk_v0_1.md §2.6, the canonical bytecode is suffixed
with a 4-byte cross_chunk_hash (= SHA-256(canonical_bytecode)[0..4])
before splitting into chunk fragments; the hash is verified at
reassembly. This catches dropped, reordered, or substituted chunks
that the per-chunk BCH layer alone cannot detect.
Structs§
- Chunk
Fragment - One chunk’s worth of split output: a parsed header + its fragment bytes.
Constants§
- MAX_
CHUNKABLE_ BYTECODE - Maximum canonical-bytecode length that can be chunked under v0.1.
Functions§
- reassemble_
from_ chunks - Reassemble canonical bytecode from a list of parsed chunks.
- split_
into_ chunks - Split canonical bytecode into chunks, appending the cross-chunk integrity hash.