Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Fork a Project – Makechain
Skip to content

Fork a Project

Fork an existing project at a specific commit. The forked project gets a new content-addressed ID (the BLAKE3 hash of the FORK message) and inherits the source project's refs and commit history at that point.

Demo

Fork a projectdemo
Read source project state
GetProject response
{
  "project_id": "e7f8a9b0c1d2...",
  "name": "web-framework",
  "owner_mid": 17,
  "visibility": "PUBLIC",
  "ref_count": 12,
  "commit_count": 1847,
  "head_commit": "deadbeef0123..."
}
Choose fork point
Source projecte7f8a9b0c1d2...3e4f5a6b7c8d
Fork at commitdeadbeef01234567890abcdef01234567 890abcdef01234567890abcdef0123456
Refrefs/heads/main @ deadbeef0123...
Submit FORK message
FORK message
{
  "type": "FORK",
  "mid": 42,
  "timestamp": 1740000400,
  "body": {
    "source_project_id": "e7f8a9b0c1d2...",
    "source_commit_hash": "deadbeef0123...",
    "name": "my-web-framework",
    "visibility": "PUBLIC"
  }
}

FORK is a 1P Singleton — once created, it cannot be undone. The new project ID is the BLAKE3 hash of this message.

Consensus and state change
FORK submitted to mempoolT+0ms
Validated — SIGNING scope, project count within limitT+8ms
Included in block #1,720 (account pre-pass phase)T+192ms
Account project_count incremented: 3 → 4T+192ms
FinalizedT+305ms
New project IDb7c8d9e0f1a2345678901234abcdef01 b7c8d9e0f1a2345678901234abcdef01
Fork sourcee7f8a9b0c1d2... @ deadbeef0123...
Your projects4 / 10 (1 storage unit)
Source: alice/web-frameworkSemantics: 1P Singleton

CLI equivalent

# Fork a project at a specific commit
makechain fork \
  --source e7f8a9b0c1d2... \
  --commit deadbeef0123... \
  --name my-web-framework \
  --visibility public

What happened

  1. Read source — You query the source project to find the commit you want to fork at. The source project must be accessible to you (public, or you are a collaborator).

  2. Fork point — The source_commit_hash anchors the fork to a precise point in the source project's history. This is recorded permanently in the fork's metadata.

  3. FORK message — A FORK message is submitted. This is a 1P Singleton — it creates a new resource irreversibly. The new project ID is the BLAKE3 hash of the FORK message itself (not the source project). This guarantees a globally unique, content-addressed ID.

  4. Account pre-passFORK is processed in the serial account pre-pass (Phase 1) because it modifies shared account state (project_count). The protocol checks project_count < storage_units * 10 before allowing the fork. If you are at capacity, the fork is rejected with StorageLimitExceeded.

Cross-shard note

In a future sharded architecture, FORK is the one operation that requires cross-shard coordination. The FORK message includes a state proof from the source project to verify the source_commit_hash exists without querying the source shard.