Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multiaddr support Peer ID represented as CID #102

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

lidel
Copy link
Member

@lidel lidel commented Oct 25, 2019

Motivation

This PR implements Stage 1: Parse CIDs as peer ID from libp2p/specs#216.

TL;DR This PR does not change the format returned by getPeerId(), all we do in Stage 1 is adding support for Peer IDs represented with CIDs in text form.

For a wider context see libp2p/specs/RFC/0001-text-peerid-cid.md, short story is that CID support will enable IPFS project to support /ipns/{cid} in Base32 (https://github.com/ipfs/ipfs/issues/337), enabling things like http://{libp2p-key-as-cidv1b32}.ipns.dweb.link

Changes

This PR modifies getPeerId() to add support for Peer IDs as CIDs.
(libp2p RFC 0001)

Next

  • We need this released, so we can switch IPNS implementation in js-ipfs to createFromCID

cc https://github.com/ipfs/ipfs/issues/337, libp2p/specs#216, libp2p/specs#209

This change adds support for Peer ID represented as CID.
Implements `Stage 1` from libp2p/specs#216

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 👍

@jacobheun jacobheun merged commit eead174 into master Oct 28, 2019
@jacobheun jacobheun deleted the feat/cid-support branch October 28, 2019 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants