ethereum / devp2p

Ethereum peer-to-peer networking specifications
984 stars 275 forks source link

discv5: 32-byte node-id incompatible with multihash #96

Closed AgeManning closed 5 years ago

AgeManning commented 5 years ago

Libp2p currently uses multihash for it's PeerIds. These are of length 34 bytes.

If it is desired to support multihash's in the node-id, perhaps we extend this node-id to be a 34 byte object.

fjl commented 5 years ago

I don't understand the need for multihash when it comes to node IDs. IMHO multihash makes sense for files in IPFS because you want to be able to verify the file content using the hash function that created the file's address. If you have a node record you can derive the node ID of that record. Once you have the node ID, the information about the hash function used to derive it isn't needed anymore.

AgeManning commented 5 years ago

Yep sure. The benefit I saw was that new hashes could be supported easier without upgrading the code (potentially stark friendly hashes which may become prevalent).

I have no real opinion on this, just thought I'd raise it.