-
Notifications
You must be signed in to change notification settings - Fork 4
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
raw RFC topic sharding: alternative approaches and update requests #174
Comments
Not an alternative approach per se, but some thoughts:
Some of the details that I think we should revisit:
|
Thank you for you input :). Generally, we can reevaluate when automatic sharding has been rolled out. Future advances we make in automatic sharding might make the other two ways obsolete, I suggest automatic sharding as the default.
I'd not enforce this for all shards. A separate shard (cluster) can be seen as a segregated network managed by an app protocol.
The app protocol
Again, this ties into the point I made above. In the future, we could transition to automatic sharding more and more, if we have
But even then, there I'd expect there would be use cases where apps might want to have dedicated shards. A problem is the current recommendation for indicating participation in many shards in the ENR. Ill explain my idea here in a follow up comment. |
Here is an update I'd suggest to the current version of 51/WAKU2-RELAY-SHARDING: Background The maximum ENR size is 300 bytes, and space should be saved. Update Suggestion Add the following recommendation:
This can either be the global shard cluster (index Future Nodes that are part of many shard clusters (only relevant for a small subset of nodes, e.g. strong infrastructure nodes) (I can elaborate more on this later. |
One more point for future discussion: |
The shard cluster size should be increased from 64 to at least 256. ENR size limit suggestion: change label |
Pasting this here with my concerns. I raised my concerns here and here but as a tldr:
|
Thanks for your feedback and input. Afaict, this is post-MVP, so I will prio Vac reorg / MVP work for now. Here is a short version of my view (can go more into depth after MVP if necessary):
I'm fine with both ways. Regarding shard alloc, I consider all of these to be "valid" options
I do not have a strong option on this.
Imo the hierarchy fits nicely to Waku, even if you want to leave cluster management outside of Waku.
Shard cluster index + shard index span a name space. The namespace is just large enough to scale. (e.g. IPv4 vs IPv6)
Automatic sharding builds on static sharding, so static sharding is there anyways. Also, automatic sharding is not available yet, and we need something to scale.
The only thing that static sharding would do here is support a joint discovery network. Generally, there is no right or wrong for all these points. (If there is no current blocker/ time-critical issue, I'll continue on this discussion post Vac reorg and post-MVP.) |
@kaiserd thanks for the reply. Summarizing my responses on top of this:
Not a blocker, just some opinionated feedback. Sharding rfc is not part of my responsabilities but I think I have fair points on some alternaties and why I think we should consider them. |
Fore some of the points I already shared my opinion in the comments above. trying to clarify a misunderstandingBefore adding more to the points, I'll try to clarify a (potential) misunderstanding: As said before: the fact that the address space is large does not mean each of the shard addresses points to an existing pubsub network. While this is generally comparable to Ethereum, there is are major differences:
So, supporting more shards makes sense (again: supporting in the sense of "these shards are addressable", as well as the discovery mechanism offers means to discover nodes in them, shard addressing for Waku NetworkThe current version of RFC 51 assigns a large range of shard clusters to dynamic sharding:
I'd use these for the Waku Network which I sketched here Content topics are mapped dynamically onto these shards and apps using the Waku Network just specify content topics. shard addressing for apps outside the Waku Network(I know you disagree here; I'm listing this to explain that part of my idea, too, and to gather other opinions.) Apps that do not want to use the Waku Network can use their own shards in separate shard clusters. more on your points
Imo
(Happy to see other opinions here.)
I generally agree here.
see answer to first point.
It definitely could in the future. It depends on Status' requirements.
I thought one of your points was the Waku Network should be completely separated from apps that do not want to use it.
yes. When using the cluster index addressing, they also would not connect to nodes in shards they are not interested in.
There seems to be another misunderstanding (might be linked to the misunderstanding I tried to clarify above).
There is not really a "high quality shard" concept. I just used that term in answer to "I think we should cover way less shards. quality and not quantity."
see above
Yes. RFC 57 suggests a mapping.
You wouldn't.
"Forking" the network would allow that, too. An app that wants to use the Waku Network and protect its users from this could simply only accept whitelisted shards. |
This issue is par of #154 and tracks alternative approaches to decisions taken in 51/WAKU2-RELAY-SHARDING
and 52/WAKU2-RELAY-STATIC-SHARD-ALLOC.
Previous discussion and comments may be found in this PR.
This issue carries over open points.
Index Allocation
Currently, index allocation is done via the informational RFC 52/WAKU2-RELAY-STATIC-SHARD-ALLOC.
Index allocation could be managed in another (publicly available) document, or be handled in an un-managed way.
Inspiration for the chosen method is the IANA port allocation.
Levels of Network Segregation
We could mention various levels of network segregation in this RFC (or in another document).
In the current version of the RFC, apps have segregated shard clusters.
Levels of segregation comprise (non-comprehensive, off the cuff)
a single shard cluster (similar to Ethereum) shared by all apps.
This takes less space in ENRs, and makes static shard discovery (a bit) simpler.
However, this limits growth of Waku. At some point, which can be soon, apps will not find dedicated free static shards anymore.
Automatic sharding can be used, but I assume some apps still want to manage shard mappings themselves,
and some of them want segregated shards.
separate segregated Waku networks.
Apps can run their own segregated Waku networks.
This means, they completely segregate the gossipsub network (with the current version of the RFC specific control messages are shared beyond shard boundaries).
This would also make the above solution of having only a single shard cluster scale,
but comes at the (potential) disadvantage of not sharing control messages at all (negative effect on robustness).
To get fully segregated Waku networks: segregate the discv5 discovery network (at the cost of connectivity)
Imo, at least after introducing efficient capability discovery, this does not make sense.
Still, apps that really want that, can achieve it by using a different protocol ID.
Imo, having a single Waku network offering the three sharding types specified in the current version of 51/WAKU2-RELAY-SHARDING is the most promising solution.
It allows app protocols and apps to operate in joint shards (increase k-anonymity) and have access to segregated shared clusters (manage own shard mapping), while they can still share control messages to improve resilience and increase robustness.
Especially with future advances in incentivization, apps can help each other making the whole Waku ecosytem more resilient.
If this is not fitting for an app, despite the wide variety it offers, apps can still opt to setup their own segregated Waku network.
(In any case, this segregation is not enforced. (Limited) enforcement can happen on the app layer. Waku, at its core, is permissionless.)
@alrevuelta has a solution alternative to what is currently in the RFC (see in comments soon).
The text was updated successfully, but these errors were encountered: