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_addressand reverse address-native indexes - commit metadata uses
author_address
Account defaults
If an account row is absent, the canonical default view is:
key_count = 0project_count = 0storage_units = 0custody_nonce = 0created_at = 0
Keychain state
Custody and envelope (Ed25519 signer) keys share one owner-scoped keyspace under prefix 0x06, discriminated by a family byte:
| Family | Entity | Layout |
|---|---|---|
0x00 | Envelope (Ed25519 signer) | `[0x06 |
0x01 | Custody (AccountKeychain) | `[0x06 |
- a custody
key_idis the EVM-derived address of the key's public material - the root
owner_addressis the implicit admin and is never stored as a custody key - revocation retains the custody row as a permanent tombstone (
status = revoked,revoked_atset) rather than deleting it 0x06is 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:
| Prefix | Entity | Layout |
|---|---|---|
0x1A | Fork parent (retained lineage) | `[0x1A |
0x1B | Merge request (forward) | `[0x1B |
0x1C | Merge request (reverse, by requester) | `[0x1C |
0x1Astores the immediate fork parent for each fork project, independent of prunable project rows, so merge-request lineage validation survives project pruning0x1Band0x1Care a forward/reverse pair — for every forward entry, a matching reverse entry must exist, and vice versaProjectStateincludesmerge_request_count, which tracks the number of active merge requests targeting the project0x1A,0x1B, and0x1Care 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