Commit graph

376 commits

Author SHA1 Message Date
Lewis Marshall
f079529445 p2p/simulations: Don't disconnect nodes before stopping
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-18 12:14:34 +02:00
Lewis Marshall
5cfb34a151 p2p/simulations: Fix stopping exec nodes
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-18 12:13:49 +02:00
Lewis Marshall
479409d1f3 p2p/simulations: Fix creating snapshots
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 10:52:16 +01:00
Lewis Marshall
a92a341450 p2p/simulations: Add external networks to HTTP server
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 10:52:15 +01:00
Lewis Marshall
177e720b08 p2p/simulations: Support inter-node RPC connections
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 10:52:15 +01:00
Lewis Marshall
1341843f7e p2p/simulations: Fix HTTP tests
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 10:52:15 +01:00
Lewis Marshall
69c2e537c6 p2p/simulations: Use WebSocket RPC
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 10:14:40 +01:00
Viktor Trón
1a4b945bff Merge pull request #98 from holisticode/link_distance
Link distance
2017-05-29 23:47:21 -04:00
Lewis Marshall
ec1b2541dc p2p/discover: Fix NodeID text encoding
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-29 21:34:29 +01:00
Fabio Barone
527d12c89a p2p/simulations: return edge distance in stream update 2017-05-29 12:14:51 -05:00
Fabio Barone
1370269a9c p2p/simulations: added link distance support 2017-05-29 12:08:51 -05:00
Viktor Trón
fe1d6d215d Merge pull request #96 from ethersphere/network-testing-framework-node-id
p2p/simulations: Drop adapters.NodeId in favour of discover.NodeID
2017-05-27 21:04:17 -04:00
Viktor Trón
5e3c9d6c93 Merge pull request #94 from holisticode/network-testing-framework
p2p/simulations: eventstream backend double-backslash on init
2017-05-27 21:04:04 -04:00
Lewis Marshall
da6d15da4c p2p/simulations: Drop adapters.NodeId in favour of discover.NodeID
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-27 16:11:03 +01:00
Lewis Marshall
111dd56f17 p2p/simulations: Fix starting nodes with multiple services
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-23 22:27:55 -07:00
Fabio Barone
7c05c8402b p2p/simulations: eventstream backend returns double-backslash on init (FF support) 2017-05-22 13:20:35 -05:00
zelig
31d9c08d3b p2p: fix service func register 2017-05-18 13:56:12 -07:00
Lewis Marshall
2073ee7c73 p2p/simulations: Fix SimAdapter
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-18 10:09:20 -07:00
zelig
020214b7ca swarm/network: tweaks and fixes 2017-05-18 09:29:04 -07:00
nolash
7341530f6f swarm/pss, p2p/simulations/adapters: added pss routing peerpool 2017-05-18 09:29:04 -07:00
nolash
a924c8572e swarm/pss, swarm/network, p2p/simulations: pss prototest fix 2017-05-17 22:51:06 -07:00
nolash
d219b0edb0 WIP 2017-05-17 22:45:17 -07:00
nolash
aaeb8497a0 WIP 2017-05-17 22:05:07 -07:00
nolash
3a4aee8087 swarm/pss, p2p/testing, p2p/simulations/adapters: svcs sequence 2017-05-17 22:05:07 -07:00
nolash
dedc26bd2c swarm/pss, p2p/simulations/adapters: Multiple nodeadapter svcs + psstests 2017-05-17 22:05:07 -07:00
nolash
96331ac340 swarm, swarm/pss, swarm/network: pssclient rw reads and writes from websocket
pss is now separate package
pss event feed removed, multipile handlers allowed instead
NOTE! pss tests are removed and will be rewritten
remove pssclient outbox, psscache bug fix
WIP tests reinstation
2017-05-17 22:04:57 -07:00
Lewis Marshall
be0335c889 p2p/simulations: Disable message events
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-17 21:53:50 -07:00
Lewis Marshall
39992d5e1b p2p/simulations: Support stopping, starting and deleting networks
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-17 15:47:13 -07:00
Lewis Marshall
3ba68dc7af p2p: Change p2p.Server back to a concrete type 2017-05-16 20:57:31 -07:00
Lewis Marshall
91c198778c p2p/protocols: Refactor
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-16 20:57:31 -07:00
zelig
c870e2be26 WIP network rewrite 2017-05-15 18:31:40 -07:00
zelig
b77b855f2c p2p/protocols: do handshake async w timeout 2017-05-15 18:31:40 -07:00
Lewis Marshall
135a858373 p2p/simulations: Switch network snapshot to a GET request
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-15 11:30:04 -07:00
Fabio Barone
145ec4ea73 p2p/simulations: scenarios support; HTTP OPTIONS support 2017-05-12 17:28:14 -05:00
Lewis Marshall
d7eb6b5a70 p2p/simulations: Snapshot support
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-12 08:57:07 -07:00
Lewis Marshall
cf462b7781 p2p/simulations: Add p2psim command-line API client
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-10 01:39:02 -07:00
Lewis Marshall
584f8b8cf4 p2p/simulations: Refactor events
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-10 01:39:02 -07:00
Lewis Marshall
cdab665475 p2p/simulations: Move PeerEvents to admin RPC namespace
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-08 10:51:55 +01:00
Lewis Marshall
6de09120d3 p2p/simulations: Disconnect peers on SimNode.Stop
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:01 +01:00
Lewis Marshall
1aa80c5012 p2p/simulations: Refactor simulation HTTP API
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:01 +01:00
zelig
d9af74e3fb swarm/network, p2p/protocols: fix kademlia crashes and msg asyncrony 2017-05-06 14:25:01 +01:00
Lewis Marshall
ff24b603d0 p2p/simulations: Don't allow connections to stopped SimNodes
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:01 +01:00
Lewis Marshall
d3543fb458 p2p/simulations: Track message events
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:01 +01:00
Lewis Marshall
12eb088e5b p2p/simulations: Refactor
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:00 +01:00
nolash
246eb00def p2p, p2p/adapters, p2p/testing: message reporting for simulation layer
Adds a MsgReporter struct that wraps MsgReadWriter that posts message read and write to an subscribable event.Feed
2017-05-06 14:25:00 +01:00
nolash
d5daa9a323 swarm/network: event feed/websockets pss msg notification
Adds pub/sub of incoming Pss messages using event.Feed,
and a websockets interface for pss send and notifications
through persistent connection using rpc.notifier.

