Skip to content

[P2P epic] Phase 4 — signed ops + peer-enforceable epoch fence #91

Description

@cuttlefisch

ADR: ADR-026. Phase 4 of 6. Hard prerequisite: #72 (unpredictable epoch token). Depends on: Phase 3.

Make the ADR-023 epoch fence peer-enforceable so removed-member / pre-grant-cascade writes are rejected at every peer, not just the doc-owning daemon.

Scope

  • Sign content (node) ops with author fingerprint + epoch + Ed25519 signature over the op bytes.
  • On each peer: read the signed membership chain (Phase 3) for the author's current epoch, then apply ADR-023's rule locally — every new op (beyond the peer's node SV) must be under the author's current-epoch derive_kb_client_id(fp, epoch), else fence (rebase). The ADR-023 viewer_era_* oracle, now peer-side.
  • Blocked by collab(security): epoch-fence hardening — unpredictable daemon-issued token + persist epoch across remove/re-add (ADR-023) #72: peer-side fencing is only sound with an unpredictable epoch (otherwise the ADR-023 "pre-rotation attack" defeats it).

Observability (ADR-027)

fenced_ops + sig_verify_fail counters; fenced-op + verification-failure events surfaced via the notification bus.

Verification

Unit: peer-side fence parity with ADR-023; signed-op author/epoch verify; replay/mis-attribution rejected. Security-negative mesh e2e: a relayed stale-epoch op is fenced by the receiving peer without a trusted server; removed-member writes don't cascade.


🤖 Phase epic for the P2P decentralized KB-sync initiative (ADR-025/026/027, plan: daemon-mediated mesh, integrity-first, observability throughout).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:collabCollaborative editing / sync / CRDTepicMulti-PR initiative tracked as phasesp2pDecentralized P2P daemon-mesh KB syncsecuritySecurity / auth / access control

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions