Commit graph

16 commits

Author SHA1 Message Date
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
zelig
d9af74e3fb swarm/network, p2p/protocols: fix kademlia crashes and msg asyncrony 2017-05-06 14:25:01 +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
Lewis Marshall
4c6648ef49 all: Fix logging
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:23:39 +01:00
Lewis Marshall
5dcae2e26e p2p/adapters: Remove Messenger abstraction
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:23:38 +01:00
zelig
b7860c7fc6 kademlia fixes 2017-05-06 14:23:38 +01:00
nolash
11aeaec420 swarm/network: WIP kademlia network sim tests 2017-05-06 14:23:38 +01:00
zelig
e26d672438 kademlia discovery working 2017-05-06 14:23:38 +01:00
zelig
1eedb4a2c8 swarm/network: WIP testing for protocol 2017-05-06 14:23:38 +01:00
nolash
140c7f7f23 swarm/network: WIP protocol testfixes 2017-05-06 14:23:38 +01:00
zelig
7f22abaead swarm/network, p2p: fixes 2017-05-06 14:23:38 +01:00
zelig
7c0a205335 swarm/network: kademlia implementation initial commit 2017-05-06 14:23:38 +01:00
nolash
9822d7405e p2p/simulations: improvement and adding msg events
* Conceals rw in messenger type
* Adds generic remote control for nodes in network sim
* Adds msg type and event to sim, journal
* Msg http output, http options handler
* Msg event added to "cytoscape" for output to visualizer
* Msg event structure changed to fit "cytodata" logic
* Fix for handling CORS/PUT requests:
* fallthrough OPTIONS method handler
* Access-Control-Allow-Methods header added (note that the servermux panics if sent empty method value through http)
2017-05-06 14:23:38 +01:00
nolash
3c84c329f9 p2p/adapters: Removed pointer receiver for RLPxMessenger
Pointer rcvr incompatible with protocols.NewPeer

p2p: Removed duplicate declaration of Messenger interface

p2p/protocols,swarm/network: Codemap primitive type correction
Codemap was using uint for message types
But Messenger.SendMsg needs uint64
2017-05-06 14:23:38 +01:00
zelig
7a6ff56333 p2p: network testing framework and protocol abstraction
subpackages:

* adapters:
  * msgpipes for simulated test connections
  * rlpx the RLPx adapter for normal non-test use
  * inproc simulated in-process network adapter
  * docker placeholder for docker cluster remote adapter
* protocols: easy-to-setup modular protocols
* simulations:
  * generic network model
  * journal, events, snapshots
  * cytoscape visualisation plugin
  * resourceful controller suite + REST API server
  * example: connectivity UX backend
* testing: test resource drivers
  * exchange: trigger/expect style driver for single node and its peers
  * sessions:   for unit testing protocols and protocol modules
  * (network: for network testing, benchmarking, stats, correctness, fault tolerance)
  * test peerpool

see more in the README-s in each subpackage

* p2p/server : conn/disconn hooks
* reporter remote client skeleton
2017-05-06 14:23:38 +01:00