So with issue #32, we’ve discussed adding node discovery via DNS similarly to EIP-1459. Here is a write up of my suggestions how I think we should handle this based off of both EIP-1459 and how bitcoin does it along with minor changes.
Firstly, how do these 2 versions work:
Bitcoin: Here, the IPs of nodes are simply stored as
Arecords for a given domain name.
Ethereum: This is a little more complicated. The
@record of the domain name contains the root hash and a signature used to validate that all the records are valid. Then other records contain a hash that needs to be resolved. We validate that the resolving the record names record contains the value of the hash. If we then see a branch we continue the process, if we see an
enr, we decode, verify the node record and import it to local node storage.
Here is my suggestion on how we should do things, I believe we should go more like the Ethereum route however change it to make it fit into our “ecosystem” a bit more. Firstly I would propose changing the use of
Now the next suggestion can be avoided and we could just use the merkle root method used within the ethereum method. However instead of having a merkle root which requires to be updated whenever we change any of the records, I propose appending a signature at the end of the
TXT record. This would contain a signature signed with by the Public Key recorded in the
@ record. So what we would have is:
; name ttl class type content @ 60 IN TXT <PubKey> 0 86900 IN TXT addr=<multiaddr> sig=<Signature> 1 86900 IN TXT addr=<multiaddr> sig=<Signature>