Expand description
Kademlia content DHT (cdn/dht/v1) — runtime-side modules.
See ADR 022 for the canonical design.
Wire types live in decdn_protocol::dht; this module owns the routing
table, rate limiter, record store, republish scheduler, and the
requester-side iterative lookup that surround the handler.
Re-exports§
pub use auth::AuthenticatedNodeId;pub use bootstrap::BootstrapOutcome;pub use bootstrap::bootstrap;pub use chain_origin_directory::ChainOriginDirectory;pub use chain_staker_set::ChainStakerSet;pub use lookup::LookupConfig;pub use lookup::find_providers;pub use negative_cache::NegativeProbeCache;pub use node_address::ChainNodeAddressDirectory;pub use node_address::NodeAddressResolver;pub use node_address::StaticNodeAddressDirectory;pub use origin::EmptyOriginDirectory;pub use origin::OriginDirectory;pub use origin::StaticOriginDirectory;pub use probe_cache::PositiveProbeCache;pub use probe_cache::ProbedProvider;pub use publish::RepublishScheduler;pub use rate_limit::DhtRateLimiter;pub use rate_limit::DhtRejectLayer;pub use records::InsertOutcome;pub use records::RecordStore;pub use records::RecordStoreConfig;pub use routing::NODE_ID_LEN;pub use routing::RoutingTable;pub use routing::xor_distance;pub use staker_set::ConfigStakerSet;pub use staker_set::StakerSet;
Modules§
- auth
- The authenticated-identity trust boundary for the DHT handler.
- bootstrap
- DHT bootstrap (ADR 022 §Bootstrap).
- bucket_
refresh - Routing-table bucket refresh (ADR 022 §Routing Table — “Bucket refresh interval | 1 hour”).
- capacity_
bond_ registry - One
CapacityBondwatcher feeding five registry projections. - chain_
origin_ directory - Chain-backed
OriginDirectoryimplementation. - chain_
staker_ set - Chain-backed
StakerSetimplementation. - client
- Client-side
cdn/dht/v1request primitives. - dial_
addrs NodeId → registry-published direct dial addresses(ADR 001 § Node Discovery), mirrored into an irohMemoryLookupthat the runtime registers on the node’s endpoint.- lazy_
origin_ cache - Lazy, bounded, TTL-split cache of
getOrigins(namespaceId)results. - lookup
- Requester-side iterative
FindValuelookup (ADR 022 §FIND_VALUEFlow + §Lookup integrity). - negative_
cache - Requester-side negative probe cache (ADR 001 §Probe cache).
- node_
address - Node-id → operator Ethereum address resolver (ADR 003 §Node Registry, #831).
- origin
- On-chain origin-directory fallback (ADR 022 §FIND_VALUE Flow “Origin discovery” and §Bootstrap “the on-chain origin directory provides the deterministic fallback”).
- probe_
cache - Requester-side POSITIVE probe cache (ADR 001 §Probe cache).
- publish
- DHT republish scheduler (ADR 022 §STORE Flow & §Bootstrap).
- rate_
limit - Three-layer token-bucket rate limiter for
cdn/dht/v1inbound traffic (ADR 022 §DHT Rate Limiting). - records
- Receiver-side DHT record store (ADR 022 §Content Records and TTL).
- routing
- Kademlia k-bucket routing table for
cdn/dht/v1(ADR 022 §Routing Table). - staker_
set - Active-staker set abstraction (ADR 022 §STORE Flow, §FIND_VALUE Flow).
Structs§
- NodeId
- A 32-byte node identifier (Ed25519 public key).