Closed xlc closed 3 years ago
The backend uses the genesis hash of the network to distinguish networks (or at least that should be the case; you report seem to indicate there might be a bug here) and when chains share the genesis we use the name that the most nodes use (so that a node claiming to be on the "banana" chain but actually is on polkadot will be "drowned out" by the honest majority).
The backend indeed groups by genesis hash, but the UI only cares about chain names. Because of this, the backend needs to keep a mapping from current chain name to genesis hash for the UI. My guess is therefore that if there are two chains using the same name, something like this happens:
To prevent this sort of thing, the frontend and backend should agree on how nodes are grouped into chains. #350 suggests both sides group by genesis hash (but it's noted that optimally we might need to group by genesis hash + name or something in the longer term to properly cater for forks).
Any plan on getting this fixed or if you can provide some pointers and I can someone from our team to take a look?
We don't think that getting a fix in for this will be very difficult, but as we're midway through reworking our deployment approach to handle the new sharded telemetry server, there may be a delay in getting the fix into production I'm afraid!
We'll see what we can do though, and post an update here once we have deployed something containing the fix!
Looks like other teams are also having this issues suddenly. Please keep us posted. Thanks.
As might be evident from the issue being closed, we've merged (and deployed, by the looks of it) a fix for this issue now. The new behaviour will be that, if nodes are sending telemetry from different genesis hashes but the same chain name, you'll see the chain name twice in the UI (with the different nodes counts next to it, and higher node counts sorted first) and be able to view each set of nodes independently.
This is a compromise which means that all telemetry should appear (rather than us picking the chain name with most nodes in case of a conflict), but at the expense of seeing the same chain name more than once if nodes from different chains (by genesis hash) happen to use the same name.
This is a network list I just fetched from https://telemetry.polkadot.io/ (by inspecting ws messages)
You can see there are multiple
Local Testnet
andKarura
. For some reason the frontend now decides display Karura with 3 nodes (someone's Karura private testnet), not the one with 60 nodes (the Karura mainnet).There are some race conditions on backend & frontend.
Why the backend is not merging network with same name? It is useful to distinguish between different
Local Testnet
but there isn't any unique id exposed so impossible correctly handle them.The frontend should also display the network with most nodes, not pick some arbitrary one.