Commit Graph

33 Commits

Author SHA1 Message Date
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
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 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 dc08c44804 feat: add filters for discv5 2023-07-31 10:45:45 -04:00
Richard Ramos b26859fc6a refactor: make discovery connector subscribe to discovery services 2023-07-07 09:47:46 -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 1c75c89790 refactor: remove unneeded `Connect` as dns4 addresses are being resolved now 2023-06-01 14:02:08 -04:00
harsh-98 f94b071a84 nit: remove redundant field 2023-05-05 11:41:10 -04:00
harsh-98 e6d9f6b1d8 nit: change to simpleLRU 2023-05-05 11:41:10 -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 2c3566377a refactor: inject host on node start 2023-04-17 11:09:05 -04:00
Richard Ramos 98e14cf0f6
chore: add debug log to identify when peer is discovered 2023-03-31 08:44:01 -04:00
Richard Ramos 6e2a0ffeb4 refactor(px): use request-response instead of dialing back 2023-02-28 14:11:50 -04:00
Richard Ramos abcadd1bcf feat(c-bindings): expose enrs via dns discovery 2023-02-17 11:05:28 -04:00
Richard Ramos f0eaa84aad chore: upgrade dependencies 2023-02-16 12:22:47 -04:00
Richard Ramos 156db781f6 chore: switch to Google's Protobuf library 2023-02-16 11:37:59 -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 34c5e97d5e fix: remove manual connection to peers 2023-01-12 17:35:04 -04:00
Richard Ramos c87da46ce6 feat: use backedoff connector and discovery 2023-01-12 17:35:04 -04:00
Richard Ramos 607bf07198 refactor: remove some duplication and unneeded code 2023-01-08 14:35:32 -04:00
Richard Ramos 40675ff204 refactor: service interface 2023-01-07 11:25:32 -04:00
Richard Ramos 83fd53d432 refactor: use context instead of quit channel 2022-12-10 11:51:08 -04:00
Richard Ramos 982707e02c refactor(discv5): execute discover loop as separate goroutine 2022-11-29 15:28:13 -04:00
Richard Ramos 3620a6b222 feat: allow specifying list of peerIDs to chose when doing a request 2022-11-25 17:37:54 -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