Commit graph

30 commits

Author SHA1 Message Date
Elad_
6f5ed03e15
kademlia persistence simulation (#347)
* swarm/network: Kademlia updates to full and SuggestPeer methods
* swarm/network: add more tests and fixes
* fixed a bug in state store that did not close the file handle on shutdown
* added test for kademlia state storage across sessions
2018-04-12 10:08:36 +02:00
Fabio Barone
18de39d462 swarm: worked in feedback comments to PR 2018-03-15 14:41:14 -05:00
Fabio Barone
9e1aeac485 swarm: migrated overlay sim to rewrite 2018-03-15 14:41:14 -05:00
Anton Evangelatov
7328021a7c p2p/sim: fix comment and update ExternalIP 2018-03-09 14:32:49 +01:00
Anton Evangelatov
96e374efe5 p2p/sim: use ipv4 2018-03-09 14:11:25 +01:00
Anton Evangelatov
8c05e9b252 p2p/sim, swarm/network: re-use externalIP method 2018-03-09 14:11:25 +01:00
Anton Evangelatov
90c0190b7e p2p/sim, swarm/network: docker discovery tests 2018-03-09 14:11:25 +01:00
Anton Evangelatov
d839200024 p2p: changed logger broken discovery tests 2018-03-04 14:32:29 +01:00
Anton Evangelatov
0c46ec423f Merge branch 'master' into swarm-network-rewrite 2018-02-19 17:53:43 +01:00
Anton Evangelatov
bcab1fc348 p2p/sim, swarm/network: configurable EnableMsgEvents, and reduced indirection when creating Simulation Nodes 2018-02-16 17:00:08 +01:00
Anton Evangelatov
26390b4021 p2p/sim: simpler logic for CreateNode HTTP endpoint 2018-02-16 15:38:31 +01:00
Anton Evangelatov
443ff80036 p2p/sim: update socket pipe to use the default available buffer from OS 2018-02-16 12:54:21 +01:00
Felix Lange
a5c0bbb4f4
all: update license information (#16089) 2018-02-14 13:49:11 +01:00
Anton Evangelatov
8c52537b7a p2p/sim: increase timeout 2018-02-14 12:36:44 +01:00
Anton Evangelatov
029b6928c9 swarm/network: disable failing tests on stream pkg 2018-02-13 14:05:02 +01:00
Anton Evangelatov
770a928e0c p2p/sim: increase timeout; skip test when no buffer space is available on OS 2018-02-13 12:48:07 +01:00
Anton Evangelatov
b7e6bf0803 p2p/sim, pot, swarm: fixes according to linter 2018-02-13 12:28:54 +01:00
Anton Evangelatov
dcd03063db p2p/sim: reenable EnableMsgEvents so that TestMsgFilterPassMultiple passes 2018-02-12 16:53:08 +01:00
Anton Evangelatov
544d0a99cc p2p/sim: fix comment 2018-02-07 13:07:50 +01:00
Anton Evangelatov
d0e104b280 p2p/sim, swarm/network: propagate port via NodeConfig 2018-02-07 12:58:36 +01:00
Anton Evangelatov
0bea19ec34 p2p/sim: hack exec node startup with known port 2018-02-06 16:48:05 +01:00
Anton Evangelatov
a81aa6acb6 swarm/network: improve tests 2018-02-05 10:27:25 +01:00
zelig
98ba78c521 swarm/network, swarm/storage, p2p/similations: fix stream tests add delivery benchmarks
- memstore garbage collect does not delete open requests
 - dbstore batch write errors handling  somewhat impoved but should be checkable after dbStored fires
 - inproc adapter does not allow message events in p2p server
 - network pkg allows loglevel flag
 - streamer registry gets a defaultSkipCheck option which the RequestFromPeers uses
 - waitForPeers gets a parameter how many peers it should wait for
 - number of peers to wait for is given by the global peerCount NodeID -> int function
 - make delivery and received chunk channels buffered with const deliveryCap
 - change all sendpriority calls to use context to avoid disconnects due to buffer contention (but potential memory leak!)
 - check error for all sends
 - abstract out trigger function for pivot
 - abstract out client calls for IDs
 - introduce channel to control check function is only called if previous one finished even if triggered (dubious)
 - implement benchmarks for delivery through a chain of requests through multiple hops
 - abstract out batchDone function on client
 - rename peer locks to client/serverMu
 - testing CheckResult only gives averages if there are more than one node to passed
 - testing implememts WatchDisconnections which aborts the simulation
 - testing implements PivorTrigger and ClientCall
2018-01-21 20:30:02 +01:00
Balint Gabor
00c7ab9178 Use discover.PubkeyID to generate node id in simulation 2018-01-12 09:38:43 +01:00
Lewis Marshall
41d3011ebe swarm/pss: Improve network tests
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-12-14 16:19:59 +00:00
Felix Lange
3654aeaa4f
p2p/simulations: fix gosimple nit (#15661) 2017-12-13 03:15:27 +01:00
holisticode
fd777bb210 p2p/simulations: add mocker functionality (#15207)
This commit adds mocker functionality to p2p/simulations. A
mocker allows to starting/stopping of nodes via the HTTP API.
2017-12-12 19:10:41 +01:00
Zach
3da1bf8ca1 all: use gometalinter.v2, fix new gosimple issues (#15650) 2017-12-12 19:05:47 +01:00
Lewis Marshall
54aeb8e4c0 p2p/simulations: various stability fixes (#15198)
p2p/simulations: introduce dialBan

- Refactor simulations/network connection getters to support
  avoiding simultaneous dials between two peers If two peers dial
  simultaneously, the connection will be dropped to help avoid
  that, we essentially lock the connection object with a
  timestamp which serves as a ban on dialing for a period of time
  (dialBanTimeout).

- The connection getter InitConn can be wrapped and passed to the
  nodes via adapters.NodeConfig#Reachable field and then used by
  the respective services when they initiate connections. This
  massively stablise the emerging connectivity when running with
  hundreds of nodes bootstrapping a network.

p2p: add Inbound public method to p2p.Peer

p2p/simulations: Add server id to logs to support debugging
in-memory network simulations when multiple peers are logging.

p2p: SetupConn now returns error. The dialer checks the error and
only calls resolve if the actual TCP dial fails.
2017-12-01 12:49:04 +01:00
Lewis Marshall
9feec51e2d p2p: add network simulation framework (#14982)
This commit introduces a network simulation framework which
can be used to run simulated networks of devp2p nodes. The
intention is to use this for testing protocols, performing
benchmarks and visualising emergent network behaviour.
2017-09-25 10:08:07 +02:00