Commit Graph

69 Commits

Author SHA1 Message Date
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
Prem Chaitanya Prathi 9315de8d8a
feat: discv5 filter out nodes that have empty waku capabilities (#865) 2023-11-07 17:59:02 +05:30
richΛrd e0c6ab8ee1
feat: dont' filter out bootnodes (#860) 2023-11-03 09:23:47 -04:00
richΛrd 36beb9de75
refactor: fix nomenclature for shards (#849) 2023-10-31 06:50:13 -04:00
richΛrd 48acff4a5c
feat: add warning about bootnodes not supporting shards (#848) 2023-10-30 19:20:13 -04:00
Richard Ramos 19ba25ffcb feat: metadata protocol 2023-10-20 20:30:23 -04:00
harsh jain a5f9ee5ad8
feat(CommonService): add channel and use commonService in discv5 (#735)
* feat(CommonService): add channel and use commonService in discv5

* fix: add mutex to PushToChan

* fix: remove generic functionality
2023-09-18 16:41:40 +07:00
Richard Ramos dcc87cf24f chore(lint): adds `make lint-full` target and fixes some linting errors 2023-09-12 09:54:34 -04:00
Richard Ramos 84fa332e1c fix: allow mixing named and static shards 2023-09-04 10:10:49 -04:00
richΛrd 09eb8ed19b
fix(discv5): threadsafe peerCh (#687) 2023-08-28 11:15:26 +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
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 dc08c44804 feat: add filters for discv5 2023-07-31 10:45:45 -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 b26859fc6a refactor: make discovery connector subscribe to discovery services 2023-07-07 09:47:46 -04:00
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 cd335f8168 fix: handle scenarios where localnode has no shard set 2023-06-26 11:03:16 -04:00
Richard Ramos eba4aa43e5 feat: find discv5 peers with shards 2023-06-26 11:03:16 -04:00
Richard Ramos be766a8636 feat(discv5): find peers with predicate 2023-06-15 08:54:40 -04:00
Richard Ramos 76186e5477 refactor: store ENR 2023-06-09 14:57:43 -04:00
Richard Ramos 52ac8e3740 refactor: various
- Limit inbound connections to 10 per IP
- Expose gossipsub parameters on WakuRelay
- New peerstore
2023-06-09 14:57:43 -04:00
Richard Ramos fa61e58d3b fix: do not block ctx.Done() on peer discovery 2023-05-10 08:09:44 -04:00
Richard Ramos ac75160817
fix: use 5s timeout in discv5 iterator 2023-05-08 12:29:18 -04:00
harsh-98 02fdf916d8 refactor: sync.atomic has Boolean type 2023-05-08 08:27:44 -04:00
harsh-98 e391fe6a2f refactor(discv5): lock-free via atomics 2023-05-08 08:27:44 -04:00
harsh-98 c890b1fee8 refactor(peerExchange): use lru for storing peers 2023-05-05 11:41:10 -04:00
Richard Ramos 966cbba4c4 feat: utils for handling shards in enr 2023-04-25 10:54:59 -04:00
Richard Ramos 9ed8f16a0a feat: add metrics to archive protocol and discv5 2023-04-20 10:04:20 -04:00
Richard Ramos 2c3566377a refactor: inject host on node start 2023-04-17 11:09:05 -04:00
Richard Ramos abcadd1bcf feat(c-bindings): expose enrs via dns discovery 2023-02-17 11:05:28 -04:00
Richard Ramos eb9e727b1b feat: advertise custom multiaddresses
This replaces the flag `--advertise-address` with `--ext-multiaddr`
2023-02-12 11:01:11 -04:00
Andrea Maria Piana 7508b08c74
fix: check listener not nil (#437) 2023-02-07 18:27:22 -04:00
Richard Ramos 6169a44c24 fix: close iterator 2023-01-31 10:50:40 -04:00
Richard Ramos d4473e9c46 fix: add sleep to iterator in case of err 2023-01-27 13:59:53 -04:00
Richard Ramos e0ccdbe966 refactor: peer discovery management for discv5 and peer exchange 2023-01-17 17:40:48 -04:00
Richard Ramos 6e7c3b6183 feat: update localnode ENR without having to restart discv5 2023-01-14 10:35:24 -04:00
Richard Ramos c87da46ce6 feat: use backedoff connector and discovery 2023-01-12 17:35:04 -04:00
Richard Ramos 40675ff204 refactor: service interface 2023-01-07 11:25:32 -04:00
Richard Ramos 2c9c763c30 fix(c-bindings): simplify discv5 API 2023-01-04 14:58:12 -04:00
Richard Ramos 83fd53d432 refactor: use context instead of quit channel 2022-12-10 11:51:08 -04:00
Andrea Maria Piana ebaf10601f Pass bootnodes to discovery 2022-12-09 14:11:12 -04:00
Andrea Maria Piana 685142e7b7 Allow to set bootnodes 2022-12-09 13:53:07 -04:00
Richard Ramos 94d20ab122 fix: remove useless condition 2022-11-29 16:14:35 -04:00
Richard Ramos 982707e02c refactor(discv5): execute discover loop as separate goroutine 2022-11-29 15:28:13 -04:00
Richard Ramos c8fc0404d1
chore: rename status-im/go-waku to waku-org/go-waku 2022-11-09 16:03:40 -04:00
Richard Ramos 8b64934e2c feat: peer exchange 2022-11-09 17:26:38 +03:00
Richard Ramos 38093bf660 chore: move dependencies from status-im to waku-org 2022-10-27 11:41:23 -04:00
Richard Ramos 57a525f71e chore: upgrade libp2p 2022-10-19 15:54:02 -04:00