removed all Pss in symbol names whereever possible (and sensible)
discovery switch in hive now prevents add of suggested peers
this is probably not a permanent solution
bzz and pss now started from swarm.go,
Outputs from bzz/pss Protocols() and APIs()
are appended to the Swarm methods
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
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
This change imports the Swarm protocol codebase. Compared to the 'swarm'
branch, a few mostly cosmetic changes had to be made:
* The various redundant log message prefixes are gone.
* All files now have LGPLv3 license headers.
* Minor code changes were needed to please go vet and make the tests
pass on Windows.
* Further changes were required to adapt to the go-ethereum develop
branch and its new Go APIs.
Some code has not (yet) been brought over:
* swarm/cmd/bzzhash: will reappear as cmd/bzzhash later
* swarm/cmd/bzzup.sh: will be reimplemented in cmd/bzzup
* swarm/cmd/makegenesis: will reappear somehow
* swarm/examples/album: will move to a separate repository
* swarm/examples/filemanager: ditto
* swarm/examples/files: will not be merged
* swarm/test/*: will not be merged
* swarm/services/swear: will reappear as contracts/swear when needed