Side-by-Side DID Architecture · Instrument Identity · 0.0.41

Why QualiaDB uses three DID methods instead of one overloaded identifier.

Most decentralized systems force a single DID method to act simultaneously as a database pointer, a human legal identity, and a network socket address. That overloading creates correlation honeypots and catastrophic revocation failure modes: rotating a compromised transport key Either breaks historical knowledge pointers or exposes the human across every peer relationship.

Orthogonal Separation by Design: QualiaDB partitions decentralized identifiers across three specialized methods — did:q42: (64-bit resource coordinates), did:webizen: (human-centric agent and ratified agreement identity), and did:qi: (pairwise rotating relationship and instrument identity). did:qi is an in-tree runtime specification (crates/qualia-core-db/src/did_qi/), not a W3C DID Spec Registries entry and not a W3C Technical Report.

Handle ≠ human. did:qi lives strictly on the Instrument and Handle planes — never the Entity (NaturalAgent) plane. Deactivating a did:qi relationship closes that pairwise channel without erasing the human or their local .q42 knowledge volume.

Layer 2 · Side-by-Side DID Comparison

Three Orthogonal DID Methods in QualiaDB (0.0.41)

Each DID method serves a distinct architectural plane, bit-layout contract, and lifecycle rule. Mixing them is rejected at compile time and at the QiError::RejectedMethod parser boundary.

Dimension did:q42: / did:q42:ptr: did:webizen: did:qi:
Canonical Name QRC (Q42 Resource Coordinate) Human-Centric Agent & Agreement DID Qualia Instrument & Relationship DID
Identifier Fabric Plane Resource / Coordinate Plane (in-memory & .q42 SuperBlock addressing) Entity & Governance Plane (NaturalAgent persona & bilateral contracts) Instrument / Handle Plane (never Entity; enforced by verify_relationship_distinct_from_person)
Wire & Binary Representation 64-bit topological pointer in NQuin.object with MSB = 1 (bit 63 set via FNV-1a in identifier.rs / resolver.rs). 64-bit q_hash in NQuin.subject / context; compiles ratified contracts into 16 Super-Quins in EnforceBilateralMicroCommons. did:qi:<genesis-digest>?hint=... where <genesis-digest> is multibase base58btc (z prefix) of the 32-byte SHA-256 genesis payload digest.
Rotation & Mutability Immutable content/topological coordinate within a SlgArena or .q42 SuperBlock. Ratified via M-of-N threshold consensus (SuspendedTransactionQueue) and Ed25519 author-scoped Merkle roots. Pairwise rotating keys with strict monotonic generation counter (advance_generation) and QiError::StaleGeneration rejection.
Deactivation Semantics Arena epoch reclamation or QSync tombstone frontier. Deontic defeater rule (DEFEATER_BIT) or contract expiry epoch in NQuin.metadata. Irreversible TombstonePermanent (deactivate + TOMBSTONE_OPCODE); unbinds all CscpMailbox services immediately.
Primary Rust Modules identifier.rs, resolver.rs, webizen_bytecode.rs governance/webizen.rs, agency.rs, crdt.rs did_qi/{document,method,service,mailbox_bind,utxo}.rs

Layer 3 · Cryptographic Document Lifecycle

Bounded QCDE-1 Signed Documents & State Machine

Bounded QCDE-1 signed documents (Qualia Canonical Document Encoding v1, an RFC 8785 deterministic canonicalization profile) operate with fixed stack caps (MAX_CANONICAL, MAX_UNSIGNED, MAX_SIGNED, MAX_SERVICES, MAX_AKA) so parsing and signature verification never allocate on the heap in hot paths.

Step 1 · Genesis Creation method::create · encode_genesis

create & Genesis Digest

Computes the 32-byte SHA-256 genesis_digest over the initial controller verification key and creation vector (generation = 0), formats did:qi:z..., verifies the Ed25519 proof over encode_canonical, and commits the signed blob into the bounded QiStore / GitObjectStore.

Step 2 · Monotonic Rotation method::update · advance_generation

advance_generation & Replay Defense

Every key or service update must strictly increment the document generation counter (next.generation > current.generation) and carry a valid controller signature. Replayed or lower-generation documents fail closed with QiError::StaleGeneration ("stale_generation").

Step 3 · Terminal Tombstone method::deactivate · TombstonePermanent

deactivate & TombstonePermanent

Transitioning a relationship to deactivated = true writes an irreversible TombstonePermanent state (and supports optional UTXO TOMBSTONE_OPCODE attestation). Any subsequent update attempt returns QiError::Deactivated, and publish_qi_document immediately withdraws all mailbox services.

Step 4 · Plane Separation Guard verify_relationship_distinct_from_person

Strict Entity vs. Instrument Separation

verify_relationship_distinct_from_person enforces that a did:qi identifier is classified solely on the Instrument / Handle planes and never aliases a NaturalAgent Entity DID. Revoking a pairwise did:qi channel never invalidates the human’s identity.

Layer 4 · Transport Integration

CscpMailbox Binding & Disclosure Gates

Active did:qi documents publish CscpMailbox service endpoints into the private CSCP mailbox registry via publish_qi_document. Each service declares an explicit Disclosure policy and LocatorClass (Direct vs. RelayHint, up to MAX_HINTS):

  • Relay-only protection (check_relay_only): When a document specifies relay-only disclosure, any direct IP/socket locator is rejected before storage with QiError::DirectLocatorForbidden ("direct_locator_forbidden").
  • Direct-permitted selection: When direct locators are explicitly permitted by the controller’s policy, the path planner selects them as Direct without forcing traffic through a relay.
  • Deactivation scrubbing: Deactivated did:qi documents publish zero services and evict previously bound mailbox routes.

Verification & Standards Boundary

What did:qi Establishes in 0.0.41

  • In-process & zero-heap hot path: Canonical encoding, Ed25519 signature verification, in-memory GitObjectStore blob tagging, and caller-supplied Bitcoin-family UTXO commitment checks (verify_commitment) run deterministically in tree without external daemons.
  • Transition bearers stay labelled: Binding a CscpMailbox over TLS WSS, HTTP/2 Extended CONNECT capsules, WireGuard, or Nym mixnet framing uses those profiles as transition bearers — never claiming public Internet MASQUE or Native Independent link status.
  • Standards honesty: did:qi is an internal specification draft (0.1.0 on engine 0.0.41), not registered in the W3C DID Spec Registries.

Related QDNF & Identity Documentation

Continue to the QDNF architecture map, the release qualification matrix, or the companion guides for protocol cells and the Qualia Peer Runtime.