1017 Commits

Author SHA1 Message Date
Sukun
b5ee222289
chore: update go-libp2p to v0.32 (#548) 2023-11-01 14:32:36 +01:00
Sukun
d13e24ddc9
remove usage of deprecated peerid.Pretty method (#542) 2023-09-14 11:11:11 +03:00
vyzo
825d5e3c7d
Revert "fix: topicscore params can't be set for dynamically subscribed topic (#540)" (#541)
This reverts commit aa5fd79a75f7480be94380bc3e617767e71573e6.
2023-08-26 18:26:28 +03:00
Prem Chaitanya Prathi
aa5fd79a75
fix: topicscore params can't be set for dynamically subscribed topic (#540)
* fix: topicscore params can't be set for a topic subscribed after gossipsub is initialized

* chore:address review comments
2023-08-19 12:21:43 +03:00
dependabot[bot]
cef801641c
bump golang.org/x/net from 0.4.0 to 0.7.0 (#520)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 12:01:28 +03:00
GitHub
6d73cd4b56 chore: Update .github/workflows/stale.yml [skip ci] 2023-06-28 08:53:43 +00:00
GitHub
7f9a7e5319 chore: Update .github/workflows/stale.yml [skip ci] 2023-06-14 09:04:40 +00:00
Nishant Das
340387ef3f
Fix Memory Leak In New Timecache Implementations (#528)
* fix bug

* add for last seen cache
2023-03-15 13:52:01 +02:00
vyzo
829f9026a3
Default validator support (#525)
* add default validator support

* add an implementation for basic seqno as nonce validation

* missing return

* the nonce belongs to the origin peer

* add note about rust predicament

* add seqno validator tests

* minor test tweak, ensure at least 1ms before replay
2023-03-01 16:15:54 +02:00
vyzo
56c0e6c5c9
Refactor timecache implementations (#523)
* reimplement timecache for sane and performant behaviour

* remove seenMessagesMx, take advantage of new tc api

* fix timecache tests

* fix typo

* store expiry, don't make life difficult

* refactor common background sweep procedure for both impls

* add godocs to TimeCache
2023-02-21 21:13:13 +02:00
Hlib Kanunnikov
3dbc2fd5ba
fix(timecache): remove panic in first seen cache on Add (#522) 2023-02-21 13:10:42 +02:00
RichΛrd
cda3df70f4
chore: update go version and dependencies (#516) 2023-02-15 21:48:58 +02:00
Marco Munizaga
a14aca16fa
chore: update to go-libp2p v0.25 (#517)
* Update to go-libp2p v0.25

* Use go 1.19
2023-02-10 17:27:48 +01:00
Mohsin Zaidi
973fef56e1
feat: expire messages from the cache based on last seen time (#513)
* feat: expire messages from the cache based on last seen time

* chore: minor renaming

* fix: messages should not be found after expiration

* chore: editorial

* fix: use new time cache strategy consistently

* fix: default to old time cache and add todo for background gc
2023-01-24 02:02:44 +02:00
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
Viacheslav
972f19967f
chore: ignore signing keys during WithLocalPublication publishing (#497) 2022-11-20 16:30:53 +02:00
Hlib Kanunnikov
76124145d0
improve handling of dead peers (#508) 2022-11-20 13:38:53 +02:00
Hlib Kanunnikov
aed7fc42c1
perf: use pooled buffers for message writes (#507) 2022-11-19 16:59:45 +02:00
Hlib Kanunnikov
9c56b2deca
perf: use msgio pooled buffers for received msgs (#500) 2022-11-19 15:19:10 +02: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
libp2p-mgmt-read-write[bot]
01ab84a809
chore: Update .github/workflows/stale.yml [skip ci] 2022-09-19 13:41:37 +00:00
Yahya Hassanzadeh
8866ca88a1
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
2022-09-08 08:20:23 +03: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
Nishant Das
ca702289e6
update pubsub deps (#491) 2022-06-30 07:30:19 +03: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
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
Iulian Pascalau
0ea9140c95
Publishing option for signing a message with a custom private key (#486)
* - added PublishWithSk functionality on the Topic implementation

* - fixes after merge

* - complete refactor: used publishing options instead of a new function

* - added one more check in unit test

* - bugfix: use local variables instead of fields

* - renamed tests
2022-05-26 12:39:30 +03:00
protolambda
566fdfa6fc fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable 2022-05-24 22:20:42 +03:00
Manic Security
fa4161c634 Update README.md
Corrected from Implementations, to Examples in linked positional.
2022-03-03 21:18:37 +02: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
be065ce051 tests: new test for WithTopicMsgIdFunction 2022-01-23 09:29:32 +02: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
f9b2412210 fix: use RawID in traceRPCMeta to avoid allocations 2022-01-23 09:29:32 +02:00
Wondertan
9fbf906fb5 feat: extract RawID from ID 2022-01-23 09:29:32 +02:00
Wondertan
6faf473cad chore: hello mister mutex hat 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
vyzo
b57bcc8b36 add tests for clearing the peerPromises map 2022-01-13 14:13:37 +02:00
vyzo
9e39259ffe properly clear the peerPromises map 2022-01-13 14:13:37 +02:00
rene
6b31a7bd2a more info 2021-12-22 14:27:06 +02:00
rene
3b1c59c733 add to MinTopicSize godoc re topic size 2021-12-22 14:27:06 +02:00
Gus Eggert
c6dd285c5d
feat: plumb through context changes (#459) 2021-11-11 11:09:45 -05:00