Skip to content

core(identity): identity-first ActorId — AID/SAID/delegation, key-expr addressable #121

Description

@joeldsouzax

Part of the core-rebuild epic — follows the shared rigor contract there. The one net-new design; the reference (kameo) is the wrong model here.

Component

src/actor/id.rs (~564 LOC), rebuilt as the ground-floor inversion.

Learning & discussion

The core realization of this whole plan: kameo is process-first / identity-incidental — an opaque AtomicUsize counter, with the global part (peer_id) hidden behind #[cfg(feature = "remote")]. We are identity-first / process-embodies-identity, and identity is core, not behind a transport flag.

  • A local-only actor = a bare local handle (the counter). A dataspace actor earns a KERI identity when it joins.
  • Three separated concerns: KERI = authenticity, Zenoh key-expr = addressing, nexus = ordering/consistency.
  • Key-expr is a contact tree: agency/<user-aid>/<domain>/<aid> (e.g. agency/<user-aid>/agent/<aid>), and ** locates an identity anywhere.
  • Authority is a KEL-backed DAG, not the tree: an AID delegated to X by Y has two edges (controller X, delegator Y); multisig AIDs add member+threshold edges. The path is just contact; the truth lives in the KEL.

Existing crates

keriox (Rust KERI), cesride/CESR encoding. Verify key-expr canonicalization (CESR/Base64URL chars vs Zenoh-reserved * $ ? #). Replace the local-handle AtomicUsize + try_into().unwrap() with AtomicU64 / portable-atomic (the #88 concern — platform-dependent width + banned unwrap).

Research — best algorithm/approach

KERI whitepaper (S. M. Smith) — AID/SAID, cooperative delegation, multisig group AIDs; CESR spec (confirm exact arxiv id during research). Self-addressing identifiers; Zenoh key-expr + ** identity lookup. This bleeds into M4 (KEL modelled as a nexus aggregate → an actor's identity is itself maintained by an actor).

Testing — hard as fuck

Identity invariants (self-certifying verify with no registry), key-expr validity/canonicalization, delegation-DAG (X≠Y controller/delegator; multisig threshold), boundary. loom on the local-handle counter (ties #88). DST over concurrent identity mint/lookup. Mutation: cargo-mutants, zero survivors.

Reframes / absorbs

#2 (ActorId: libp2p PeerId → Zenoh key-expr) — superseded and expanded here. Related: #88 (loom the counter), M4 (KERI identity on the edge).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions