Commit Graph

31 Commits

Author SHA1 Message Date
Alex Stokes
c8005c8113 Run isort in repo 2019-08-03 17:50:14 +08:00
mhchia
2e94fcf56c
Remove pylint:disable 2019-08-02 23:26:06 +08:00
NIC619
924e965537
Change argument name of Network.listen and blakc format 2019-08-02 14:45:59 +08:00
NIC619
cd684aad9e
Update peer_id to type peer.ID in pubsub folder 2019-08-02 14:45:23 +08:00
NIC619
b928bdb356
Convert from base58/pubkey/privkey to class method 2019-08-02 14:42:10 +08:00
Alex Stokes
0ae9840928
Run black over repo 2019-07-31 15:00:12 -07:00
NIC619
5e215901c0
Apply PR feedback 2019-07-30 23:41:28 +08:00
NIC619
c4105688d1
Fix after rebase 2019-07-30 17:31:08 +08:00
NIC619
2d4e23cfe2
Fix cyclic import and lint 2019-07-30 16:28:05 +08:00
NIC619
a4a0d79f6d
Improve import layout 2019-07-30 16:27:29 +08:00
NIC619
e7ac09cb94
Fix:
Add Gossipsub attribute `peers_protocol` and do cleanup when peer removed
2019-07-30 16:26:21 +08:00
NIC619
d716e90e17
Fix on type hints 2019-07-30 16:25:33 +08:00
NIC619
b2f496d081
Fix type hints except pb msg in pubsub folder 2019-07-30 16:24:34 +08:00
NIC619
b920955db6
Add type hints to gossipsub.py 2019-07-30 15:39:50 +08:00
mhchia
f02d38c0ee
Reflect PR feedback
* Rename `src` to `msg_forwarder` in pubsub/floodsub/gossipsub
* Rename Variables
* Sort imports
* Clean up
2019-07-29 12:09:35 +08:00
mhchia
74d831d4e2
Reflect PR feedback 2019-07-28 18:06:38 +08:00
mhchia
766d8ba1e1
A little bit clean up 2019-07-27 12:06:36 +08:00
mhchia
c028aef2de
Fix all tests
- Dedup `perform_test_from_obj` and the test cases used in both
`test_floodsub` and `test_gossipsub_backward_compatibility.py`.
Therefore, they are put in the standalone file
`tests/pubsub/floodsub_integration_test_settings.py`. The functions
and testcases are imported from there then.
- IMO still need a refactor on the tests. There are still some duplicate
code.
2019-07-27 11:49:03 +08:00
mhchia
65aedcb25a
Fix several tests 2019-07-26 18:35:25 +08:00
mhchia
dadcf8138e
Fix the tests according to pubsub.Publish
And refactored a bit.
2019-07-25 16:58:00 +08:00
NIC619
99252e49f8
Prevent re-adding peers to mesh 2019-07-23 23:00:43 +08:00
NIC619
e52bfe3a51
Fix:
Respond GRAFT with PRUNE if not subscribed to the topic
2019-07-23 22:52:24 +08:00
NIC619
afc853a776
Apply PR feedback 2019-07-22 23:22:07 +08:00
NIC619
67f9edb77d
Remove fanout topic after joining the topic 2019-07-22 19:28:07 +08:00
NIC619
4ab99485a6
Fix lint error 2019-07-21 23:32:54 +08:00
NIC619
41141c028b
FIx:
check topic exist in `pubsub.peer_topics`
2019-07-21 23:16:41 +08:00
NIC619
fd1f318b0c
Fix:
in mesh heartbeat, select from gossipsub peers subscribed to the topic
2019-07-21 23:14:08 +08:00
NIC619
404dc67e83
Fix:
prevent selecting peers from topic not in peer topics
2019-07-21 23:14:08 +08:00
NIC619
b5c3420c16
Refactor gossipsub.join 2019-07-21 23:14:08 +08:00
NIC619
36575e8c9b
Add check to prevent gossipsub re-join and re-leave 2019-07-19 19:59:48 +08:00
Robert Zajac
9052e8f8bd
The Gossipsub PR (#162)
* Add handle_rpc call to pubsub

* Scaffold gossipsub functions

* Add timer

* Implement most of mesh construction

* Implement emit and handle

* Implement fanout heartbeat

* Refactor emit

* some gossipsub cleanup and test

* minor lint stuff, more to come

* Implement publish

* Fix comment

* Modify pubsub/gossipsub so that floodsub tests pass using gossipsub router

* Add floodsub tests to gossipsub

* Handle case where select_from_minus, num_to_select > size(pool-minus)

* Add topic membership

* Implement handle ihave

* Implement most of iwant

* Add mcache.add and comments

* Refactor handle_ihave

* Implement stream write in handle_iwant

* Implement gossip heartbeat

* unresolved vars

* initial mcache code

* documenting mcache

* writing test/debugging mcache

* finished mcache test and debugged

* Make gossipsub backward compatibility its own file

* remove mcache prints

* DEBUGGING

* Add sender_peer_id to handle_rpc to get gossip test passing

* Modify gossipsub to make fanout work

* fanout maintenance test

* debugging gsub GOSSIP

* DEBUGGING

* debugged sender seen cachce

* adding lru, removing prints

* pylint cleanup

* Fix github comments in PR

* minor floodsub possible bugfix
2019-05-06 23:44:13 -04:00