plugeth/node
Felix Lange dcae0d348b
p2p/simulations: fix a deadlock and clean up adapters (#17891)
This fixes a rare deadlock with the inproc adapter:

- A node is stopped, which acquires Network.lock.
- The protocol code being simulated (swarm/network in my case)
  waits for its goroutines to shut down.
- One of those goroutines calls into the simulation to add a peer,
  which waits for Network.lock.

The fix for the deadlock is really simple, just release the lock
before stopping the simulation node.

Other changes in this PR clean up the exec adapter so it reports
node startup errors better and remove the docker adapter because
it just adds overhead.

In the exec adapter, node information is now posted to a one-shot
server. This avoids log parsing and allows reporting startup
errors to the simulation host.

A small change in package node was needed because simulation
nodes use port zero. Node.{HTTP,WS}Endpoint now return the live
endpoints after startup by checking the TCP listener.
2018-10-11 20:32:14 +02:00
..
api.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
config_test.go cmd/geth: add --config file flag (#13875) 2017-04-12 17:27:23 +03:00
config.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
defaults.go rpc: make HTTP RPC timeouts configurable, raise defaults (#17240) 2018-07-31 12:16:14 +03:00
doc.go node: documentation typo fix (#17113) 2018-07-03 11:42:18 +03:00
errors.go node: fix instance dir locking and improve error message 2017-08-18 12:14:00 +02:00
node_example_test.go cmd/geth: add --config file flag (#13875) 2017-04-12 17:27:23 +03:00
node_test.go node: all golint warnings fixed (#16773) 2018-05-22 10:29:41 +03:00
node.go p2p/simulations: fix a deadlock and clean up adapters (#17891) 2018-10-11 20:32:14 +02:00
service_test.go node: ensure datadir can be co-inhabited by different instances 2016-09-16 15:24:31 +02:00
service.go cmd, dashboard, log: log collection and exploration (#17097) 2018-07-11 10:59:04 +03:00
utils_test.go node: all golint warnings fixed (#16773) 2018-05-22 10:29:41 +03:00