feat(p2p): adopt real QUIC/libp2p transport for gossip mesh and envelope forwarding

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with the documented transport mapping in the verification comment on issue #2 and the existing paths src/udp_gossip.rs, src/gossip_daemon.rs, src/http_federation.rs, src/federation_client.rs, and src/p2p.rs. Then evaluate QUIC multiaddrs in PeerRecord.multiaddr and plan the daemon transport changes. Done means two daemons exchange signed STHs and envelopes over QUIC without HTTP, the two-daemon E2E test measures local hop latency, and the docs describe the implemented transport.

Written by the indexing model from the issue text.

Description

area::node effort::l impact::high priority::medium source::auto status::review type::feature

Follow-up re-scoping node#2 (honest architecture check 2026-11-20).

Context

node#2 ("feat(p2p): implement libp2p QUIC transport mesh and Gossipsub Merkle head sync") is fully implemented in spirit but NOT with libp2p: the real transport is UDP datagram gossip (src/udp_gossip.rs + src/gossip_daemon.rs, signed STHs per #21) and HTTP replication (src/http_federation.rs + src/federation_client.rs, per-peer Bearer + TLS per #18). No libp2p/quinn dependency exists in Cargo.toml. Verification comment on #2 documents the mapping criterion-by-criterion.

Docs were corrected in the #22 merge (a187fb1): README badge now reads "UDP Gossip + HTTP Federation", CONFIGURATION/ARCHITECTURE state explicitly that real QUIC/libp2p is NOT implemented.

Remaining work (real QUIC/libp2p)

  • Evaluate /ip4/.../udp/.../quic-v1 multiaddrs in PeerRecord.multiaddr with an actual QUIC stack (quinn) instead of treating them as opaque strings.
  • Replace or complement UDP+HTTP gossip with libp2p Gossipsub for STH propagation, keeping Ed25519 STH signatures (#21) and equivocation detection (src/p2p.rs).
  • Envelope forwarding over the QUIC mesh with < 50ms local hop latency (original #2 acceptance criterion), measured in a two-daemon E2E test.
  • All files stay < 300 lines; cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test green.

Acceptance criteria

  • Two daemon instances exchange signed STHs and envelopes over QUIC with no HTTP involvement.
  • Docs updated to reflect the real transport again.

Effort: L (new transport dependency + daemon rework). Priority medium: current UDP+HTTP mesh satisfies federation functionally.

Dominant language
Rust
Stars
0
Forks
0
Avg merge
4m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alfonsodg/sonaraim-node

All issues in alfonsodg/sonaraim-node

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.