Skip to content

feat:added mesh 1.0 - #124

Merged
TheTechmage merged 3 commits into
decentralized-identity:mainfrom
Ajna-inc:mesh
Mar 16, 2026
Merged

feat:added mesh 1.0#124
TheTechmage merged 3 commits into
decentralized-identity:mainfrom
Ajna-inc:mesh

Conversation

@vinaysingh8866

Copy link
Copy Markdown
Contributor

Mesh Networking Protocol 1.0

Summary

Adds the Mesh Networking Protocol v1.0 — a DIDComm v2 protocol that enables agents to form ad-hoc peer-to-peer mesh networks over BLE and LoRa transports without internet connectivity.

  • Nodes discover peers via Ed25519-signed announcements and build a distributed topology graph
  • Multi-hop relay with TTL-based controlled flooding and degree-adaptive jitter to prevent broadcast storms
  • Topology-aware shortest-path (BFS) routing for directed unicast messages
  • Packet deduplication via LRU cache prevents replay and flood amplification
  • Fragmentation support for MTU-constrained transports (BLE ~512B, LoRa ~200B)
  • Graceful leave notifications for immediate topology updates

Protocol Details

PIURI: https://didcomm.org/mesh/1.0

Messages:

  • announce — Periodic signed broadcast advertising presence and neighbor list
  • relay — Wraps a packed DIDComm message for multi-hop mesh delivery (supports broadcast and directed modes)
  • leave — Graceful departure notification with signature verification

Key Design Decisions:

  • 8-byte Routing IDs derived from SHA256(ed25519_public_key)[0..8] keep packet headers compact while maintaining cryptographic binding
  • No DIDs are broadcast over the mesh — identity exchange is handled separately via OOB protocol
  • All relayed payloads are opaque (already DIDComm-encrypted), so intermediate nodes cannot read message content
  • Degree-adaptive jitter scales relay delay with peer count (10-220ms) to reduce storms in dense networks
  • Bidirectionally confirmed edges only — both peers must claim each other as neighbors for a route to be valid

Security

  • Ed25519-signed announcements with routing ID binding prevent topology spoofing
  • Stale announcement rejection and deduplication prevent replay attacks
  • Payload encryption is handled by DIDComm — the mesh layer never sees plaintext
  • Only compact routing IDs appear in headers, never DIDs

Changes

  • site/content/protocols/mesh/1.0/readme.md

Signed-off-by: Vinay Singh <vinay@verid.id>
Signed-off-by: Vinay Singh <vinay@verid.id>
Signed-off-by: Vinay Singh <vinay@verid.id>
@TheTechmage

Copy link
Copy Markdown
Member

Discussed in Today's UG meeting, merging. Any followups can be addressed in PRs

@TheTechmage
TheTechmage merged commit 0ec19af into decentralized-identity:main Mar 16, 2026
1 check passed
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