Implementing IPNS Validator for DHT #1158
Replies: 3 comments
-
|
@asmit27rai : This is a great proposal, Asmit — thanks for taking the time to dig this deep into the DHT and for writing such a clear, well-structured write-up. 🙌 A few thoughts, inline with your questions: Overall direction / timing Scope Design & approach
The fact that you already have 19 passing tests covering validation, selection, expiration, and integration is a big plus. Dependency ( Test vectors Next steps
We can then review and iterate on any edge cases or integration details together. Overall: really strong proposal, very much in the spirit of py-libp2p. Looking forward to reviewing the PR — nice work 👏 |
Beta Was this translation helpful? Give feedback.
-
|
@asmit27rai — one more related update that may be useful context as you work on IPNS. We’re in the process of getting py-ipld-dag un-archived again: CCing @0-th , who have been working on Storacha Python client and can share multiple pointers over here. In the meantime, it would be great if you could also take a quick look at the py-ipld-dag-pb work that’s been happening. The DAG-PB functionality has been actively tested and hardened across the following PRs by @0-th:
@0-th also added coverage against the standard IPLD codec fixtures, which significantly increases trust and recognition in the broader IPLD ecosystem:
Related libraries that may be relevant for future integration work by @0-th:
Sharing this mainly for awareness and alignment — there’s a lot of parallel groundwork happening across the Python IPLD stack, and your IPNS work fits very naturally into this direction. CCing @acul71 , @sumanjeet0012 and @yashksaini-coder , who will collaborate with you on this effort soon. |
Beta Was this translation helpful? Give feedback.
-
|
@seetadev I opened a pr with some starting implementation still working on some improvement |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone!
I've been exploring the py-libp2p codebase and noticed that IPNS (InterPlanetary Naming System) support is marked as TODO in the DHT module. I'd like to propose implementing an
IPNSValidatorto complete this functionality. (#1157)Background
IPNS provides cryptographically verifiable, mutable pointers to content-addressed data. The DHT already has a PublicKeyValidator for the
pknamespace, but the ipns namespace validator is missing.Current TODOs in kad_dht.py:
Proposed Approach
I've drafted an implementation following the IPNS Record Specification, which includes:
Protobuf definition for
IpnsEntry(V2 format withsignatureV2and DAG-CBOR)IPNSValidator class with:
DHT integration - auto-registered via apply_fallbacks()
New dependency:
cbor2for DAG-CBOR decodingCurrent Status
I have a working implementation with 19 passing tests covering:
Questions for Maintainers
Before I submit a PR, I wanted to check:
Is this the right time to add IPNS support? Does it align with the current roadmap?
Scope: Should this just be the validator, or should I also implement IPNS record creation (signing/publishing)?
cbor2 dependency: Is adding this acceptable? It's well-maintained and necessary for DAG-CBOR decoding per the spec.
Test vectors: The IPNS spec provides official test vectors. Should I include tests against these?
Any design concerns with the approach outlined above?
CCing : @seetadev , @acul71
Beta Was this translation helpful? Give feedback.
All reactions