-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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/geth: enable DNS discovery by default #20660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it out (without the new dialler) -- seems to work great!
cmd/utils/flags.go
Outdated
@@ -658,6 +658,10 @@ var ( | |||
Name: "netrestrict", | |||
Usage: "Restricts network communication to the given IP networks (CIDR masks)", | |||
} | |||
DiscoveryURLFlag = cli.StringSliceFlag{ | |||
Name: "discovery-urls", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to use discovery.urls
-- in case we want any more flags surrounding discovery later on
@@ -82,6 +86,8 @@ func (c Config) MarshalTOML() (interface{}, error) { | |||
enc.RPCGasCap = c.RPCGasCap | |||
enc.Checkpoint = c.Checkpoint | |||
enc.CheckpointOracle = c.CheckpointOracle | |||
enc.OverrideIstanbul = c.OverrideIstanbul | |||
enc.OverrideMuirGlacier = c.OverrideMuirGlacier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can recall, we don't toml:ize the overrides, because they should only be applied when explicitly called for, not "accidentally" remembered by a config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case you need to add toml:"-"
next time. I will send a PR to remove them after this PR since they're not needed anymore either way (comment says "delete after the fork").
* node: expose config in service context * eth: integrate p2p/dnsdisc * cmd/geth: add some DNS flags * eth: remove DNS URLs * cmd/utils: configure DNS names for testnets * params: update DNS URLs * cmd/geth: configure mainnet DNS * cmd/utils: rename DNS flag and fix flag processing * cmd/utils: remove debug print * node: fix test
This change adds auto-configuration of DNS discovery URLs for supported networks.
Users can override the enrtree:// entry points using the
--discovery-urls
flag (suggestions forbetter names are welcome). Package eth applies this setting by injecting nodes from the given DNS roots as dial candidates.
The change works as-is, but will work a lot better in combination with #20592 because nodes found through DNS will be dialed faster.
The default lists live on the ethdisco.net domain and their content is tracked
at https://github.com/ethereum/discv4-dns-lists