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

discovery: allow DNS seeds to be overwritten #4744

Merged
merged 2 commits into from
Nov 14, 2020

Conversation

guggero
Copy link
Collaborator

@guggero guggero commented Nov 3, 2020

Fixes #3817.

Need to manually test on testnet, but should be pretty straightforward.

@guggero guggero added p2p Code related to the peer-to-peer behaviour discovery Peer and route discovery / whisper protocol related issues/PRs config Parameters/arguments/config file related issues/PRs labels Nov 3, 2020
@guggero guggero added this to the 0.12.0 milestone Nov 3, 2020
@guggero guggero added this to In progress in v0.12.0-beta via automation Nov 3, 2020
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me, one comment re the fall back addresses.

lncfg/chain.go Outdated
@@ -21,4 +21,5 @@ type Chain struct {
BaseFee lnwire.MilliSatoshi `long:"basefee" description:"The base fee in millisatoshi we will charge for forwarding payments on our channels"`
FeeRate lnwire.MilliSatoshi `long:"feerate" description:"The fee rate used when forwarding payments on our channels. The total fee charged is basefee + (amount * feerate / 1000000), where amount is the forwarded amount."`
TimeLockDelta uint32 `long:"timelockdelta" description:"The CLTV delta we will subtract from a forwarded HTLC's timelock value"`
DNSSeeds []string `long:"dnsseed" description:"The seed DNS server(s) to use for initial peer discovery. Can be specified multiple times, will overwrite the default seed servers."`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we want to handle the fall back SOA address? FWIW, it's a hack we use to allow people to do the SRV requests over Tor using direct TCP DNS resolution, and isn't actually in the spec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll just skip the SOA address if none was specified:

			if dnsSeedTuple[1] == "" {
				log.Tracef("DNS seed %v has no secondary, "+
					"skipping fallback", primarySeed)
				continue
			}

So non-Tor users probably don't need to specify one. I added the possibility to specify a primary and SOA fallback address as a comma separated pair.

@Roasbeef Roasbeef moved this from In progress to Review in progress in v0.12.0-beta Nov 5, 2020
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍰

@Roasbeef Roasbeef merged commit 219a5f0 into lightningnetwork:master Nov 14, 2020
v0.12.0-beta automation moved this from Review in progress to Done Nov 14, 2020
@guggero guggero deleted the dns-seed-config branch November 14, 2020 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Parameters/arguments/config file related issues/PRs discovery Peer and route discovery / whisper protocol related issues/PRs p2p Code related to the peer-to-peer behaviour
Projects
No open projects
v0.12.0-beta
  
Done
Development

Successfully merging this pull request may close these issues.

discovery+lnd: add ability to specify DNS seed nodes on command line
2 participants