Websocket RPC are started automatically on the swarm executable
if the --pss flag is present. If more instances are to be run,
alternate ws ports can be specified with the --pssport flag.

Current implementation also includes a shallow builtin ping/pong handler
with topic "pss" and version 1, to simplify POCs and testing against pss.
This will eventually be removed, so no code should be made dependent on it.
2017-05-06 14:25:00 +01:00
Lewis Marshall
247e40a36a p2p/simulations: Get peer events via RPC
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:25:00 +01:00
Fabio Barone
a4b52df32c p2p/simulations: LiveEvents DidConnect and DidDisconnect use GetOrCreateConn 2017-05-06 14:25:00 +01:00
Fabio Barone
c86d0f4d25 p2p/simuations: first attempt at event types 2017-05-06 14:25:00 +01:00
nolash
b8bf32bce3 swarm/network: pss 0.1
General:
    - Message encapsulation is temporary until integration with whisper

    Incoming message handling:
    - Implements a dispatcher for registering handler functions to pss topics
    - Handlers can be any sort of function, and can send/receive on p2p.MsgReadWriter
    - Actual p2p.Protocol handling now as pluggable convenience function

Sending and routing:
    - Added temporary cache solution based on message hash digest
    - Send and forward split up as separate methods
    - Send is now payload agnostic (p2p.Protocol replies massaged in p2p.MsgWriter)

Tests:
    - TestPssRandom...
	Sends PSS between randomly selected nodes in different population magnitudes
    - TestPssFullLinearEcho
        A->B->C->B->A ping/pong over pss, where A and C are running pss
    - TestPssFullRandom50Pct
        10 nodes where 5 are running pss, 5 sends to/from random nodes
        (messages currently get stuck in kad. routing, discarded by cache block)
    - Protocoltester tests status unknown
2017-05-06 14:25:00 +01:00