Commit Graph

735 Commits

Author SHA1 Message Date
Prem Chaitanya Prathi 9f45d271ac
feat: support serviceslots in peermanager (#631)
* feat: support peermanager serviceslots and update store protocol to use serviceslots

* fix: lint errors in test code

* fix: error in nix build due to vendor sha change

* fix: set host in peermanager even if relay is disabled

* chore: fix codeclimate issues

* chore: using common filterPeer function to avoid duplication

* feat:use service slots in other service protocols

* chore: fix codeclimate issues

* chore: move AddPeer to peermanager

* Apply suggestions from code review

Co-authored-by: richΛrd <info@richardramos.me>

* chore:address review comments

* feat: implement RemovePeer #638

* chore: fix test failure

* Support for multiple slots for service peers
Adding discovered peers also moved to peer manager

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-08-10 18:28:22 +05:30
Prem Chaitanya Prathi 299801d4ad
Merge pull request #627 from waku-org/fix/data-races
Run unit tests with -race flag and fix identified data races
2023-08-09 10:55:56 +05:30
Prem Chaitanya Prathi 95fc8ff77b
chore:address review comments 2023-08-09 10:21:20 +05:30
Prem Chaitanya Prathi 65f26978f9
chore: address review comments 2023-08-08 10:16:54 +05:30
Prem Chaitanya Prathi b1a4d739ce
Merge branch 'master' into fix/data-races 2023-08-08 09:57:22 +05:30
Richard Ramos df78d21dfd chore: remove v1 code and legacy filter from chat2
Also removes the private API from RPC. C-Bindings are not affected, but future revisions might remove the asymmetric/symmetric functions for lightpush and relay and replace them instead by separate encoding functions
2023-08-07 15:09:32 -04:00
Prem Chaitanya Prathi 7c632e40c0
chore: add new jenkins job file to run tests with race flag 2023-08-07 21:21:12 +05:30
Prem Chaitanya Prathi 6429af9ca7
chore: disable -race by default and create a new make target 2023-08-07 21:20:36 +05:30
Prem Chaitanya Prathi af7471d158
fix:during unsubscribeAll, remove peer without any checks 2023-08-07 15:01:44 +05:30
Prem Chaitanya Prathi baeaa1dd55
fix: data race in peer connector 2023-08-07 14:42:48 +05:30
Prem Chaitanya Prathi 20040f2e9b
fix: data race in filter unsubscribe 2023-08-05 08:03:19 +05:30
Prem Chaitanya Prathi 22398b2868
fix:race in filter peer subscription map iteration and deletion 2023-08-05 08:00:04 +05:30
Prem Chaitanya Prathi 045fcf02d9
Create pull_request_template.md (#625)
Template for a pull request which helps reviewers
2023-08-05 05:47:57 +05:30
Prem Chaitanya Prathi 87a7501166
chore:dependency fixes 2023-08-04 17:24:27 +05:30
Prem Chaitanya Prathi 884f65ecdf
fix: noise protocol channel close race condition 2023-08-04 17:19:53 +05:30
Prem Chaitanya Prathi 42b2c0bc6d
fix: race condition in rendezvous test code 2023-08-04 16:37:45 +05:30
Prem Chaitanya Prathi 34de2941c7
Feat/peer manager (#596)
* chore: refactor existing code into peer maanger package

* feat: move peer connection related code into peer manager

* feat: in relay peer connection pruning

* feat: add max-connections CLI flag and limit outRelayPeers based on max-connections #621

* tested both in and out relay connection limits

Co-authored-by: richΛrd <info@richardramos.me>

* Review comment, use context to pause connectivity loop during node shutdown.

Co-authored-by: richΛrd <info@richardramos.me>

* address review comments


---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-08-03 21:51:15 +05:30
Richard Ramos 33344c2ae0 refactor: use uint instead of int for RLN indexes 2023-08-03 11:17:50 -04:00
Richard Ramos a4b038730c feat(rln-relay): pass in index to keystore credentials 2023-08-03 11:17:50 -04:00
Prem Chaitanya Prathi 2b494a384e
Update milestone.md
Name change for issue template,hence committing to master directly.
2023-08-03 18:31:11 +05:30
Prem Chaitanya Prathi e970c033cb
Rename milestone-issue-template.md to milestone.md
Just a name change, hence committing to master directly.
2023-08-03 18:30:18 +05:30
Prem Chaitanya Prathi 1b1450e04f
Created issue templates (#622)
* Created issue templates

Added bug, feature, improvement and milestone issues templates.
2023-08-03 18:28:41 +05:30
Prem Chaitanya Prathi e6aaf9c852
chore: fix comment on test 2023-08-02 11:24:50 +05:30
Richard Ramos 55ec2347a8 fix: RLN
- subscription to topic is not required for registering RLN validator
- check for duplication msg within same epoch was incorrect
- added an example on how to use RLN
2023-08-01 09:19:38 -04:00
Richard Ramos 8b3f42310d fix: code review 2023-08-01 09:17:11 -04:00
Richard Ramos 76961f2bd8 fix: code review 2023-08-01 09:17:11 -04:00
Richard Ramos 1abd476d3e refactor: use backoff strategy to connect to random rendezvous points 2023-08-01 09:17:11 -04:00
Richard Ramos 88d52d6417 fix: set concurrent dials to 5 2023-07-31 12:01:05 -04:00
Richard Ramos dc08c44804 feat: add filters for discv5 2023-07-31 10:45:45 -04:00
Richard Ramos ad9236fd6b refactor: move RPC and REST servers to waku cmd 2023-07-28 08:03:00 -04:00
Richard Ramos a422add209 chore: add missing comments to functions 2023-07-23 07:01:42 -04:00
Richard Ramos 13a23a9c42
fix: add back WithWakuStore() option 2023-07-15 12:09:00 -04:00
Richard Ramos bc6a305759 chore: extract `EncapsulatePeerID` 2023-07-07 12:04:05 -04:00
Richard Ramos cfe28d4698 fix: add artificial delay to discv5 iterator 2023-07-07 12:04:05 -04:00
Richard Ramos a124c48b4e fix: add peerID to multiaddr 2023-07-07 12:04:05 -04:00
Richard Ramos 55a7d7b332 fix: reduce timeout and increase minimum backoff time 2023-07-07 12:04:05 -04:00
Richard Ramos 6d9018cb11 refactor: connect to discovered peers linearly 2023-07-07 12:04:05 -04:00
Richard Ramos dbd94ebb81 fix: add p2p-circuit component to multiaddresses that use circuit-relay 2023-07-07 12:04:05 -04:00
Richard Ramos 7781e850d5 feat(c-bindings): websockets support 2023-07-07 11:06:43 -04:00
Richard Ramos 8cac406a4c fix: warning message format when using static shards and named shards at same time 2023-07-07 10:35:12 -04:00
Richard Ramos ca297713fa refactor: move app code to cmd/waku 2023-07-07 10:10:21 -04:00
Richard Ramos b26859fc6a refactor: make discovery connector subscribe to discovery services 2023-07-07 09:47:46 -04:00
Richard Ramos 5ca26ef897 fix: allow wakunodes to be restarted without error 2023-07-07 09:47:46 -04:00
Prem Chaitanya Prathi 97f02361d4
Persistence: Addressing code-climate issues to increase maintainability score (#592)
* chore:fix minor issues reported by code-climate

* chore: reduce code duplication

* chore: update vendorSHA for nix build due to recent updates to dependencies
2023-07-07 07:08:23 +05:30
Richard Ramos 6ece3c483b feat: subscribe to shards with --topic and refactors
- Shards in same cluster are advertised on ENR
- Store().Resume() was moved to app layer
- NoDefaultWakuTopic() was removed since it's the app that must determine whether it subscribes to the default waku topic
- Removed `Publish` from WakuNode (not really used and easy to implement in app layer if needed)
2023-07-06 11:18:29 -04:00
Richard Ramos 7dd02067f8 fix: unsubscribe from all peers unless specified and check err code when full node has no subscription 2023-07-05 15:54:31 -04:00
Richard Ramos 0822fdb280 chore: use pgx instead of lib/pq since it's not actively maintained 2023-07-03 11:16:05 -04:00
Ste Jones 49baff14cd doc: fix node.New examples 2023-07-03 10:48:34 -04:00
Richard Ramos 47cdb86aaf chore: bump go-libp2p 2023-06-30 08:55:46 -04:00
Richard Ramos fb3447f3d8
fix: adding relay protocol to feature check function of gossipsub 2023-06-29 09:29:08 -04:00