nu-p2p/CLAUDE.md
Mukan Erkin 9cd556a439 feat(nu-p2p): initial Faz 0 scaffold
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 00:00:26 +03:00

854 B
Raw Blame History

nu-p2p — CLAUDE.md

P2P ağ katmanı. nu-node'dan ayrı tutulur — test ederken network mock'lanabilir.

Stack

  • libp2p 0.54 — Gossipsub, Kademlia DHT, Identify, Ping
  • Tokio async runtime

Modüller

Dosya Sorumluluk
behaviour.rs libp2p NetworkBehaviour kompozisyonu
messages.rs Gossip topic sabitleri + mesaj tipleri
peer.rs PeerRegistry (max 50 bağlantı)
config.rs Listen addr, bootstrap peers, max peers

Gossip Topics

nu/blocks/1      → BlockAnnounce, BlockRequest, BlockResponse
nu/txs/1         → TxGossip
nu/votes/1       → VoteAnnounce
nu/validators/1  → ValidatorHeartbeat

Geliştirme

cargo run --bin nu-p2p

# Faz 1: iki node arası gossip testi
RUST_LOG=debug cargo run --bin nu-p2p -- --bootstrap /ip4/127.0.0.1/tcp/30333