Commit Graph

81 Commits

Author SHA1 Message Date
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 4af7e7a500 chore: return custom error code for non recoverable errors 2023-10-19 12:15:34 -04:00
harsh-98 b5802adf5b fix: use NewQueries from db utils 2023-10-13 10:35:11 +07:00
richΛrd 88d69ebccd
feat: force reachability (#778) 2023-09-28 16:08:40 -04:00
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
Prem Chaitanya Prathi 3254d28968
Fix /health REST API panic (#763)
* fix: panic in REST health endpoint to running node without RLN

* chore: change title of each API file
2023-09-21 18:40:07 +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
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 ab7e45c735 feat: make RLN available by default 2023-09-14 09:03:18 -04: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 cc28267951 feat: append RLN proofs when posting messages in REST/RPC 2023-09-08 14:42:33 -04:00
Richard Ramos 8783cd2f45 chore(rln-relay): use the only key from keystore if only 1 exists 2023-09-08 12:05:32 -04:00
Prem Chaitanya Prathi d13b1f0aa3
autosharding content-topic config (#696)
* chore: add shard choice simulation test

* feat: add new flags for pubsub and contentTopics and deprecate topic flag

* chore: remove store-resume-peer config and comment out functionality until redesign of store is done

* chore: fix code to use contentTopics value

* fix: use default waku topic only if no other topics are provided in the config
2023-09-06 10:07:21 +05:30
Richard Ramos 5fcfbb9897 feat: use rln registry contract 2023-09-04 10:02:14 -04:00
Richard Ramos 30422114f6 refactor: use a map to store credentials instead of an array 2023-09-04 10:02:14 -04:00
Richard Ramos 9c0bebc859 refactor: use a map to store credentials instead of an array 2023-08-31 15:42:45 -04:00
Richard Ramos 0854edaf3d refactor: keystore as a data type 2023-08-31 15:42:45 -04:00
Richard Ramos 624fe1bb2f chore(rln): run rln in all relay pubsubtopics + remove cli flags 2023-08-24 10:48:22 -04:00
Richard Ramos f62ba67a92 chore: update smart contracts and documentation 2023-08-24 10:37:54 -04:00
Richard Ramos 0b943caaa8 refactor: remove credential registering from waku 2023-08-24 10:37:54 -04:00
Richard Ramos f088e49075 feat: create `generate-rln-credentials` subcommand 2023-08-24 10:37:54 -04:00
Prem Chaitanya Prathi 54c02213cd
fix: code scan alerts (#664)
* fix: error reported by codeQL

* chore: remove lgtm alert as repo has moved to code scanning

* chore: bump libp2p and deps in order to fix a security vulnerability

* chore: update gitignore for example build and bin

* chore:fix vendor sha
2023-08-22 19:18:20 +05:30
richΛrd ee17c23345
fix: log output and encoding (#656) 2023-08-19 08:48:42 +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
Richard Ramos da45dab68e
fix: nwaku / go-waku rlnKeystore compat 2023-08-11 11:54:24 -04:00
Richard Ramos e0e4a2fa87 refactor: remove unused function and simplify code related to creating db and migrations 2023-08-10 10:37:22 -04:00
Richard Ramos 05d8cfdc65 feat: postgresql vacuum 2023-08-10 10:29:40 -04:00
Richard Ramos ee2af4646c feat: sqlite vacuum and optional migrations 2023-08-10 10:29:40 -04:00
Richard Ramos b88907c5ee refactor: move --generate-key to a generate-key subcommand 2023-08-10 09:32:25 -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
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 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
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 ad9236fd6b refactor: move RPC and REST servers to waku cmd 2023-07-28 08:03:00 -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 ca297713fa refactor: move app code to cmd/waku 2023-07-07 10:10:21 -04:00
Prem Chaitanya Prathi 06d303f8ab
chore: update flag from --topics to --topic as per #584 (#585) 2023-06-28 20:29:40 +05:30
Richard Ramos 0dbe4fd5ff
fix: rename fd flag 2023-05-24 15:06:07 -04:00
Richard Ramos 39c97c5d89 feat: set resource limits 2023-05-24 11:46:32 -04:00
Richard Ramos 9594e54d36 feat: use circuit relay in service node 2023-05-14 13:10:56 -04:00
Richard Ramos 9b7ad40b06 feat: ext-ip 2023-05-08 11:59:46 -04:00
Richard Ramos 837a0f2708 chore: add unit test for signed validator and --protected-topic-flag 2023-05-04 13:25:45 -04:00
Richard Ramos c479daa926
chore: rename/reorder legacy filter flags 2023-04-26 11:57:25 -04:00