bsc/p2p
Felix Lange 191364c350 p2p/dnsdisc: add enode.Iterator API (#20437)
* p2p/dnsdisc: add support for enode.Iterator

This changes the dnsdisc.Client API to support the enode.Iterator
interface.

* p2p/dnsdisc: rate-limit DNS requests

* p2p/dnsdisc: preserve linked trees across root updates

This improves the way links are handled when the link root changes.
Previously, sync would simply remove all links from the current tree and
garbage-collect all unreachable trees before syncing the new list of
links.

This behavior isn't great in certain cases: Consider a structure where
trees A, B, and C reference each other and D links to A. If D's link
root changed, the sync code would first remove trees A, B and C, only to
re-sync them later when the link to A was found again.

The fix for this problem is to track the current set of links in each
clientTree and removing old links only AFTER all links are synced.

* p2p/dnsdisc: deflake iterator test

* cmd/devp2p: adapt dnsClient to new p2p/dnsdisc API

* p2p/dnsdisc: tiny comment fix
2019-12-12 11:15:36 +02:00
..
discover p2p/discover: slow down lookups on empty table (#20389) 2019-11-26 12:14:43 +02:00
discv5 p2p/discv5: add deprecation warning and remove unused code (#20367) 2019-11-22 18:02:13 +02:00
dnsdisc p2p/dnsdisc: add enode.Iterator API (#20437) 2019-12-12 11:15:36 +02:00
enode p2p/enode: remove data race in sliceIter (#20421) 2019-12-05 22:16:35 +01:00
enr core/forkid: implement the forkid EIP, announce via ENR (#19738) 2019-07-08 18:53:47 +03:00
nat build: use golangci-lint (#20295) 2019-11-18 10:49:17 +02:00
netutil p2p/netutil: fix staticcheck warning (#20315) 2019-11-19 11:17:41 +02:00
simulations p2p/simulations: fix staticcheck warnings (#20322) 2019-11-19 17:16:42 +01:00
testing all: update author list and licenses 2019-07-22 12:17:27 +03:00
dial_test.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
dial.go dashboard: send current block to the dashboard client (#19762) 2019-11-13 12:13:13 +01:00
message_test.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
message.go p2p: measure subprotocol bandwidth usage 2019-09-27 18:00:25 +03:00
metrics.go dashboard: send current block to the dashboard client (#19762) 2019-11-13 12:13:13 +01:00
peer_error.go p2p: fix some golint warnings (#16577) 2018-05-08 13:08:43 +02:00
peer_test.go p2p: fix bug in TestPeerDisconnect (#20277) 2019-11-13 12:01:52 +01:00
peer.go p2p: measure subprotocol bandwidth usage 2019-09-27 18:00:25 +03:00
protocol.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
rlpx_test.go p2p: remove useless parameter (#19433) 2019-04-10 11:49:02 +03:00
rlpx.go p2p: remove unused code (#20325) 2019-11-19 17:16:08 +01:00
server_test.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
server.go p2p: remove unused code (#20325) 2019-11-19 17:16:08 +01:00
util_test.go p2p: enforce connection retry limit on server side (#19684) 2019-06-11 12:45:33 +02:00
util.go p2p: remove unused code (#20325) 2019-11-19 17:16:08 +01:00