Concept
Content-addressed network state
In RAHN, a network state's identity is not a name someone assigned — it is a sha256 hash over the state's canonical serialization. Identity depends only on content. Two states with the same bytes are the same state, wherever they occur.
How it works
The pipeline is short and strict: a network state is encoded in canonical format v2 (total ordering, no ambient information), and the state id is the SHA-256 of those bytes. Commits, stores, and peer synchronization all speak in these ids. Because the encoding is deterministic, the id is stable across machines — the same state computed on Linux and Windows yields the same id, which is exactly what CI verifies.
What content addressing buys
- Integrity you can check. Any stored or transmitted state can be verified by re-hashing it; corrupted objects are refused loudly, never partially loaded.
- Immutability by construction. A state with a given id cannot change — changing it produces different bytes and therefore a different id. History becomes a graph of immutable values.
- Meaningful diffs and merges. Equality is byte equality; a diff is a computation over canonical structures, not a text comparison of configs.
- Synchronization without trust. Peer sync (ADR 0015) ships objects over content addresses; a replica can verify everything it receives without trusting the sender.
Where the analogy to Git holds — and stops
The mechanism is cousins with Git's object model, and that is deliberate. But RAHN's payload is a typed network model with topology semantics, its changes are explicit transition operations, and its history is gated by a constitution of invariants. The full comparison is on the RAHN vs Git page.
Limits, honestly
Content addressing does not make the model complete — it makes the modeled part verifiable. Unmodeled reality (dynamic device state, hidden platform behavior) has no id. And hashing everything costs CPU and storage; both costs are recorded in the limitations baseline. Identity decisions are recorded in ADR 0002 and ADR 0003.
Where to go next
- Deterministic state — the precondition for stable ids
- Network invariants — the gate applied to states and transitions
- Storage specification — the content-addressed object store