Content storage
The consensus layer stores only message metadata (~100–500 bytes per message). File content — blobs, trees, and full commit messages — lives in external storage chosen by the developer.
Architecture
Developer Makechain Consensus Content Storage
│ │ │
├─ Upload blobs ───────────────────────────────────► │
│ (returns URL + digest) │ │
│ │ │
├─ COMMIT_BUNDLE ──────────►│ │
│ (content_digest + url) │ │
│ ├─ Include in block │
│ │ │
Consumer │ │
│ │ │
├─ Read commit metadata ◄──┤ │
├─ Fetch blobs via url ──────────────────────────► │
├─ Verify content_digest │ │
│ │ │
Content digest and URL
A COMMIT_BUNDLE may include two optional fields:
content_digest— a 32-byte hash serving as an integrity proof for the referenced contenturl— a content locator string (max 2048 characters) pointing to the uploaded data
Both fields are self-attested by the submitter. Validators do not fetch or verify the referenced content. Clients verify integrity offline by comparing the fetched content's hash against the content_digest.
These fields link consensus-layer metadata to the full data:
| Consensus Layer (validators) | External Storage |
|---|---|
| Commit hash, title, author, parents | Full commit message text |
| Tree root hash | Tree objects (directory listing) |
content_digest + url | Blob objects (file content) |
Content lifecycle
- Upload — the developer uploads tree and blob data to external storage, receiving a URL and computing a content digest
- Submit — the developer submits a
COMMIT_BUNDLEwithcontent_digest,url, and commit metadata - Finalize — validators include the bundle in a block, storing metadata in consensus state
- Retrieve — consumers read metadata from consensus, fetch full data via
url, and verify againstcontent_digest
Recovery from pruning
When consensus-layer commit metadata is pruned (see Storage Limits), the full commit data remains recoverable from external storage:
- Pruned
CommitMetaentries lose their hash, title, and parent links from validator state - External storage retains the complete blob data (subject to storage provider retention policies)
- The
content_digestallows integrity verification of recovered data
Storage limits on validators do not cause permanent data loss.
Storage backend options
The content storage backend is chosen by the developer. Options include:
| Backend | Tradeoffs |
|---|---|
| Object storage (R2, S3) | Fast, reliable, cost-effective for compressed bundles |
| IPFS / Filecoin / Arweave | Permanent, decentralized, content-addressed |
| Self-hosted storage | Full control, use content_digest for integrity |
| Git hosting | Store bundles alongside existing git infrastructure |