Source/Packages

Checkpoint.NativeEnvelope

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

810 lines50 declarations33.7 KiBSHA-256 de7bf6c0b7f3

def · lines 511–575

nativeCheckpointDigests

Full file
511def nativeCheckpointDigests =
512  (lambda unrestricted layout : (family NativeCheckpointLayout) .
513    (lambda unrestricted generate : Nat .
514      (lambda unrestricted slot : Nat .
515        (lambda unrestricted tail : (family NativePhysicalCommands) .
516          (let unrestricted contract =
517            (nativeCheckpointContract layout)
518            in
519            (let unrestricted full =
520              (checkpointEnvelopeFullChunks contract)
521              in
522              (let unrestricted chunk =
523                (checkpointEnvelopeContractChunk contract)
524                in
525                (let unrestricted last =
526                  (checkpointEnvelopeTailBytes contract)
527                  in
528                  (nativeLaunchRecipeCommand
529                    (constructor
530                      NativePhysicalOperation
531                      NativePhysicalRepeatBeginCounted
532                      (nativeLaunchRecipeImmediate full))
533                    b"checkpoint-chunks"
534                    (nativeCheckpointPointer
535                      (nativeCheckpointSourcePointerAt layout)
536                      (nativeCheckpointPayloadAt layout)
537                      chunk
538                      (nativeCheckpointPointer
539                        (nativeCheckpointDigestPointerAt layout)
540                        (naturalAdd (nativeCheckpointBase layout) checkpointEnvelopeDigestsAt)
541                        checkpointEnvelopeDigestBytes
542                        (nativeCheckpointHashChunk
543                          layout
544                          chunk
545                          (nativeCheckpointFullPadding layout)
546                          generate
547                          slot
548                          (nativeLaunchRecipeCommand
549                            (constructor NativePhysicalOperation NativePhysicalRepeatEnd)
550                            b"checkpoint-chunks-end"
551                            (nativeFileWhen
552                              (naturalNonzero last)
553                              (lambda unrestricted after : (family NativePhysicalCommands) .
554                                (nativeCheckpointStore
555                                  (nativeCheckpointSourcePointerAt layout)
556                                  (nativeMemoryState
557                                    (naturalAdd
558                                      (nativeCheckpointPayloadAt layout)
559                                      (naturalMultiply full chunk)))
560                                  (nativeCheckpointStore
561                                    (nativeCheckpointDigestPointerAt layout)
562                                    (nativeMemoryState
563                                      (naturalAdd
564                                        (naturalAdd
565                                        (nativeCheckpointBase layout)
566                                        checkpointEnvelopeDigestsAt)
567                                        (naturalMultiply full checkpointEnvelopeDigestBytes)))
568                                    (nativeCheckpointHashChunk
569                                      layout
570                                      last
571                                      (nativeCheckpointTailPadding layout)
572                                      generate
573                                      slot
574                                      after))))
575                              tail))))))))))))))

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.