Source/Packages

Checkpoint.Envelope

packages/execution/persistence/src/Checkpoint/Envelope.alpha

280 lines55 declarations15.0 KiBSHA-256 3098c6153ea6

def · lines 125–131

checkpointEnvelopeChunkExtent

Full file
The final digest covers only bytes present in the payload. The generic byte-prefix operation zero-pads, so passing the full chunk extent for the tail would disagree with native file hashing while still passing a codec round trip that made the same mistake on both sides.
125def checkpointEnvelopeChunkExtent =
126  (lambda unrestricted contract : (family CheckpointEnvelopeContract) .
127    (lambda unrestricted index : Nat .
128      (naturalSelect (naturalLess index (checkpointEnvelopeFullChunks contract))
129        (checkpointEnvelopeContractChunk contract)
130        (naturalSelect (naturalEqual index (checkpointEnvelopeFullChunks contract))
131          (checkpointEnvelopeTailBytes contract) 0))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.