bsc/cmd/utils
Felix Lange b8040a430e
cmd/utils: use eth DNS tree for snap discovery (#22808)
This removes auto-configuration of the snap.*.ethdisco.net DNS discovery tree.
Since measurements have shown that > 75% of nodes in all.*.ethdisco.net support
snap, we have decided to retire the dedicated index for snap and just use the eth
tree instead.

The dial iterators of eth and snap now use the same DNS tree in the default configuration,
so both iterators should use the same DNS discovery client instance. This ensures that
the record cache and rate limit are shared. Records will not be requested multiple times.

While testing the change, I noticed that duplicate DNS requests do happen even
when the client instance is shared. This is because the two iterators request the tree
root, link tree root, and first levels of the tree in lockstep. To avoid this problem, the
change also adds a singleflight.Group instance in the client. When one iterator
attempts to resolve an entry which is already being resolved, the singleflight object
waits for the existing resolve call to finish and returns the entry to both places.
2021-05-04 11:29:32 +02:00
..
cmd.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
customflags_test.go cmd/utils: fix path expansion on windows 2015-08-06 17:18:59 +02:00
customflags.go cmd/clef, cmd/geth: use SplitAndTrim from cmd/utils (#21579) 2020-09-22 23:22:54 +02:00
diskusage_openbsd.go cmd/utils: fix compilation issue on openbsd (#22511) 2021-03-20 19:54:17 +01:00
diskusage_windows.go cmd/geth: graceful shutdown if disk is full (#22103) 2021-01-19 09:26:42 +01:00
diskusage.go cmd/utils: fix compilation issue on openbsd (#22511) 2021-03-20 19:54:17 +01:00
flags_legacy.go cmd/utils: remove deprecated command line flags (#22263) 2021-02-24 14:07:58 +01:00
flags_test.go cmd/utils: allow for multiple influxdb tags (#18520) 2019-01-29 09:14:24 +01:00
flags.go cmd/utils: use eth DNS tree for snap discovery (#22808) 2021-05-04 11:29:32 +02:00
prompt_test.go cmd: abstract getPassPhrase functions into one (#21219) 2020-06-30 09:56:40 +02:00
prompt.go cmd: abstract getPassPhrase functions into one (#21219) 2020-06-30 09:56:40 +02:00