Commit Graph

60 Commits

Author SHA1 Message Date
nisdas f7f33e10cc satisfy race detector 2020-09-10 12:39:04 +03:00
nisdas b0d384d2e8 clean up 2020-09-10 12:39:04 +03:00
nisdas 309d45acef copy string topic 2020-09-10 12:39:04 +03:00
vyzo 73880606b5 add test for topic score parameter reset method 2020-09-09 16:57:36 +03:00
vyzo 769831b478 add regression test for issue 371 2020-08-10 21:00:00 +03:00
Raúl Kripalani ae55bf9603 upgrade deps + interoperable uvarint delimited writer/reader. 2020-07-30 14:00:54 +03:00
Alan Shaw c0712c6e92 feat: add direct connect ticks option
In [drand](https://github.com/drand/drand) we have a gossipsub relay to allow users to subscribe to getting random values over pubsub. We want to support pure gossip relays who relay from a relay. For this we need direct peering agreements and want to mitigate the possibility of "missing" randomness messages by ensuring the direct connect ticks period is less than the period between updates.

This PR simply adds a new functional option allowing us to set the direct connect ticks value without modifying the global variable.
2020-05-27 16:26:41 +03:00
Yusef Napora 906c941b29 sleep longer for travis 2020-05-19 19:26:53 +03:00
Yusef Napora 568fa5a244 close stream in test 2020-05-06 19:01:22 +03:00
Yusef Napora cb02a50cd8 split large IWANT / IHAVE messages, add unit test 2020-05-06 19:01:22 +03:00
Yusef Napora 4427c3def7 fix prune message in test 2020-05-06 19:01:22 +03:00
Yusef Napora cb65238a39 fix race condition in rpc fragmentation test 2020-05-06 19:01:22 +03:00
Yusef Napora 8642662340 rewrite test for rpc fragmentation 2020-05-06 19:01:22 +03:00
Yusef Napora 27f009a9c7 fragment large RPCs in sendRPC 2020-05-06 19:01:22 +03:00
vyzo deee35d9b8 fix apparent flakiness in test 2020-05-04 09:42:20 +03:00
vyzo 213da1cf8c add test exercising score integration with extended validation 2020-05-04 09:42:20 +03:00
vyzo 8b7e7a1103 fix typo 2020-04-27 18:35:25 +03:00
vyzo 5c1b637dce add test for peer score inspection 2020-04-27 18:35:25 +03:00
vyzo 01041fa327 improve reliability of star topology tests
Configure the star with 0 D, to act as a proper bootstrapper
2020-04-23 13:40:50 +03:00
vyzo caffc3bf2c make star topology tests more reliable
probabilities are such that they occasionally fail
2020-04-23 13:40:50 +03:00
vyzo 1a3695988b import grouping 2020-04-23 13:40:50 +03:00
vyzo 94db23fd41 add signed peer records only in the center of the star for signed peer record test 2020-04-23 13:40:50 +03:00
Yusef Napora 516a32c7ad add test with signed peer records 2020-04-23 13:40:50 +03:00
vyzo 11ef2a9cf2 fix the global variable mutation races 2020-04-22 21:08:13 +03:00
vyzo a50deb04c0 a little bit more time to avoid races with restoring mutated config variables 2020-04-22 21:08:13 +03:00
vyzo 6a230e711e add a heartbeat's worth of delay before restoring mutated globals
the race detector cries on travis
2020-04-22 21:08:13 +03:00
vyzo 6d24f46a13 reduce prune backoff times for opportunistic grafting test 2020-04-22 21:08:13 +03:00
vyzo bac5d5910c add test for opportunistic grafting 2020-04-22 21:08:13 +03:00
vyzo 2eaa566371 add direct test for gossipsub router's piggybackControl 2020-04-22 21:08:13 +03:00
vyzo a67441be61 rename tests for consistency 2020-04-22 21:08:13 +03:00
vyzo f7c398087a add test for negative scores below the gossip threshold 2020-04-22 21:08:13 +03:00
vyzo eccded1360 add test for gossipsub enough peers 2020-04-22 21:08:13 +03:00
vyzo 8cffbc4bd6 add test for gossipsub flood publishing 2020-04-22 21:08:13 +03:00
vyzo c00b476fb4 add test for gossipsub direct peers 2020-04-22 21:08:13 +03:00
Dirk McCormick 4e15efdd6f test: GRAFT spam and GRAFT backoff tests 2020-04-20 19:53:12 +03:00
Dirk McCormick a5addee5a0 test: add IWANT spam test 2020-04-20 19:53:12 +03:00
vyzo 3368bed1d4 disable flaky and irrelevant tests 2020-04-18 11:09:06 +03:00
vyzo f6f34cfc99 make PX optional and disabled by default, gate by acceptPXThreshold 2020-04-18 11:09:06 +03:00
vyzo f280c5f705 extend star topology test to assert that no peer is left with a single connection 2020-03-24 15:52:34 +02:00
vyzo 95d3bbfa1b test prune px with a star topology 2020-03-24 15:52:34 +02:00
Adin Schmahmann f9c26c2e68 Added libp2p discovery capabilities to PubSub.
When the WithDiscovery option is passed to PubSub then PubSub will be able to search for more peers that are interested in our topics.

This includes the ability for Publishes (via Topic.Publish()) to block until the router is ready to publish. When a router is ready is currently defined by a combination of a user defined MinTopicSize function (passed into topic.Publish via the WithReadiness publish option) and the properties of the pubsub router used. The discovery tests show example usage.
2019-10-31 16:39:18 -04:00
Raúl Kripalani 49274b0e8a
migrate to consolidated types. (#185) 2019-05-26 17:19:03 +01:00
vyzo 5f50a58aed skip TestGossipsubControlPiggyback, it makes travis unhappy 2019-04-30 10:50:53 +03:00
vyzo 95071e955a pacify the race detector in TestGossipsubFanoutExpiry 2019-04-30 10:49:02 +03:00
Steven Allen bd1a4630b9 move to go-libp2p-pubsub
Updates for move from go-floodsub to go-libp2p-pubsub.

fixes https://github.com/libp2p/go-libp2p-pubsub/issues/4
2018-10-18 21:10:16 +01:00
Kevin Atkinson 0827f5e955 gx publish 0.9.31 2018-10-04 19:23:53 -04:00
Kevin Atkinson 1abb0209ce gx publish 0.9.30 2018-10-04 18:41:48 -04:00
vyzo 1dc8405449 more docs for gossipsub router, expire fanout peers when we haven't published in a while 2018-06-12 08:00:17 -07:00
vyzo c57d256a22 increase the flood length in TestGossipsubControlPiggyback 2018-06-12 08:00:17 -07:00
vyzo a39184a0af smaller net sizes for tests that exercise full queues
so that travis doesn't get killed by OOM.
2018-06-12 08:00:17 -07:00