This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: js-ipfs support of CIDs in /ipns/ content paths #2566
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 tasks
lidel
force-pushed
the
feat/support-cidv1b32-ipns
branch
from
November 4, 2019 11:15
252c770
to
86bb92b
Compare
This adds support for resolving PeerIDs as CIDs in /ipns/ paths. See libp2p/specs#216 for full context. License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
lidel
force-pushed
the
feat/support-cidv1b32-ipns
branch
from
November 4, 2019 12:52
86bb92b
to
bc1a355
Compare
alanshaw
reviewed
Nov 5, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look fine. Can the core test move to interface-ipfs-core
please 🙏 so we can run it in ipfs-http-client
too.
hugomrdias
suggested changes
Nov 5, 2019
@alanshaw i believe those are unit tests of js-ipfs code and should stay I've added See also open question in ipfs-inactive/js-ipfs-http-client#1145 |
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@lidel I've just updated the |
hugomrdias
approved these changes
Nov 6, 2019
alanshaw
approved these changes
Nov 6, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want root identifiers of content paths to be usable in case-insensitive contexts such as subdomains.
While we can use CIDv1 encoded in Base32 in
/ipfs/
namespace, Identifiers in/ipns/
are still hardcoded to Base58btc,Libp2p approved RFC 0001: Text Peer Ids as CIDs recently, and we need to implement it in js-ipfs.
Changes
This PR implements
Stage 1: Parse CIDs as peer ID
from libp2p/specs#216. It makes/ipns/{cidv1}
work without waiting forPeerId.createFromCID
from libp2p/js-peer-id#105, which means we can merge this before async refactor is done.This PR does not change the default PeerID representation,
all it does is to allow use of CIDs in
/ipns/
paths and add tests.cc https://github.com/ipfs/ipfs/issues/337, libp2p/specs#216, libp2p/specs#209, ipfs/kubo#5287