Skip to content
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

p2p/dnsdisc: add implementation of EIP-1459 #20094

Merged
merged 5 commits into from Sep 25, 2019
Merged

Conversation

@fjl
Copy link
Contributor

fjl commented Sep 19, 2019

This adds an implementation of node discovery via DNS TXT records to the
go-ethereum library. The implementation doesn't match EIP-1459 exactly,
the main difference being that this implementation uses separate merkle
trees for tree links and ENRs. The EIP will be updated to match p2p/dnsdisc.

To maintain DNS trees, cmd/devp2p provides a frontend for the p2p/dnsdisc
library. The new 'dns' subcommands can be used to create, sign and deploy DNS
discovery trees.

There are a couple of things I'm not happy about in p2p/dnsdisc. Handling of linked
trees is slow-but-correct and the API for querying random nodes isn't final. I'll tackle
those when #19795 is done.

fjl added 3 commits Sep 19, 2019
This adds an implementation of node discovery via DNS TXT records to the
go-ethereum library. The implementation doesn't match EIP-1459 exactly,
the main difference being that the implementation uses separate merkle
trees for tree links and ENRs. The EIP will be updated to match this
implementation.
This change adds the 'dns' subcommand family as a frontend for the
p2p/dnsdisc library. The new commands can be used to update, sign and
deploy DNS TXT records.
@fjl fjl requested a review from zsfelfoldi as a code owner Sep 19, 2019
)

func subdomain(e entry) string {
h := sha3.NewLegacyKeccak256()

This comment has been minimized.

Copy link
@fjl

fjl Sep 24, 2019

Author Contributor

Simplify

Copy link
Member

karalabe left a comment

Having done a review call, this PR in general LGTM. I can imagine some corner cases here and there, but the only real way to detect those is to start building on top, using it and deploying DNS entries. IMHO we should merge it as is (doesn't contain live changes to Geth).

@fjl fjl merged commit 0568e81 into ethereum:master Sep 25, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
elizabethengelman added a commit to makerdao/go-ethereum that referenced this pull request Dec 20, 2019
This adds an implementation of node discovery via DNS TXT records to the
go-ethereum library. The implementation doesn't match EIP-1459 exactly,
the main difference being that this implementation uses separate merkle
trees for tree links and ENRs. The EIP will be updated to match p2p/dnsdisc.

To maintain DNS trees, cmd/devp2p provides a frontend for the p2p/dnsdisc
library. The new 'dns' subcommands can be used to create, sign and deploy DNS
discovery trees.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.