150 Commits

Author SHA1 Message Date
Louis Thibault
3d2eab3572
Add docstring for WithAppSpecificRPCInspector (#510) 2022-12-01 19:56:37 +02:00
Yahya Hassanzadeh
d3f151c224
Adds Application Specific RPC Inspector (#509)
* Update go.mod

* Refactor GossipSub Construction  (#1)

* Enables non-atomic validation for peer scoring parameters (#499)

* decouples topic scoring parameters

* adds skiping atomic validation for topic parameters

* cleans up

* adds skip atomic validation to peer score threshold

* adds skip atomic validation for peer parameters

* adds test for non-atomic validation

* adds tests for peer score

* adds tests for peer score thresholds

* refactors tests

* chore: Update .github/workflows/stale.yml [skip ci]

* adds with gossipsub tracker

Co-authored-by: libp2p-mgmt-read-write[bot] <104492852+libp2p-mgmt-read-write[bot]@users.noreply.github.com>

* decouples options

* fixes conflict

* reverts back module

* fixes peer score helper

* Adds send control message to gossipsub router (#2)

* adjusts libp2p version (#3)

* Update go.mod (#4)

* adds app specific rpc handler

* Create ci.yml (#5)

* Create Makefile (#7)

* Revert "Merge branch 'yahya/gossipsub-router-interface'" (#6)

This reverts commit 1c91995b7fbce0e4b9c5990c5bfda0d555267182.

* Update ci.yml (#9)

* Revert "Merge branch 'master' into yahya/adds-rpc-inspector"

This reverts commit 352d7471c58580480b7f6592001bc3e9b910fa77.

* Revert "Merge remote-tracking branch 'origin/yahya/adds-rpc-inspector' into yahya/adds-rpc-inspector"

This reverts commit 586c5cb6eb2a971a1590ea32050de139316984d2.

* Revert "Merge branch 'master' into yahya/adds-rpc-inspector"

This reverts commit 2e13ee8b95dded5a3401dd86f952fae3419bd86b.

* moves app specific inspector to pubsub

* removes option from gossipsub

* moves app specific rpc inspector up

* refactors app specific to return an error

Co-authored-by: libp2p-mgmt-read-write[bot] <104492852+libp2p-mgmt-read-write[bot]@users.noreply.github.com>
2022-12-01 08:10:07 +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
vyzo
60cf380032
fix handling of dead peers (#492)
* fix handling of dead peers

* remove unnecessary continue
2022-07-01 19:37:38 +03:00
Hlib Kanunnikov
96efa27a1a
feat: WithLocalPublication option to enable local only publishing on a topic (#481)
* feat: WithLocalPublication option to enable local only publishing on a topic

* docs: improve comment on WithLocalPublication option
2022-07-01 18:49:12 +03:00
Yahya Hassanzadeh
06b5ba4763
Adds exponential backoff to re-spawing new streams for supposedly dead peers (#483)
* updates gitignore

* implements draft solution

* consolidates update and get

* extends test

* adds cleaner logic

* removes a redundant else case

* refactors cleanup in a goroutine

* adds a jitter to backoff

* stretches the sleep for cleanup

* reduces jitter time

* fixes a test

* adds maximum backoff attempts

* returns error for closing channel

* refactors peer status exceed backoff threshold

* converts if-else to switch

* nit

* consolidates update and maximum backoff check

* bug fix

* nit

* refactors cleanup with a ticker object
2022-05-30 19:47:08 +03:00
protolambda
566fdfa6fc fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable 2022-05-24 22:20:42 +03:00
Wondertan
fed393e39d chore: better name 2022-01-23 09:29:32 +02:00
Wondertan
fcbbfd8131 feat: detach WithMsgIdFunction 2022-01-23 09:29:32 +02:00
Wondertan
ec5e9b42a9 chore: go fmt and return timecache named import 2022-01-23 09:29:32 +02:00
Wondertan
6035642336 feat: new WithMsgIdFunction topic option to enable topics to have own msg id generation rules 2022-01-23 09:29:32 +02:00
Wondertan
0e687f24a6 feat: integrate msgIdGenerator 2022-01-23 09:29:32 +02:00
Wondertan
957fc4f80c feat: introduce msgIdGenerator and add ID field to Message wrapper 2022-01-23 09:29:32 +02:00
Simon Zhu
7ef0669764
remove peer filter check from subscriptions (#453) 2021-09-22 10:46:09 +03:00
Simon Zhu
628353661b Create peer filter option 2021-09-21 13:50:09 +03:00
Richard Ramos
37d36d77b1 fix: code review 2021-07-30 16:57:34 +03:00
Richard Ramos
faffd2a0bd add support for custom protocol matching function 2021-07-30 16:57:34 +03:00
Ian Davis
37ebe34352 Revert noisy newline changes 2021-07-19 15:48:58 +03:00
Ian Davis
079d8973a6 fix: avoid panic when peer is blacklisted after connection 2021-07-19 15:48:58 +03:00
vyzo
3b98004eed release priority locks early when handling batches 2021-07-14 00:43:52 +03:00
vyzo
b289ec5017 batch process dead peer notifications 2021-07-14 00:43:52 +03:00
vyzo
9d86090f42 use a priority lock instead of a semaphore
so that there is no case of infinite accumulation of pending peers in the queue.
also adds a connectedness check before adding the peer.
2021-07-14 00:43:52 +03:00
vyzo
ac4a401fd6 use a semaphore for new peer notifications so that we don't block the event loop 2021-07-14 00:43:52 +03:00
vyzo
1f8e231861 don't accumulate pending goroutines from new connections 2021-07-14 00:43:52 +03:00
Michael Muré
65f48fb2c8 rename RawTracer's DroppedInSubscribe into UndeliverableMessage 2021-07-13 08:58:00 -07:00
Michael Muré
9be1c593c6 add a new RawTracer event to track messages dropped in Subscribe 2021-07-13 08:58:00 -07:00
Michael Muré
3c7689d482 add an option to configure the Subscription output queue length 2021-07-13 08:58:00 -07:00
Michael Muré
c02d4c7179 fix some comments 2021-07-13 08:58:00 -07:00
Steven Allen
6195a09441
fix: remove deprecated and never used topic descriptors (#423)
fixes #264
2021-05-11 12:55:14 -07:00
vyzo
7a3d0ca396 demote log spam to debug 2021-04-01 19:31:07 +03:00
vyzo
84302e9633 rename checkSignature to checkSigningPolicy 2021-03-31 17:53:46 +03:00
vyzo
005ac1598c implement synchronous validation for locally published messages
So that locally published messages are never dropped because of full
validation queues.
2021-03-31 17:53:46 +03:00
vyzo
5457a2845b expose internalTracer as RawTracer 2021-03-16 08:28:02 +02:00
vyzo
05c505ef60 export rejection named string constants 2021-03-16 08:28:02 +02: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