State model

Makechain state is address-native. Every selector, index, and ownership record keys on owner_address rather than a registry-allocated account ID.

Core selectors

  • account bookkeeping is keyed by owner_address
  • project ownership is stored as owner_address
  • collaborators use target_owner_address
  • links and reactions use owner_address and reverse address-native indexes
  • commit metadata uses author_address

Account defaults

If an account row is absent, the canonical default view is:

  • key_count = 0
  • project_count = 0
  • storage_units = 0
  • custody_nonce = 0
  • created_at = 0

Keychain state

Custody and envelope (Ed25519 signer) keys share one owner-scoped keyspace under prefix 0x06, discriminated by a family byte:

FamilyEntityLayout
0x00Envelope (Ed25519 signer)`[0x06
0x01Custody (AccountKeychain)`[0x06
  • a custody key_id is the EVM-derived address of the key's public material
  • the root owner_address is the implicit admin and is never stored as a custody key
  • revocation retains the custody row as a permanent tombstone (status = revoked, revoked_at set) rather than deleting it
  • 0x06 is queryable and merkleized

custody_nonce in account bookkeeping is the monotonic replay guard for KEYCHAIN_AUTHORIZE, KEYCHAIN_REVOKE, SIGNER_ADD, and SIGNER_REMOVE. Only the mutated account burns its own nonce; an attribution signature's request_owner never does.

Merkle scope

The canonical merkleized prefixes are 0x03 through 0x17 inclusive, plus 0x1A through 0x1C.

0x02, 0x18, and 0x19 remain persisted but are not part of state_root.

Merge request state

Three prefix families support merge requests:

PrefixEntityLayout
0x1AFork parent (retained lineage)`[0x1A
0x1BMerge request (forward)`[0x1B
0x1CMerge request (reverse, by requester)`[0x1C
  • 0x1A stores the immediate fork parent for each fork project, independent of prunable project rows, so merge-request lineage validation survives project pruning
  • 0x1B and 0x1C are a forward/reverse pair — for every forward entry, a matching reverse entry must exist, and vice versa
  • ProjectState includes merge_request_count, which tracks the number of active merge requests targeting the project
  • 0x1A, 0x1B, and 0x1C are all queryable and merkleized

Removed state concepts

State does not include:

  • registry allocation metadata
  • ownership transfer markers
  • signer-authorization event markers
  • storage-rent event markers
  • relay checkpoint provenance