Capsule digests¶
A capsule digest is a capsule's identity:
sha256:40e4f7107cd51aaf3f71dfa261b1db2a8c4f7f2c50f5c92965f4dce90124d537. It is
the SHA-256 of four things taken together:
- the hash of every file in the block folder;
- the block's interface id;
- its interface hash;
- its dependency intent.
Why the interface is part of it¶
The digest names the block's code, its contract and what it declares it needs, together. Folding the interface id, interface hash and dependency intent in beside the files ties the capsule's identity directly to the block's contract and declarations, so the identity a closure binds and a cell reuses states both.
A change to any file in the block, to the block's interface (a method, a type, an effect or retry declaration), or to its dependency or environment declaration gives a new capsule digest.
Where it is used¶
The capsule digest is the capsule's name everywhere after bake:
- the capsule manifest and executable surface index are stamped with it;
- publish releases the capsule under it, and the control plane's attestation signs it;
- every resolved runtime closure built from the capsule binds it;
- every cell running the capsule has it in its reuse key.
The digests around a package¶
A package carries several digests, each identifying something different:
| Digest | Identifies |
|---|---|
| Capsule digest | One block's capsule: files, interface and dependency intent |
| Bundle digest | The package's file tree |
| Archive SHA-256 | The exact archive bytes that are uploaded |
| Interface hash | The block's interface contract |
| Manifest digest | The capsule manifest document, signed at publish |