Closed raulk closed 4 years ago
I really don't want to have more than one encoding of ENRs. If clients support discv5, they will need to have an RLP library for better or worse. RLP is a fine encoding, and has served us very well. I don't think using it for networking is a bad choice.
The encoding of ENRs is defined as RLP. However, ETH2 clients don't have the necessity to support RLP per se, and ETH1 don't need to support SSZ per se.
We appear to have a mismatch that either:
Another possible direction would entail making ENRs themselves encoding-agnostic, e.g. by prepending a multicodec.
While in theory that would enable the ENR standard to cater for both ETH1 and ETH2 natural encodings, in practice it would end up segregating discovery networks -- which is an undesired effect, i.e. ETH1 nodes would ignore SSZ-encoded ENRs, and ETH2 nodes would ignore RLP-encoded ENRs.
Thoughts?