Closed hopeyen closed 1 year ago
The described approach sounds reasonable! Definitely more scalable than radios only relying on Lightpush&Filter.
Keep in mind that if you ever decide to change number of shards, the contentTopic -> shar mapping will change. I don't think that is a huge problem for you, but just to be aware that during this change being applied to the network there might be some messages travelling to 2 different pubsub topics, so the delivery might be unreliable until the whole network is upgraded.
We are trying to solve it by introducing a generation number in the content topic, so that if we need to add shards, they'll be on the gen+1, so the old topics mapping will still apply
Problem statement
Currently the radio nodes utilize filter and lightpush gossip protocols and rely on waku nodes hosted by us. The hosted nodes were solely responsible for relaying messages between all the radios nodes, and the traffic is becoming too heavy to handle for them. We need a way for the network to scale without the limitations from our hosted nodes.
Expectation proposal
Currently we have pubsub topic split into Graphcast
mainnet
andtestnet
, while utilizing content topics withradio_name/version/identifier
where the identifier is usually a subgraph deployment hash.Required
content_topic
to only handle the messages the specific radios are interested in.Expansion (can move to a separate issue focused on sharding)
graphcast_mainnet_[deployment.bytes32().to_int() % 9]
Alternative considerations
Additional context Network sharding: https://rfc.vac.dev/spec/51/