-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix: Enable autosharding in any cluster #2505
Conversation
You can find the image built from this PR at
Built from 46809e3 |
LGTM We just need to add dynamic shard subscription like in Waku metadata. |
f3442c5
to
48c39e1
Compare
39e125a
to
5921c68
Compare
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.
LGTM, thanks!
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.
LGTM
Thank you!
@@ -506,10 +506,12 @@ suite "WakuNode - Relay": | |||
|
|||
await node.start() | |||
await node.mountRelay() | |||
require node.mountSharding(1, 1).isOk | |||
echo node.wakuSharding.getShard(DefaultContentTopic) |
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.
left overs?
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.
wops, fixed: c6a446b
waku/waku_enr/sharding.nim
Outdated
clusterId: uint16 | ||
shardIds: seq[uint16] | ||
clusterId*: uint16 | ||
shardIds*: seq[uint16] | ||
|
||
func clusterId*(rs: RelayShards): uint16 = |
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.
remove the clusterId
and shardIds
if they are no longer needed.
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.
sure: c6a446b
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!
85962b6
to
c6a446b
Compare
Description
cluster-id
!= 1 to i) have autosharding if desired and ii) have whatever amount of shards they want.For example, this PR enables the following. Creating a
cluster-id=10
with4
shards, where the node only subscribed to0, 1