Skip to content

SWIP-059: MEX — anchored message exchange with a previously unknown node - #103

Open
zelig wants to merge 8 commits into
masterfrom
swip-mex
Open

SWIP-059: MEX — anchored message exchange with a previously unknown node#103
zelig wants to merge 8 commits into
masterfrom
swip-mex

Conversation

@zelig

@zelig zelig commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

MEX (Message EXchange): a two-phase rendezvous-and-exchange pattern by which any node capable of push-sync and retrieval — including light, potentially non-reachable nodes — carries out a private, mutually authenticated message exchange with a previously unknown full node in the neighbourhood of a pre-agreed anchor. Built entirely from existing primitives: MIC/MOC (SWIP-42, #80), single-owner chunks, push-sync receipts, retrieval.

Extracted from the PubSub SWIP (#93), where it was worked out as Milestone 3, and generalised so it can be referenced independently — by PubSub as a dependency and by MIC/MOC as a use case — keeping the cryptographic detail out of the PubSub spec.

Also specifies:

  • a leakless known-responder variant (PSS trojan first contact, two legs instead of three, reveals not even the fact of the exchange); the anchored and known-responder forms compose, so the anchor-side metadata leak is paid at most once (0–1×) per responder relationship
  • security considerations incl. at-least-once delivery semantics ⇒ mandatory per-chunk-address session dedup (cf. bee#5486 comment)

Follow-ups

🤖 Generated with Claude Code

…n node

Extracted from the PubSub SWIP (PR #93) Milestone 3 and generalised: any
push-sync+retrieval-capable, potentially non-reachable node can carry out a
private mutually authenticated exchange with a previously unknown full node
in the neighbourhood of a pre-agreed anchor. Includes a leakless
known-responder PSS variant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 2, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new SWIP (SWIP-58) specifying MEX (Message EXchange): a two-phase anchored rendezvous and mutually authenticated request/response exchange built from existing Swarm primitives (MIC/MOC, SOC/GSOC, push-sync receipts, retrieval). This extracts and generalizes the “Milestone 3” discovery/exchange pattern from the the outdated original PubSub SWIP #93 so other protocols can reference it as a standalone dependency.

Changes:

  • Introduces the full SWIP-58 specification (terminology, phases, variant for known responder via PSS trojan, encryption/key derivation, rationale, security considerations).
  • Adds explicit operational/security requirements (notably at-least-once delivery implications and mandatory per-chunk-address session dedup).
  • Documents implementation links and test case scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SWIPs/swip-58.md Outdated
Comment thread SWIPs/swip-58.md Outdated
Comment thread SWIPs/swip-58.md Outdated
Comment thread SWIPs/swip-58.md Outdated
zelig and others added 4 commits August 2, 2026 18:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zelig zelig changed the title add SWIP-58: MEX — anchored message exchange with a previously unknown node add SWIP-59: MEX — anchored message exchange with a previously unknown node Aug 5, 2026
@zelig zelig changed the title add SWIP-59: MEX — anchored message exchange with a previously unknown node SWIP-059: MEX — anchored message exchange with a previously unknown node Aug 7, 2026
@zelig zelig self-assigned this Aug 7, 2026
@zelig
zelig requested a review from nugaon August 7, 2026 04:19
zelig and others added 2 commits August 30, 2026 07:31
SWIP-0 specifies `type: Standards Track` with the subcategory in a separate
`category:` header (one of Core / Networking / Interface), as swip-19 and
swip-20 do. This file carried the category inside `type:`, the only form in the
repo, which may break tooling that parses the front matter.

Copilot's other findings on PR #103 were already fixed by the 58 -> 59
renumbering pass: the "poQ stage stamp" and "Re dd" editing artifacts are gone,
the double space is gone, and the nonce derivation names `req_key` / `res_key`
explicitly rather than a bare `key`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Phase-2 note read "decrypt → Q, id_B; store SOC(...) locally". A semicolon
is a statement separator in mermaid, so it terminated the note and the rest
parsed as garbage: GitHub silently fell back to rendering the raw source, and
the diagram has never displayed. Replaced with an em dash; verified to parse
under mermaid 11.

Same defect as the one found in SWIP-60's diagram. Every mermaid block across
SWIP-59, 60, 61, 65 and 66 has now been scanned for it, and all of them parse.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants