State Model
Projects
A project's state consists of:
- Metadata — name, description, visibility, license
- Refs — map of ref names to commit hashes
- Known commits — set of registered commit hashes + metadata
- Collaborators — map of MIDs to permission levels
- Owner — Make ID of the project owner
Accounts
An account's state consists of:
- Registered keys — set of public keys with scopes
- Account metadata — username, avatar, bio
- Verified addresses — set of external addresses with claim proofs
- Storage units — capacity
Merkle State
Project state is authenticated via per-project merkle roots:
Global State Root
├── Project A Root (BLAKE3 of sorted key-value diffs)
├── Project B Root
├── Project C Root
└── ...Each project has a project_root (BLAKE3 hash of its sorted key-value state diffs). The global state root combines all per-project roots in sorted order, producing a deterministic root regardless of parallel execution order.
Storage Limits
Per storage unit (yearly):
| Resource | Limit |
|---|---|
| Projects | 10 |
| Commit metadata per project | 10,000 |
| Refs per project | 200 |
| Collaborators per project | 50 |
| Keys per account | 50 |
| Verifications per account | 50 |
| DA storage | 1 GB |
Pruning
When a project exceeds its commit metadata limit, the oldest entries are pruned from consensus state:
- Head commits for every branch/tag are always retained
- Intermediate commits on active branches are retained up to the limit
- Commits on deleted branches with no remaining ref are pruned first
- Full commit history remains recoverable from the DA layer