On this page

0259. Canonical unsigned Merkle checkpoint body

Context

0257 specifies origin host, tree size and root hash as checkpoint text, but not their exact separators or root spelling. RG4.2a supplies only the unsigned body; signature framing and I/O belong to later steps.

Decision

Use <host>\n<decimal-size>\n<lowercase-64-hex-root>\n, with no blank line or sha256: prefix. Validate the origin with the existing host validator (including its optional port). Size is u64, rendered without leading zeroes. A zero-size checkpoint must use SHA256(empty). Records retain 0257's explicit sha256: prefix and use the existing package-path and exact-version validators.

Keep the pure API on binary 32-byte hashes and ordered leaf-hash slices. Invalid coordinates or text fields return None; proof verification returns bool, without allocating user-facing diagnostic codes before there is a command consuming it. The empty prefix has an empty consistency proof and proves only the empty root, not the authenticity of a nonempty new root; signatures remain the caller's job.

Alternatives considered

Consequences

The body is deterministic and injection-safe. Maintainer should confirm this byte spelling before the hosting/client steps expose it as a wire format. No existing registry, lock, golden or command output changes.