Commit Graph

843 Commits

Author SHA1 Message Date
Preston Van Loon 54f20b5a2a Define a public error ErrSubscriptionCancelled. 2020-07-14 08:07:25 +03:00
vyzo 8945f91465 only do PX on leave if PX was enabled in the node 2020-06-15 10:30:58 +03:00
Jeromy e18b4edd9a drop warning about failure to open stream to a debug log 2020-06-12 23:47:16 +03:00
vyzo 9a5528b3ec reinstate tagging (now protection) tests 2020-06-03 23:30:48 +03:00
vyzo 44d9cb8639 gomod: update (indirect) go-eventbus for go-libp2p-core v0.5.7 2020-06-03 23:30:48 +03:00
vyzo e700e9a446 gomod: update go-libp2p-core and go-libp2p-connmgr 2020-06-03 23:30:48 +03:00
vyzo f465fc0e41 disable tests for direct/mesh tags, we don't have an interface to query the connman yet
I hate disabling tests, so this should be very temporary.
2020-06-03 23:30:48 +03:00
vyzo df04b05234 protect direct and mesh peers in the connection manager 2020-06-03 23:30:48 +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
vyzo 9a1171a0ef fix outbound constraint satisfaction in oversubscription pruning 2020-05-26 20:41:53 +03:00
Yusef Napora bac68a1ba3 add doc comment for GossipSubDout 2020-05-20 18:48:28 +03:00
Yusef Napora dc6eaa7a5d fix typo 2020-05-20 18:48:28 +03:00
Yusef Napora c041642546 add note about opp. graft threshold 2020-05-20 18:48:28 +03:00
Yusef Napora 22403baadd stop using term "gossip mesh" 2020-05-20 18:48:28 +03:00
Yusef Napora 3dab80fdd5 add doc comments to gossipsub constants 2020-05-20 18:48:28 +03:00
Yusef Napora 906c941b29 sleep longer for travis 2020-05-19 19:26:53 +03:00
Yusef Napora ef50cbbdd7 sleep in test after bumping fake clock 2020-05-19 19:26:53 +03:00
Yusef Napora 60046386b6 update deps, go mod tidy 2020-05-19 19:26:53 +03:00
Yusef Napora 554655c59c revert travis timeout change 2020-05-19 19:26:53 +03:00
Yusef Napora d4b7c255c6 rm empty slice alloc 2020-05-19 19:26:53 +03:00
Yusef Napora d57a6c23da better range check for expected value in test 2020-05-19 19:26:53 +03:00
Yusef Napora 767692b3f6 loosen test expectations to appease travis 2020-05-19 19:26:53 +03:00
Yusef Napora cddb5c83a4 this is getting a bit silly 2020-05-19 19:26:53 +03:00
Yusef Napora f0bb2c8ae5 play with test timing on travis 2020-05-19 19:26:53 +03:00
Yusef Napora 8bb5ed7e20 add delay in TestTagTracerDeliveryTags 2020-05-19 19:26:53 +03:00
Yusef Napora a3c7ae761f even fewer peers in connmgr test 2020-05-19 19:26:53 +03:00
Yusef Napora 2f4028acb2 use fewer peers in connmgr test 2020-05-19 19:26:53 +03:00
Yusef Napora 2f9a678f2e inline decayingDeliveryTag method into addDeliveryTag 2020-05-19 19:26:53 +03:00
Yusef Napora b20819d046 close decaying tags when leaving topic 2020-05-19 19:26:53 +03:00
Yusef Napora cd4f0a74a3 increase test timeout on travis 2020-05-19 19:26:53 +03:00
Yusef Napora a70cfa5e07 rm misleading comment 2020-05-19 19:26:53 +03:00
Yusef Napora 6a259a02fd sort imports 2020-05-19 19:26:53 +03:00
Yusef Napora b109c4ceee check reject reason before deleting near-first state 2020-05-19 19:26:53 +03:00
Yusef Napora 2e9c9f0b0a update dependencies and use preset decay fns 2020-05-19 19:26:53 +03:00
Yusef Napora 64e1b8b0d4 use map to track near-first deliveries in tagTracer 2020-05-19 19:26:53 +03:00
Yusef Napora cc0ba20627 free up drec.peers when we're done with it 2020-05-19 19:26:53 +03:00
Yusef Napora 9c730661bc add delivery tags for "near-first" msg deliveries 2020-05-19 19:26:53 +03:00
Yusef Napora 5be7bc254c bump blankhost to 0.1.6 2020-05-19 19:26:53 +03:00
Yusef Napora 8e4a9489c2 lock for reading in bumpDeliveryTag 2020-05-19 19:26:53 +03:00
Yusef Napora 2312cddaff add nil check for decayer 2020-05-19 19:26:53 +03:00
Yusef Napora 51369f756f increase decaying tag interval 2020-05-19 19:26:53 +03:00
Yusef Napora f87e7b72d7 test delivery tags vs sybil storm 2020-05-19 19:26:53 +03:00
Yusef Napora 699149a3c4 bump connmgr dep to latest PR commit 2020-05-19 19:26:53 +03:00
Yusef Napora f37c6b801c unit tests for tagTracer 2020-05-19 19:26:53 +03:00
Yusef Napora 28d17a4cab add tagTracer to apply connmgr tags 2020-05-19 19:26:53 +03:00
Yusef Napora 448287732d temporarily depend on PR commits 2020-05-19 19:26:53 +03:00
Yusef Napora 53c2eeaccf track discovery API change 2020-05-19 19:26:53 +03:00
dependabot-preview[bot] b2075efc96 Bump github.com/libp2p/go-libp2p-blankhost from 0.1.4 to 0.1.6
Bumps [github.com/libp2p/go-libp2p-blankhost](https://github.com/libp2p/go-libp2p-blankhost) from 0.1.4 to 0.1.6.
- [Release notes](https://github.com/libp2p/go-libp2p-blankhost/releases)
- [Commits](https://github.com/libp2p/go-libp2p-blankhost/compare/v0.1.4...v0.1.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 17:50:24 +03:00
dependabot-preview[bot] 1c99ae97a8 Bump github.com/libp2p/go-libp2p-core from 0.5.3 to 0.5.6
Bumps [github.com/libp2p/go-libp2p-core](https://github.com/libp2p/go-libp2p-core) from 0.5.3 to 0.5.6.
- [Release notes](https://github.com/libp2p/go-libp2p-core/releases)
- [Commits](https://github.com/libp2p/go-libp2p-core/compare/v0.5.3...v0.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 17:26:03 +03:00
dependabot-preview[bot] 933aeb40e5 Bump github.com/libp2p/go-libp2p-swarm from 0.2.3 to 0.2.4
Bumps [github.com/libp2p/go-libp2p-swarm](https://github.com/libp2p/go-libp2p-swarm) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/libp2p/go-libp2p-swarm/releases)
- [Commits](https://github.com/libp2p/go-libp2p-swarm/compare/v0.2.3...v0.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 17:00:50 +03:00