Content Storage
The consensus layer stores only message metadata (~100–500 bytes per message). Actual 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: Developer uploads tree and blob data to external storage, receiving a URL and computing a content digest
- Submit: Developer submits a
COMMIT_BUNDLEwithcontent_digest,url, and commit metadata - Finalize: Validators include the bundle in a block — metadata is stored 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
This separation ensures that storage limits on validators don't 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 |