This change works around the 32k RDATA character limit per change
request and fixes several issues in the deployer which prevented it from
working for our production trees.
This is a temporary fix for a problem which started happening when the
dialer was changed to read nodes from an enode.Iterator. Before the
iterator change, discovery queries would always return within a couple
seconds even if there was no Internet access. Since the iterator won't
return unless a node is actually found, discoverTask can take much
longer. This means that the 'emergency connect' logic might not execute
in time, leading to a stuck node.
* build: remove env.sh
This removes the dirty symlink-to-self hack we've had for years. The
script was added to enable building without GOPATH and did that job
reliably for all this time. We can remove the workaround because modern
Go supports building without GOPATH natively.
* Makefile: add GO111MODULE=on to environment
* internal/testlog: print file+line number of log call in test log
This changes the unit test logger to print the actual file and line
number of the logging call instead of "testlog.go:44".
Output of 'go test -v -run TestServerListen ./p2p' before this change:
=== RUN TestServerListen
--- PASS: TestServerListen (0.00s)
testlog.go:44: DEBUG[01-08|15:16:31.651] UDP listener up addr=127.0.0.1:62678
testlog.go:44: DEBUG[01-08|15:16:31.651] TCP listener up addr=127.0.0.1:62678
testlog.go:44: TRACE[01-08|15:16:31.652] Accepted connection addr=127.0.0.1:62679
And after:
=== RUN TestServerListen
--- PASS: TestServerListen (0.00s)
server.go:868: DEBUG[01-08|15:25:35.679] TCP listener up addr=127.0.0.1:62712
server.go:557: DEBUG[01-08|15:25:35.679] UDP listener up addr=127.0.0.1:62712
server.go:912: TRACE[01-08|15:25:35.680] Accepted connection addr=127.0.0.1:62713
* internal/testlog: document use of t.Helper
* add node.go unit test file node_test.go
* add node_test.go file license and rollback trie_test.go
* fix unused variable v
* trie: fix license year
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* les: move the checkpoint oracle into its own package
It's first step of refactor LES package. LES package
basically can be divided into LES client and LES server.
However both sides will use checkpoint package for
status retrieval and verification. So this PR moves
checkpoint oracle into a separate package
* les: address comments
This commit intents to replicate the DialHTTPWithClient function which allows
creating a RPC Client using a custom dialer but for websockets.
We introduce a new DialWebsocketWithDialer function which allows the caller
to instantiate a new websocket client using a custom dialer.
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* assert errs
* 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