-
Notifications
You must be signed in to change notification settings - Fork 44
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
peer-id questions #13
Comments
Not quite, this is more of a module I created as a convenient abstraction. go-ipfs has the Id generation code 'somewhere'
From what I could extrapolate from its usage, the 'mandatory' API is what is implemented.
I left it as js-peer-id because it is also used by libp2p directly.
We would need multikey to be ready ipfs/specs#58 |
Thanks for the quick response, as ever, @diasdavid!
PeerID is a core abstraction of libp2p, correct? This ought to be formalized and specced out at some point.
Even the pretty printing utilities? What operations does a PeerID need to support? Just be a unique identifier (i.e. compare operation)? Be a pub/priv keypair? Use RSA? Ideally it would impose as few properties as possible and still be useful.
Right, but does it make sense that that libp2p shouldn't depend on an IPFS-specific piece like this? Shouldn't libp2p depend on the PeerID interface, not a concrete impl like this?
Identity != keypair though, right? Where possible we should prefer opaque identifiers. |
I see where your mind is headed, yes, do understand and agree. Although wouldn't say it it a priority right now, note that in the end of the day, and IPFS id is really just a identifier of how the note is recognised in the network, think about it as if it was a mobile IP.
In IPFS case, right now, |
> Identity != keypair though, right? Where possible we should prefer opaque identifiers.
In IPFS case, right now, `identity === keypair`, note that each time you connect to a peer, you: a) get his PubKey b) validate that PubKey encodes to its peerId (b58.encode(multihash(pubkey, sha-256)) c) do an handshake with a challenge (like TLS) d) confirm that you are actually connected to the right peer.
Yes, this is a great argument for making PeerID different from an "IPFS Identity" :+1. PeerIDs should be a means to identify a peer in the network, and all libp2p users may not employ a) SHA-256, b) multihashes, c) B58 encoding, and heck maybe even d) keypairs.
|
Heya! I had some questions about peer id:
js-peer-id
implements a IPFS PeerID, shouldn't this repo bejs-ipfs-peer-id
?The text was updated successfully, but these errors were encountered: