-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use newer PeerID as CID representation #976
Comments
1. We'll need to make sure the new encoding is supported in all implementations first.
2. We'll need to support the new encoding in go-multiaddr.
At the moment, I think the best approach is to make any relevant changes
in go-ipfs only.
|
go-multiaddr has no dependence on PeerID (or transitively CID) at all, which it really needs to per the spec in order to support
What would you think about adding some flag or function that can define the default In particular I'm concerned about logging where the logs will all get b58 peerIDs, but the CLI commands will output b36. How would we deal with logging peer IDs in libp2p components like the DHT? |
It's just that that dependency is a little backwards. I wonder if this is a case where a little bit of copy/paste would go a long way. All we need to do is:
|
I generally prefer to avoid flags like this but it's up to you. I think we'll need to let users specify the desired encoding anyways so I'm not sure how much it would help. We'll likely need an encoding system like we have for CIDs.
Ah, I see. I think we can just "deal" with this for now. |
License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
@aschmahmann this seems like it is close-able... yes? |
As described in the peerID spec there are two ways to encode peerIDs into text.
libp2p-key
and then encode using multibaseCurrently the
Encode(peerID)
function returns the legacy base58 encoding. It would be nice to start using the CID representation as it will mean that the default representation of Ed25519 keys will be as CIDs. Some implications include:We'd have to choose what base to encode the CIDs into by default (cc ipfs/specs#247). Two (of many) viable options here are:
Note: Changing the defaults here may cause problems for applications that interact with libp2p implementations that don't yet have CID support AND are using Ed25519 keys by default.
@lidel has added some context on this here: ipfs/kubo#6916 (comment)
^@raulk @Stebalien
The text was updated successfully, but these errors were encountered: