PoC: Network simulation framework#1555
Conversation
|
Total of 1570 files changed is quite heavy for the review on github webpage diff. I assume that most of them are vendored packages. Would it be better to vendor in a different PR? But then travis will fail. Any suggestions how to review? |
@janos check the PR description :P . Have a look directly at https://github.com/skylenet/swarm/tree/network-sim-v2/simulation |
|
Ah, thanks @skylenet, I missed it. |
|
Relates to ethersphere/user-stories#33 |
|
Overall looks good to me. Actually writing tests with this framework will be the ultimate test on how useful such a framework is, but I think so far we are going in the right direction. It'd be nice if we can speed up a bit the tests, or reduce the constants, 104s. seems a lot to me. |
The biggest time (~50s) is spent within |
|
Right, yeah, making it optional at some point would be a good idea I think. |
|
@skylenet it was naughty to merge a PR with one review. Now we protected merges needing 2 reviews. |
* 'master' of github.com:ethersphere/swarm: (54 commits) api, chunk, cmd, shed, storage: add support for pinning content (ethersphere#1509) docs/swarm-guide: cleanup (ethersphere#1620) travis: split jobs into different stages (ethersphere#1615) simulation: retry if we hit a collision on tcp/udp ports (ethersphere#1616) api, chunk: rename Tag.New to Tag.Create (ethersphere#1614) pss: instrumentation and refactor (ethersphere#1580) api, cmd, network: add --disable-auto-connect flag (ethersphere#1576) changelog: fix typo (ethersphere#1605) version: update to v0.4.4 unstable (ethersphere#1603) swarm: release v0.4.3 (ethersphere#1602) network/retrieve: add bzz-retrieve protocol (ethersphere#1589) PoC: Network simulation framework (ethersphere#1555) network: structured output for kademlia table (ethersphere#1586) client: add bzz client, update smoke tests (ethersphere#1582) swarm-smoke: fix check max prox hosts for pull/push sync modes (ethersphere#1578) cmd/swarm: allow using a network interface by name for nat purposes (ethersphere#1557) pss: disable TestForwardBasic (ethersphere#1544) api, network: count chunk deliveries per peer (ethersphere#1534) network/newstream: new stream! protocol base implementation (ethersphere#1500) swarm: fix bzz_info.port when using dynamic port allocation (ethersphere#1537) ...
This PR brings in a new simulation framework which has the following available adapters:
Additional features:
Using the different adapters:
Example can be found under: https://github.com/skylenet/swarm/blob/network-sim-v2/simulation/examples/cluster/cluster_test.go
Importing a snapshot:
Example: https://github.com/skylenet/swarm/tree/network-sim-v2/simulation/examples/snapshot
Code review
Since a lot of vendored libs have been included due to the docker/kubernetes clients, I would suggest to have a look directly @ https://github.com/skylenet/swarm/tree/network-sim-v2/simulation