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: add routing id key #6

Merged
merged 1 commit into from
Sep 6, 2018
Merged

feat: add routing id key #6

merged 1 commit into from
Sep 6, 2018

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Sep 6, 2018

For the first step of ipns working locally, the records needed to be stored using base32(/ipns/{cid}), in order to guarantee interop with go-ipfs.

However, integrating the DHT with ipfs, the dht will be responsible for the base32 operation, as it does for all records stored in it, which in this case would end up on base32(base32(/ipns/{cid})).

Accordingly, a new ID key was added (routingKey), which should be used for the routing part of IPNS. After this got released, the ipnsKey will not be needed anymore.

@ghost ghost assigned vasco-santos Sep 6, 2018
@ghost ghost added the status/in-progress In progress label Sep 6, 2018
src/index.js Outdated
@@ -210,6 +210,7 @@ const getIdKeys = (pid) => {

return {
pkKey: new Key(rawStdEncoding(Buffer.concat([pkBuffer, pid]))),
routingKey: new Key(`/ipns/${pid}`), // Added on https://github.com/ipfs/js-ipns/pull/6 (ipnsKey will be deprecated in a future release)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should leave a comment here with the explanation as to why this addition.

Simply leave a link to your comment: https://github.com/ipfs/js-ipns/pull/6#issue-213631461

Other than that LGTM.

@vasco-santos vasco-santos merged commit 3d868fe into master Sep 6, 2018
@ghost ghost removed the status/in-progress In progress label Sep 6, 2018
@vasco-santos vasco-santos deleted the feat/add-libp2p-id-key branch September 6, 2018 15:14
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