118 Commits

Author SHA1 Message Date
Vitaliy Vlasov
dade1e1d35
Add EvtPeerConnectednessChanged 2021-06-11 14:16:36 +03:00
Richard Ramos
874e7c124d
Rename gossipsub to wakurelaysub 2021-03-24 09:42:37 -04:00
vyzo
8676a0e25b deduplicate inbound streams 2021-01-12 17:18:00 +02:00
Steven Allen
98f8611700
fix: reduce log spam (#394)
This message will be received on reconnect and/or when we receive multiple
connections. It apparently shows up in logs quite frequently.
2020-12-10 10:19:39 -08:00
Adin Schmahmann
aa4f9dac2f fix: treat peers already connected to the host before pubsub is initialized as valid potential pubsub peers 2020-12-07 10:27:35 +02:00
vyzo
89f61abf29 subscription filters 2020-10-08 21:14:14 +03:00
vyzo
d6c20b59fc remove multi-topic message support 2020-10-08 20:18:21 +03:00
vyzo
14d1a35e0c more docs 2020-09-07 13:38:02 +03:00
vyzo
93f4f91dcf trace throttle peers to avoid breaking promises unfairly 2020-09-07 13:38:02 +03:00
vyzo
854ca9a6ad better log messages around gating 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
Diederik Loerakker
99507107b6
Merge pull request #359 from protolambda/optional-sig-origin-seq
Signing policy + optional Signature, From and Seqno
2020-07-23 08:47:47 +03:00
Preston Van Loon
aabbdb1143 Update pubsub.go 2020-07-14 08:07:25 +03:00
Preston Van Loon
54f20b5a2a Define a public error ErrSubscriptionCancelled. 2020-07-14 08:07:25 +03:00
Yusef Napora
dc6eaa7a5d fix typo 2020-05-20 18:48:28 +03:00
Yusef Napora
28d17a4cab add tagTracer to apply connmgr tags 2020-05-19 19:26:53 +03:00
vyzo
5bbe37191a downgrade graylist Warn log to Info 2020-05-05 21:10:14 +03:00
vyzo
ce9a0b7edf use log.Warn instead of Warning 2020-05-05 21:10:14 +03:00
vyzo
1901383099 implement extended validator support 2020-05-04 09:42:20 +03:00
Lukasz Zimnoch
9a0bd7ad56 Prevent multiple invocations of relay cancel function 2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
9a0d2f5948 Move counter incrementing before announce 2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
10f5464279 Merge stop announcing conditions 2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
3336559a27 Relay incoming messages
Added a possibility to
relay incoming messages if
there are existing relays
2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
0d884f3e90 Topic relay discovery
Incorporated relays to
exiting discovery logic
and added them to topic
before-remove guard.
2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
af44f7a07d Topic relay cancelling
Implemented relay reference
cancel logic.
2020-05-01 12:22:22 +03:00
Lukasz Zimnoch
750cc66336 Topic relay support
Implemented Relay method which
allows to enable message relaying
for the given topic.
2020-05-01 12:22:22 +03:00
vyzo
4f45d455f8 fix broken WithMessageAuthor option 2020-04-23 18:38:26 +03:00
vyzo
97519bf76c better handling of message originating from self but forwarded by another peer 2020-04-18 11:09:06 +03:00
vyzo
ce3da3facd move self-publish check to pubsub 2020-04-18 11:09:06 +03:00
vyzo
1c4f0920fe use named constants for tracing message rejection reasons 2020-04-18 11:09:06 +03:00
vyzo
06d72b93da fix bug in WithEventTracer
wrong nil check.
2020-04-18 11:09:06 +03:00
vyzo
2ddc4b999f allow gossipsub to graylist peers based on score 2020-04-18 11:09:06 +03:00
vyzo
87bbe69a8b router.Publish doesn't need the source, it takes the whole message now 2020-04-18 11:09:06 +03:00
vyzo
69e4102a6d correctly implement flood publishing
Only applies to messages that have been published by our own peer!
2020-04-18 11:09:06 +03:00
vyzo
7d928697a2 peer score scaffolding 2020-04-18 11:09:06 +03:00
Raúl Kripalani
1f147c2457
make wire protocol message size configurable. (#261) 2020-02-25 18:07:16 -08:00
Piotr Dyraga
ae00326b96
go fmt on pubsub.go 2020-01-27 13:44:03 +01:00
Preston Van Loon
8ced088fee rename VaidatorData to ValidatorData 2019-12-19 15:15:45 -08:00
protolambda
6bd07a71fc
PR feedback: name change and account for different options order 2019-12-16 12:46:30 +01:00
protolambda
7981f9bfbd
fixes #247: implement msg id function as pubsub option 2019-12-16 03:54:40 +01:00
vyzo
fb11aa9857 initialize tracer with peer ID, trace RPC from join/leave announcements 2019-11-15 20:42:04 +02:00
vyzo
89c7ed46e3 trace publish 2019-11-15 20:42:04 +02:00
vyzo
67275a6382 tracing scaffolding 2019-11-15 20:42:04 +02:00
vyzo
28a87b3121
Merge pull request #231 from libp2p/feat/validator-data
add ValidatorData field to Message
2019-11-15 20:37:20 +02:00
vyzo
8b423348a0 add ValidatorData field to Message
Useful for passing data from the validation to the application.
2019-11-15 20:16:58 +02:00
Aarsh Shah
0dd2171ac5 queue size must always be positive 2019-11-16 01:39:12 +08:00
Aarsh Shah
d380477228 Configurable outbound peer queue sizes 2019-11-16 01:14:10 +08:00
Adin Schmahmann
686c928d4e pubsub and topic methods now return error if the pubsub context has been cancelled instead of hanging 2019-11-04 03:52:39 -05: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