-
Notifications
You must be signed in to change notification settings - Fork 263
feat: communities-in-own-shard-1 #6573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Jenkins BuildsClick to see older builds (169)
|
1c84e47 to
37ef179
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #6573 +/- ##
===========================================
- Coverage 59.12% 59.09% -0.03%
===========================================
Files 823 823
Lines 121844 121942 +98
===========================================
+ Hits 72036 72066 +30
- Misses 42380 42442 +62
- Partials 7428 7434 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| } | ||
|
|
||
| return filter, nil | ||
| // TODO temporary so not changing the return type, otherwise we should return a slice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems not applied here.
protocol/messenger_filter_init.go
Outdated
|
|
||
| // Community requests will arrive in this pubsub topic | ||
| if err := m.SubscribeToPubsubTopic(wakuv2.DefaultNonProtectedPubsubTopic(), nil); err != nil { | ||
| // TODO depracate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that there are a few todos in the PR, would be good to have issue linked here to resolve the todos.
c2c290b to
ba90867
Compare
…ies-in-own-shard-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the first stage of migrating communities to shards 128 and 256 by enabling nodes to listen for community content topics in both the current shards (32, 64, and custom) and the new Global Community Control (128) and Global Community Content (256) shards simultaneously.
- Adds support for Global Community Control (shard 128) and Global Community Content (shard 256) shards
- Modifies the subscription and filtering mechanisms to handle multiple shards for community content
- Updates store node request logic to search across multiple shards when fetching community data
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| protocol/messenger_store_node_request_manager.go | Refactors community fetching to try multiple shards sequentially |
| protocol/messenger_peers.go | Updates SubscribeToPubsubTopic to accept variadic public key parameters |
| protocol/messenger_filter_init.go | Adds subscription to global community control and content pubsub topics |
| protocol/messenger_communities.go | Adds community filters for multiple pubsub topics and simplifies shard subscription |
| messaging/waku/shard.go | Adds new shard definitions for global community control (128) and content (256) |
| messaging/types/shard.go | Mirrors the shard definitions from waku package |
| messaging/types/filters.go | Adds IsCommunity flag to ChatToInitialize struct |
| messaging/layers/transport/transport.go | Enhances SubscribeToPubsubTopic with automatic key retrieval logic |
| messaging/layers/transport/filters_manager.go | Implements multi-filter support for communities across different pubsub topics |
| messaging/api.go | Updates API to match the variadic SubscribeToPubsubTopic signature |
| messaging/adapters/filters.go | Adds IsCommunity field to filter adapters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // GlobalCommunityContentShard returns the shard for the global community content messages | ||
| // | ||
| // Specs: https://github.com/vacp2p/rfc-index/blob/8ee2a6d6b232838d83374c35e2413f84436ecf64/status/56/communities.md?plain=1#L330 | ||
| func GlobalCommunityContentShard() *Shard { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why it's duplicated with following messaging/waku/shard.go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some packages are accessing one and some others the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a few minor comments.
I’m wondering, how was it tested?
| } | ||
|
|
||
| return filter, nil | ||
| // TODO temporary so not changing the return type, otherwise we should return a slice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and most of the changes here) will be reverted once community's pubsub topics are migrated, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the thing now is that we have to start "listening" in these pubsubs then when we start publishing in those these nodes will not miss messages
Co-authored-by: osmaczko <[email protected]>
Co-authored-by: osmaczko <[email protected]>
Co-authored-by: osmaczko <[email protected]>
running it together with #6588 |
This PR is to allow communities to be eventually moved to shards
128and256. We will follow these migration stages:32,64and custom) together with the new shards (128and256).128and256).32and64.TODO before stage 2:
128and256keys in status-desktop128: https://status.app/cc/G3EAAGRgnoPjHJmoytKJg-CQA4dvgWZZoJAGHrKX8kg1pW4UfiyRnZZT1CSDHm6veZC66zje5_L6K7iaprlb1zpDQddFYxEUJ1_LuiCKm76zkmGMrTDMBqvthtTK2q5x467N-qwF#zQ3shrzwZiRa1r7xu2soYJunvHzsi79ANkoCXnARnpJajhq2GRelates to #6384