ethereum / devp2p

Ethereum peer-to-peer networking specifications
995 stars 277 forks source link

discv5: use compressed ephemeral key in handshake #135

Closed jannikluhn closed 4 years ago

jannikluhn commented 4 years ago

It doesn't seem to be explicitly documented, but apparently we use the 64 byte uncompressed format for sending ephemeral public keys (according to the wire test vectors). In ENRs we use the 33 byte compressed format. I think this is discrepancy is unnecessarily confusing.

ENRs are already EIPed, but would it be too late already to change the wire protocol to use the compressed format?

fjl commented 4 years ago

No, it's not too late to change the wire protocol. I can create a PR to change it, but we need to notify all implementers. Would be good to have a list of implementations :)

fjl commented 4 years ago

The point compression will add a bit of extra CPU time to the handshake, need to benchmark how much.