feat(p2p): implement libp2p QUIC transport mesh and Gossipsub Merkle head sync
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend, cryptography, networking
Direzione di ricerca
Start by reading the p2p_listen_addr and bootstrap_peers fields in src/config.rs, then KeyTransparencyLog in src/merkle.rs and MailboxStore in src/relay.rs. The new src/p2p.rs must handle peer tables, SignedTreeHead gossip and equivocation rejection, and HealthStatus in src/health.rs needs peer count and sync state. Done means the 3-node convergence and equivocation tests in tests/node_test.rs pass with the existing 5 tests unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of Meta-Issue alfonsodg/sonaraim#2
Ref alfonsodg/sonaraim-protocol#2
Problem
sonaraim-node parses p2p_listen_addr and bootstrap_peers in src/config.rs:17-148 and computes Merkle tree heads in src/merkle.rs:42-269, but does not yet establish P2P peer-to-peer mesh sessions or gossip signed Merkle tree heads (SignedTreeHead) and SealedEnvelope frames across relay peers.
Affected Files & Locations
src/config.rs:17-148(NodeConfig)src/merkle.rs:42-269(KeyTransparencyLog)src/relay.rs:34-127(MailboxStore)src/p2p.rs(new P2P mesh & gossip synchronization module, < 300 lines)tests/node_test.rs:1-167
Evidence
// src/config.rs:24-28
pub p2p_listen_addr: String,
pub bootstrap_peers: Vec<String>,
Impact and Blast Radius
Enables multi-node federation, Sovereign Node peering for regulated enterprises, and decentralized synchronization of the Key Transparency DID log across relay nodes.
Historical Context and Anti-Regression
Builds on e62fca0 / 6eda03b (Issue #1). The 5 existing tests in tests/node_test.rs:1-167 must remain unmodified and 100% green.
Proposed Solution
- Implement
src/p2p.rsmanaging peer routing tables,SignedTreeHeadepoch gossip verification, split-view detection (rejecting diverging Merkle roots at the same tree size), and peer-to-peer envelope forwarding. - Integrate
p2ppeer count and Merkle sync state intoHealthStatus(src/health.rs:1-75).
Acceptance Criteria
- Two or more
P2pNodeinstances synchronizeKeyTransparencyLogentries and detect equivocation (conflicting roots for the same epoch). -
SealedEnveloperouted to a remote peer's mailbox is forwarded and delivered with < 50ms local hop latency. - All source files stay strictly under 300 lines and pass
cargo fmt --check,cargo clippy -- -D warnings, andcargo test.
Validation Criteria
| Level | Applies | Test | Scenario | Pass |
|---|---|---|---|---|
| Unit | Yes | tests/node_test.rs |
Peer table management, SignedTreeHead verification, equivocation rejection |
100% pass (cargo test) |
| Integration | Yes | tests/node_test.rs |
3-node mesh gossiping DID registrations and forwarding SealedEnvelope |
All 3 nodes converge on identical Merkle root |
| Contract | Yes | docs/API.md |
SignedTreeHead and MerkleProof JSON serialization matches documented schema |
Validated in contract test |
| E2E | Yes | Multi-node process test in Sandbox (REMOTE.md) |
Two node processes exchange envelopes and sync Merkle epochs | Exit code 0 and matching /health epoch |
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 0
- Merge medio
- 4m
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alfonsodg/sonaraim-node
-
area::node effort::m impact::high priority::medium source::auto type::bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
alfonsodg/sonaraim-node#25 · 1 commento ·
-
area::node effort::s impact::low priority::low source::auto status::review type::feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
alfonsodg/sonaraim-node#24 ·
-
area::node effort::l impact::high priority::medium source::auto status::review type::feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
alfonsodg/sonaraim-node#23 ·
-
area::node effort::s impact::medium priority::medium source::auto status::review type::bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
alfonsodg/sonaraim-node#22 · 1 commento ·
-
area::node effort::m impact::high priority::low source::auto status::review type::security
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
alfonsodg/sonaraim-node#21 · 2 commenti ·
Tutte le issue di alfonsodg/sonaraim-node
Issue simili
-
area:ui effort:medium enhancement P7 source:agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousApertamaintainer-needed p2 remote triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4605 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno