Skip to content
LogoLogo

State model

V2 state is address-native.

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

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

V2 state does not include:

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