176 Commits

Author SHA1 Message Date
Marco Munizaga
c0a528ee7b
Replace fragmentRPC with appendOrMergeRPC (#557)
This will allow us to add more logic around when we split/merge
messages. It will also allow us to build the outgoing rpcs as we go
rather than building one giant rpc and then splitting it.
2024-05-02 09:40:54 -07:00
Sukun
d13e24ddc9
remove usage of deprecated peerid.Pretty method (#542) 2023-09-14 11:11:11 +03:00
Yahya Hassanzadeh
1e161006c4
Enables injectable GossipSub router (#503)
* adds with gossipsub tracker

* renames and add godoc
2022-11-02 06:53:50 +02:00
Marten Seemann
4f56e8f0a7
update go-libp2p to v0.22.0 (#498)
* update go-libp2p to v0.22.0

* skip TestGossipsubConnTagMessageDeliveries
2022-08-26 02:45:41 -07:00
Marco Munizaga
68cdae031b
Gossipsub: Unsubscribe backoff (#488)
* Implement Unsusbcribe backoff

* Add test to check that prune backoff time is used

* Update which backoff to use in TestGossibSubJoinTopic test

* Fix race in TestGossipSubLeaveTopic

* Wait for all the backoff checks, and check that we aren't missing too many

* Remove open question
2022-06-03 06:46:56 +03:00
protolambda
566fdfa6fc fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable 2022-05-24 22:20:42 +03:00
nisdas
aeb30a2ac1 Add in Backoff Check 2022-02-08 09:20:54 +02:00
nisdas
e02b3472aa Modify comment 2022-02-07 14:09:18 +02:00
nisdas
3d93f5f991 Add Backoff For Pruned Peers 2022-02-07 14:09:18 +02:00
Wondertan
0e687f24a6 feat: integrate msgIdGenerator 2022-01-23 09:29:32 +02:00
Simon Zhu
628353661b Create peer filter option 2021-09-21 13:50:09 +03:00
vyzo
0c7092d1f5 make slowness a warning, with a user configurable threshold 2021-07-30 23:10:03 +03:00
vyzo
257d133a07 reduce log spam from empty heartbeat messages 2021-07-30 23:10:03 +03:00
Ian Davis
2efd313b83
cleanup: fix vet and staticcheck failures (#435)
* cleanup: fix vet failures and most staticcheck failures

* Fix remaining staticcheck failures

* Give test goroutines chance to exit early when context is canceled
2021-07-22 15:27:32 -07:00
Steven Allen
0094708cc4
Refactor Gossipsub Parameters To Make Them More Configurable (#421)
Co-authored-by: nisdas <nishdas93@gmail.com>
2021-05-03 08:59:15 -07:00
vyzo
0e387d79fb add support for custom gossipsub protocols and feature tests 2021-04-02 21:55:10 +03:00
vyzo
e6eff445d4
Ignore transient connections (#412) 2021-04-01 21:45:09 +01:00
vyzo
5457a2845b expose internalTracer as RawTracer 2021-03-16 08:28:02 +02:00
vyzo
d6c20b59fc remove multi-topic message support 2020-10-08 20:18:21 +03:00
nisdas
309d45acef copy string topic 2020-09-10 12:39:04 +03:00
vyzo
2bc51e0cf2 peer gater scaffolding 2020-09-07 13:38:02 +03:00
vyzo
3b92bdc1e9 rich router acceptance semantics
Allows us to ignore payload messages when the validation queue is under strain
2020-09-07 13:38:02 +03:00
vyzo
06a12f17b7 reduce log verbosity; debug mostly 2020-09-01 20:42:50 +03:00
vyzo
3a81c24073 don't add direct peers to fanout 2020-08-10 21:00:00 +03:00
Raúl Kripalani
a86ae585a6 reference spec change in comment. 2020-08-10 15:18:25 +03:00
vyzo
46536eccc4 fix backoff slack time 2020-08-10 15:18:25 +03:00
vyzo
8c08ebaecb use the heartbeat interval for slack time 2020-08-10 15:18:25 +03:00
vyzo
f2c25c2228 add slack time to prune backoff clearance 2020-08-10 15:18: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
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
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
9c730661bc add delivery tags for "near-first" msg deliveries 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
vyzo
31c9b219f4 use the proto we already have in AddPeer to determine whether the connection houses the stream 2020-05-18 23:20:38 +03:00
vyzo
4207beae0d only count an outbound connection if it has a pubsub stream 2020-05-18 23:20:38 +03:00
vyzo
09e6d9e1e3 cache scores throughout the heartbeat 2020-05-18 23:20:38 +03:00
vyzo
7890c5a458 maintain outboud peer quota 2020-05-18 23:20:38 +03:00
vyzo
d74def1661 precompute outbound peers on AddPeer, add Dout 2020-05-18 23:20:38 +03:00
vyzo
7d320ac87a only allow GRAFT from outbound peers when we are at or over Dhi 2020-05-18 23:20:38 +03:00
vyzo
39fc35f7cb check if already in the mesh in handleGraft to support concurrent grafting 2020-05-18 23:20:38 +03:00
vyzo
375b9b51df gossip tracer implementation 2020-05-08 16:45:31 +03:00
vyzo
4394e52a6f gossip tracer preliminaries 2020-05-08 16:45:31 +03:00
vyzo
d3ae6ab3a7 extended internal tracing for multiple objects, not just score 2020-05-08 16:45:31 +03:00
vyzo
5363d59203 better backoff handling
- Specify backoff in PRUNE message
- Obey peer backoff if specified
- Remove BackoffPenalty, handle lack of respect for backoff through P7
2020-05-07 01:45:04 +03:00
Yusef Napora
94015cee77 factor out doSendRPC and doDropRPC methods 2020-05-06 19:01:22 +03:00
Yusef Napora
21a4f8c0c8 only call fragmentRPC if we're over the size limit 2020-05-06 19:01:22 +03:00