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

cmd/utils: enable snap dns discovery #41

Closed
wants to merge 1 commit into from

Conversation

holiman
Copy link

@holiman holiman commented Dec 3, 2020

This enables snap sync to find peers via DNS.
Current status:

TRACE[12-03|11:51:00.906] >> FINDNODE/v4                           id=6033ccab352b6a97 addr=52.64.102.159:30303   err=nil
TRACE[12-03|11:51:00.914] Updating DNS discovery root              tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
DEBUG[12-03|11:51:00.914] Error in DNS random node sync            tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
TRACE[12-03|11:51:00.921] Updating DNS discovery root              tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
DEBUG[12-03|11:51:00.921] Error in DNS random node sync            tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
TRACE[12-03|11:51:00.924] Updating DNS discovery root              tree=all.mainnet.ethdisco.net  err=nil
TRACE[12-03|11:51:00.929] Updating DNS discovery root              tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
DEBUG[12-03|11:51:00.929] Error in DNS random node sync            tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.1:53: no such host"
TRACE[12-03|11:51:00.935] DNS discovery lookup                     name=FDXN3SN67NA5DKA4J2GOK7BVQI.all.mainnet.ethdisco.net err=nil

Requires

  1. cmd/devp2p: add node filter for snap + fix arg error ethereum/go-ethereum#21950 to filter snap peers from the node list, then
  2. add crawling for snap nodes skylenet/discv4-crawl#3 , so it actually publishes it,

@holiman
Copy link
Author

holiman commented Dec 4, 2020

Ok, devp2p + crawler updated, snap is now live on ethdisco.net!

@holiman
Copy link
Author

holiman commented Dec 4, 2020

@fjl does this look ok to you? some grep from the output of running it

TRACE[12-04|09:42:58.350] DNS discovery lookup                     name=FDXN3SN67NA5DKA4J2GOK7BVQI.all.mainnet.ethdisco.net err=nil
TRACE[12-04|09:42:58.433] DNS discovery lookup                     name=QCZIEBKDK6BL5N6YJLZEPT2RBE.all.mainnet.ethdisco.net err=nil
DEBUG[12-04|09:43:00.407] Couldn't add port mapping                proto=tcp extport=30303 intport=30303 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
DEBUG[12-04|09:43:00.407] Couldn't add port mapping                proto=udp extport=30303 intport=30303 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
TRACE[12-04|09:43:03.306] Updating DNS discovery root              tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.2:53: dial udp 10.139.1.2:53: i/o timeout"
DEBUG[12-04|09:43:03.306] Error in DNS random node sync            tree=snap.mainnet.ethdisco.net err="lookup snap.mainnet.ethdisco.net on 10.139.1.2:53: dial udp 10.139.1.2:53: i/o timeout"
TRACE[12-04|09:43:03.310] Updating DNS discovery root              tree=snap.mainnet.ethdisco.net err=nil
TRACE[12-04|09:43:03.315] DNS discovery lookup                     name=FDXN3SN67NA5DKA4J2GOK7BVQI.snap.mainnet.ethdisco.net err=nil
TRACE[12-04|09:43:03.321] DNS discovery lookup                     name=3YLFPAIJ5UUQJ2UDJBN23HJBW4.snap.mainnet.ethdisco.net err=nil
TRACE[12-04|09:43:03.328] DNS discovery lookup                     name=UGK3J2JWKYEQJBU6Y32HIQD2KU.snap.mainnet.ethdisco.net err=nil
TRACE[12-04|09:43:03.338] DNS discovery lookup                     name=V4NWX74OBPPFJ7ZPTFWXAXZ5AQ.snap.mainnet.ethdisco.net err=nil
TRACE[12-04|09:43:03.461] DNS discovery lookup                     name=JCQHP47Q2AAFVHNU47K4QPHFQM.all.mainnet.ethdisco.net err=nil

@holiman
Copy link
Author

holiman commented Dec 8, 2020

Running this on my machine now, it found the snap-bootnodes pretty quickly

@holiman
Copy link
Author

holiman commented Dec 9, 2020

Closing this, I've pushed to the branch instead

@holiman holiman closed this Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant