Commit Graph

223 Commits

Author SHA1 Message Date
Vit∀ly Vlasov 6e47bd1cf0
feat: filter subscription management and multiplexing (#1048)
Filter wrapper API that takes care of managing subscriptions and multiplex them onto a single data channel to be consumed by user. 

Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
2024-05-15 13:03:59 +05:30
richΛrd 28c2a2704a
feat: storeV3 client (#1028) 2024-05-03 12:07:03 -04:00
frank 46e48044da
fix: watchMultiaddressChanges (#1093) 2024-04-18 19:21:31 +08:00
richΛrd bdf44c0a23
fix(metadata): only verify peer metadata on relay (#1052) 2024-03-14 10:21:47 -04:00
richΛrd d65a836bb6
chore: drop legacy filter support (#1037) 2024-02-20 08:47:37 -04:00
Prem Chaitanya Prathi 4f232c40ca
feat: topic health reporting (#1027)
Co-authored-by: richΛrd <info@richardramos.me>
2024-02-08 15:24:58 +05:30
Prem Chaitanya Prathi faf046e059
chore: bumped libp2p and pubsub to 0.32.2 and 0.10 respectively (#987)
Co-authored-by: Richard Ramos <info@richardramos.me>
2024-01-12 13:40:27 -04:00
richΛrd 82fc800b08
feat: parameterizable number of connections per IP (#994) 2024-01-08 15:05:21 -04:00
Prem Chaitanya Prathi 369a025b7c
fix: use both filter and legacyFilter flags to determine if filter is enabled and set Waku2 ENR field (#996) 2024-01-08 21:26:16 +05:30
Prem Chaitanya Prathi b5068b4357
feat: relay msg size (#963)
Co-authored-by: richΛrd <info@richardramos.me>
2024-01-03 07:06:41 +05:30
Prem Chaitanya Prathi 4ef0c75ded
fix: use node's clusterId when adding peer from admin REST API & don't subscribe to default pubsub topic for non-zero clusterID (#973) 2024-01-02 18:04:43 +05:30
kaichao b4ba7b75d4
chore: stop light filter node by default (#964) 2023-12-21 08:44:51 +08:00
Prem Chaitanya Prathi 5a5ee51f4b
feat: include pubsubTopics supported by peer in getPeers REST API (#943) 2023-12-06 07:17:59 +05:30
Prem Chaitanya Prathi a5ce5dfaa4
feat: update store client Query API for autosharding (#885) 2023-11-14 04:22:46 +05:30
harsh jain 73bcb2e78a
feat: add dns discovery in lib (#884) 2023-11-13 19:17:43 +07:00
Prem Chaitanya Prathi 3226def4cf
feat: On Demand Peer Discovery based on shard and service (#834)
* refactor discovery and common service to separate package to remove package inter-dependencies

* relay on-demand discovery ,use proto to enr field mapping

* chore: no need to dial discovered peers as peermanager already does that

* on demand discovery for service peers during peer selection

* identify supported protocols for discovered peers and add to service slots

* fix: tests to use proper static sharding topics

* fix: random selection with default pubsubTopic

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-11-07 22:43:19 +05:30
harsh jain 0868f5d4dd
feat: add filter v2 rpc (#798)
* feat: add filter v2 rpc

ping, subscribe/unsubscribe and unsubscribeAll.



* test(filterRest): pingFailure, subscribe-ping, unsubscribe and unsubscribeAll
2023-10-27 06:21:50 +07:00
Richard Ramos 19ba25ffcb feat: metadata protocol 2023-10-20 20:30:23 -04:00
Prem Chaitanya Prathi b5be83a02e
feat : autoshard relay api (#807)
* fix: using relay without bcaster should consume and drop messages

* update relay api usage

* move subscription to broadcaster

* move filter logic under subscription

* Support more than 1 relay subscription for a pubSubTopic

* modify relay Publish API to derive pubSubTopic based on autosharding

* implement relay RPC methods for autosharding

* remove relay msgChannel and relay on pubsub buffersize for subscription

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

* handle relay subscribe with noConsumer and address issue reported in code review

* chore: reorg relay code

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-10-21 01:26:18 +05:30
Richard Ramos d4abe15634 fix: addr update 2023-10-17 09:00:30 -04:00
Prem Chaitanya Prathi 6955d01498
Update peer selection options for light protocols (#787)
* Update peer selection options for lightPush

* Update peer selection options for filter

* migrate peer selection functionality from peer manager

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

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-10-16 22:12:01 +05:30
Prem Chaitanya Prathi 47c961dcbb
feat: update lightpush API for autosharding (#774)
* feat: update lightpush API to make pubSubTopic optional as per autosharding

* Extract contentFilter and subscriptions out of filter to reuse in relay (#779)

* chore: extract contentFilter outside filter package

* chore: move subscription outside of filter so that it can be modified and reused for relay

* Feat: filter select peer for sharding (#783)

* update selectPeer to support pubsubTopic based selection
2023-09-29 10:43:25 +05:30
Prem Chaitanya Prathi 388f56b43f
feat: Sharded peer management - Relay (#764)
* feat: connect/disconnect to peers based on node topic sub/unsub

* feat: maintain healty relay connections per pubSubTopic

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

* chore: add config to limit peerstore capacity (#770)
2023-09-27 12:16:37 +05:30
richΛrd 003c90fba8
feat: force unreachability (#753)
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
2023-09-20 12:24:16 +05:30
Prem Chaitanya Prathi 9b05d48318
Feat : handle dynamic peer topic sub unsub (#751)
* feat: handle dynamic peer join and leave a pubSub topic

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


---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-09-19 11:35:29 +05:30
Richard Ramos 2060c8c837 feat: allow running rln with no credentials 2023-09-15 10:18:44 -04:00
Prem Chaitanya Prathi bfc3083fb1
feat: update WakuPeerStore to store pubSubTopics for a peer (#734)
* feat: update peerStore to store pubSubTopics a peer is linked to

* derive pubSubTopics from ENR

* New API to retrieve peers by shard information
2023-09-14 20:30:06 +05:30
Richard Ramos 55bc21c604 feat(rln-relay): isReady 2023-09-14 10:47:27 -04:00
Richard Ramos 7beaa3f029 feat(rln-relay): ensure execution order for pubsub validators 2023-09-14 09:38:28 -04:00
Richard Ramos db3a2d53b3 fix: log enr only after it has been setup 2023-09-08 17:37:23 -04:00
Richard Ramos e8bd38a023 fix: add back to peerstore dns4 addresses removed by go-libp2p identify 2023-09-01 16:53:07 -04:00
Richard Ramos 9c0bebc859 refactor: use a map to store credentials instead of an array 2023-08-31 15:42:45 -04:00
harsh jain 229fb7a970
refactor: peerManager test (#683)
* refactor: peerManager test

* fix: break down and fix peerManager test

* refactor: codeClimate linting for peerManager/ConnectionGater
2023-08-30 21:33:57 +07:00
harsh jain 467d1b2ca5
refactor: peerConnector (#665)
* refactor: peerConnector

* fix: code climate and dont waitOn subscriptions PeerData

* fix: check in peerConnector is on outRelay connections

* fix: introduced bug in peerConnector
2023-08-28 13:47:48 +07:00
Richard Ramos ddb08adbbd chore: set limit to 5000 to not choke eth1 node and start rln before relay 2023-08-24 10:48:22 -04:00
Richard Ramos 624fe1bb2f chore(rln): run rln in all relay pubsubtopics + remove cli flags 2023-08-24 10:48:22 -04:00
Prem Chaitanya Prathi 8a9c4d68e3
feat: register for local node's reachability change (#651)
* feat:Register for reachability change and log status

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

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-08-20 18:06:35 +05:30
Richard Ramos 2818c3d394 refactor: add libp2p metrics, and make each protocol responsable for defining its own metrics 2023-08-18 13:56:43 -04:00
richΛrd 387ee5f9ac
feat: merkle tree persistence
- use atomic operations API
- resume onchain sync from persisted tree db
- close eth client and db connection appropriately
- pass in the path to the tree db
- fix nwaku compatibility issues
2023-08-18 09:59:37 -04:00
Prem Chaitanya Prathi f263be4a74
fix: race condition in peermgt initialization reported by race detector (#646) 2023-08-16 17:55:58 +05:30
Prem Chaitanya Prathi 06f027b1a9
feat: implement relay connectivity loop (#642)
* feat: implement relay conenctivity loop

* chore: fix codeclimate issues

* Apply suggestions from code review

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

* chore:address review comments

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-08-15 06:57:51 +05:30
Vitaliy Vlasov 419adcb6a8
chore(filter2): test updates 2023-08-14 16:29:00 -04:00
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 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 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 bc6a305759 chore: extract `EncapsulatePeerID` 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 b26859fc6a refactor: make discovery connector subscribe to discovery services 2023-07-07 09:47:46 -04:00