feat(psi): expose PSI blind contact discovery endpoint and periodic L2 Merkle root anchor
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- api, backend, blockchain, cryptography
Direzione di ricerca
Start with the L2 flags in src/config.rs (lines 29-31) and the Merkle root code in src/merkle.rs, then read src/http_server.rs to see how routes are wired. The new src/psi_service.rs module must blind contact tokens against registered identity hashes and produce anchor receipts. Done means POST /v1/contacts/psi and GET /v1/identity/anchors/latest return the specified responses, with cargo test, fmt and clippy passing in tests/node_test.rs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of Meta-Issue alfonsodg/sonaraim#7
Ref alfonsodg/sonaraim-protocol#4, Ref alfonsodg/sonaraim-node#3
Problem
src/config.rs:29-31 parses l2_anchor_enabled and l2_rpc_url, and src/merkle.rs:42-269 computes Merkle roots, but sonaraim-node does not yet expose the Private Set Intersection (PSI) endpoint (POST /v1/contacts/psi) for Phase 2 social graph discovery or the optional periodic L2 state-root anchoring receipt generator (GET /v1/identity/anchors/latest).
Affected Files & Locations
src/config.rs:29-31src/merkle.rs:42-269src/psi_service.rs(new PSI blind evaluation & L2 anchor receipt module, < 300 lines)src/http_server.rstests/node_test.rs:1-167
Evidence
// src/config.rs:29-31
pub l2_anchor_enabled: bool,
pub l2_rpc_url: Option<String>,
Impact and Blast Radius
Allows sonaraim-app users to privately discover which contacts already have Sonaraim installed (POST /v1/contacts/psi) and allows external auditors to verify hourly L2 state-root anchors of the Key Transparency log.
Historical Context and Anti-Regression
Builds on e62fca0 / 6eda03b (Issue #1) and Issues #2–#4. All pre-existing tests in tests/node_test.rs must remain 100% green.
Proposed Solution
- Implement
src/psi_service.rsevaluating blinded contact tokens against registered identity hashes and generating verifiable L2 state-root anchor receipts whenNODE_L2_ANCHOR_ENABLED=true. - Expose
POST /v1/contacts/psiandGET /v1/identity/anchors/latestinsrc/http_server.rs.
Acceptance Criteria
-
POST /v1/contacts/psireturns blinded tokens and never logs or accepts plaintext phone numbers (400on invalid payload). -
GET /v1/identity/anchors/latestreturns the latest anchored Merkleroot_hash,tree_size, and anchor receipt metadata. -
cargo fmt --check,cargo clippy -- -D warnings, andcargo testpass with 0 warnings.
Validation Criteria
| Level | Applies | Test | Scenario | Pass |
|---|---|---|---|---|
| Unit | Yes | tests/node_test.rs |
PSI batch evaluation & L2 anchor receipt verification | 100% pass (cargo test) |
| Integration | Yes | tests/node_test.rs |
Live HTTP POST /v1/contacts/psi & GET /v1/identity/anchors/latest |
Status 200/400 verified |
| Contract | Yes | docs/API.md |
JSON request/response contract parity | Verified |
| E2E | Yes | Sandbox container validation (REMOTE.md) |
Live PSI discovery query against sonaraim-node:8040 |
HTTP 200 verified |
- 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
-
bug(node): SigV4 presign date applies the epoch offset twice — media uploads can never validateApertaarea::node effort::s impact::medium priority::medium source::auto status::review type::bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
alfonsodg/sonaraim-node#29 · 1 commento ·
-
area::node effort::xs impact::low priority::low source::auto status::review type::docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
alfonsodg/sonaraim-node#28 · 1 commento ·
-
area::node effort::s impact::medium priority::low source::auto status::review type::docs
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
alfonsodg/sonaraim-node#27 · 1 commento ·
-
area::node effort::m impact::medium priority::medium source::user status::review type::refactor
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
alfonsodg/sonaraim-node#26 · 1 commento ·
-
area::node effort::m impact::high priority::medium source::auto status::review type::bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
alfonsodg/sonaraim-node#25 · 2 commenti ·
Tutte le issue di alfonsodg/sonaraim-node
Issue simili
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothApertaarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Apich-Organization/rssn#383 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno