feat(p2p): implement libp2p QUIC transport mesh and Gossipsub Merkle head sync
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend, cryptography, networking
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 |
- Lenguaje dominante
- Rust
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 4 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de alfonsodg/sonaraim-node
-
area::node effort::m impact::high priority::medium source::auto type::bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
alfonsodg/sonaraim-node#25 · 1 comentario ·
-
chore(node): gossip daemon hardening (jittered broadcast, bounded mesh targets, UDP metrics)Abiertoarea::node effort::s impact::low priority::low source::auto status::review type::feature
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
alfonsodg/sonaraim-node#24 ·
-
area::node effort::l impact::high priority::medium source::auto status::review type::feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
alfonsodg/sonaraim-node#23 ·
-
area::node effort::s impact::medium priority::medium source::auto status::review type::bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
alfonsodg/sonaraim-node#22 · 1 comentario ·
-
area::node effort::m impact::high priority::low source::auto status::review type::security
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
alfonsodg/sonaraim-node#21 · 2 comentarios ·
Todos los issues de alfonsodg/sonaraim-node
Issues similares
-
area:ui effort:medium enhancement P7 source:agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
machine rename accepts a label already used by another machine, making --machine <label> ambiguousAbiertomaintainer-needed p2 remote triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug help wanted ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
userFRM/egui-charts#4605 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día