feat(p2p): add live UDP gossip socket and did:web document verifier
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- authentication, networking
Research direction
Start with MeshGossipState in src/p2p.rs (lines 51-64) to see how peer tree heads are stored, then review the HTTP handler area in src/http_server.rs (lines 120-177) where POST /v1/p2p/gossip and identity checks would be wired. The new module src/udp_gossip.rs would hold the std::net::UdpSocket code. Done means cargo test passes, a loopback test in tests/milestone6_test.rs detects equivocation between two sockets, and conflicting roots for the same tree_size are rejected.
Written by the indexing model from the issue text.
Description
Problem
Tracked under Coordinator Meta-Issue alfonsodg/sonaraim#9 (Milestone 7).
src/p2p.rs:1-98 (692a933) implements MeshGossipState in memory, but does not bind a real UDP socket to exchange SignedTreeHead datagrams between peers or validate did:web JSON documents (/.well-known/did.json) before marking enterprise identities as verified_b2b: true.
Affected Files & Locations
src/p2p.rs:1-98src/udp_gossip.rs(new,< 170lines)src/http_server.rs:120-177tests/milestone6_test.rs
Evidence
// src/p2p.rs:51-64
pub struct MeshGossipState {
local_node_id: String,
peer_heads: HashMap<String, SignedTreeHead>,
epoch_roots: HashMap<usize, String>,
}
Impact and Blast Radius
Allows real UDP datagram gossip between sonaraim-node instances on port 9031/udp (NODE_P2P_LISTEN_ADDR) and enforces cryptographic did:web verification on POST /v1/identity.
Historical Context and Anti-Regression
Builds on sonaraim-node commit 692a933. Must keep src/http_server.rs under 300 lines (extracting helpers into src/udp_gossip.rs).
Proposed Solution
- Create
src/udp_gossip.rsprovidingUdpGossipNode(bind,send_tree_head,recv_tree_head_nonblocking) overstd::net::UdpSocket, plusverify_did_web_document(did, doc_json)validatingidandverificationMethodfields. - Wire
POST /v1/p2p/gossipanddid:webverification insrc/http_server.rs.
Acceptance Criteria
- L1 (Unit TDD):
cargo fmt --check && cargo clippy -- -D warnings && cargo testpasses with zero warnings. - L2 (Integration): Two local
UdpGossipNodesockets exchangeSignedTreeHeadpackets over loopback UDP and detect equivocation. - L3 (Container / GHCR): Container image publishes to GHCR and runs on
sandbox-ud-ord. - L4 (E2E Sandbox):
POST /v1/p2p/gossiponsandbox-ud-ordingests peerSignedTreeHeadand rejects conflicting roots for the sametree_size(409 Conflict).
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from alfonsodg/sonaraim-node
-
bug(node): SigV4 presign date applies the epoch offset twice — media uploads can never validateOpenarea::node effort::s impact::medium priority::medium source::auto status::review type::bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
alfonsodg/sonaraim-node#29 · 1 comment ·
-
area::node effort::xs impact::low priority::low source::auto status::review type::docs
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
alfonsodg/sonaraim-node#28 · 1 comment ·
-
area::node effort::s impact::medium priority::low source::auto status::review type::docs
Difficulty 3/5 1-2 days Newbie friendliness 72/100
alfonsodg/sonaraim-node#27 · 1 comment ·
-
area::node effort::m impact::medium priority::medium source::user status::review type::refactor
Difficulty 1/5 Under an hour Newbie friendliness 20/100
alfonsodg/sonaraim-node#26 · 1 comment ·
-
area::node effort::m impact::high priority::medium source::auto status::review type::bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
alfonsodg/sonaraim-node#25 · 2 comments ·
All issues in alfonsodg/sonaraim-node
Similar issues
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
marketing
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothOpenarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#383 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day