* fix: modify store test to not depend on order of msgs
Co-authored-by: richΛrd <info@richardramos.me>
---------
Co-authored-by: richΛrd <info@richardramos.me>
* 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>
* 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
* feat: update filter client to support autosharding
* chore: add filter tests for autoshard
* chore:update filter API docs for autosharding
* chore: docs changes to indicate sharding impact on pubSubTopic
* fix: handle partial errors during subscribe and return failed content-topic details
* fix: and optimising fetching membership events
* fix: start from lastProcessedBlock+1
* test: fetching membership logic
* refactor: usage of rlnInstance,rootTracker,groupManager
rlnInstance, rootTrack were previously created while creating rlnRelay
but were assigned to groupManager on Start of rlnRelay. This created
unncessary dependency of passing them to static and dynamic group
manager.
Web3Config uses interface EthClientI for client, so that we can pass
mock client for testing MembershipFetcher.
* fix: failing test
* fix: lint error
* fix: account for PR suggestions
* fix: failing race test
* fix: dont' increase fromBlock on error
* nit: fix naming and add comments
* 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
- 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
* 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>
* 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>
- 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
- 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)