-
Notifications
You must be signed in to change notification settings - Fork 61
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: cluster-id 0 discv5 issue #2562
Conversation
let clusterZeroConf = ClusterConf.ClusterZeroConf() | ||
conf.pubsubTopics = clusterZeroConf.pubsubTopics | ||
# TODO: Write some template to "merge" the configs | ||
# cluster-id=1 (aka The Waku Network) |
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.
no real change from here. just idendation.
You can find the image built from this PR at
Built from 12f693a |
707e0ca
to
4f7a4ea
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 for such a quick fix!
conf.discv5BootstrapNodes & twnClusterConf.discv5BootstrapNodes | ||
conf.rlnEpochSizeSec = twnClusterConf.rlnEpochSizeSec | ||
conf.rlnRelayUserMessageLimit = twnClusterConf.rlnRelayUserMessageLimit | ||
discard |
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.
We discard
at this point because we are not willing to set any particular configuration when either cluster_id == 0 or 1, 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.
correct. anyone can define their own clusterId eg =999 and there is no config we set in there.
of 0: | ||
let clusterZeroConf = ClusterConf.ClusterZeroConf() | ||
conf.pubsubTopics = clusterZeroConf.pubsubTopics | ||
# TODO: Write some template to "merge" the configs |
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.
What do you mean by "merge the configs" ?
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.
imagine
type A:
field1
field2
typeB:
field1
field2
field3
field4
which is similar to WakuConf
and ClusterZeroConf
. Note that typeB
is a superset of typeA
.
Right now we are "merging" boh manually.
let a = TypeA(...)
let b = TypeB(...)
# we want a config to override b
b.field1 = a.field1
b.field2 = a.field2
this is i) error prone, ii) if number of parameters increase, we have to assign them manually.
so I'm suggesting with some templating, writing a merge()
function so that.
let a = TypeA(...)
let b = TypeB(...)
merge(a, b)
or something like this. with this we no longer need all this
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!
Description
topics
but introduced a regression.topics
flag default value/waku/2/default-waku/proto
was being used when constructing the ENR, after removing that flag, we no longer had a default value.wakunode2 --cluster-id=0 ...
discv5 was not working properly, since the node had no default pubsub topic configured.cluster-id=0
.pubsub-topic
.