You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chain labels change and are based on whatever the most common label for a given chain that's been seen is.
The UI subscribes to chains by their label, but these labels could change at any time.
This requires the backend to maintain an uptodate mapping from chain label to chain details, so that it knows which chain a subscription is about. We run the risk of this mapping falling out of sync with reality, or of potential race conditions between a UI "subscribe to chain" message and a chain label changing (however improbabale).
I'd propose that we provide genesis hashes to the UI along with labels/node counts, and have the UI use those when subscribing to chains. This should reduce backend complexity and the scope for races.
The text was updated successfully, but these errors were encountered:
jsdw
changed the title
UI subscribes by chain label, not genesis hash, increasing backend complexity
Make UI subscribe by genesis hash, not chain label
Jul 30, 2021
That's a good idea but how do you propose handling the case of a chain fork?
Both chains would have the same genesis hash but we end up talking about 2 different chains.
Having the genesis hash as well could be usefull though.
Chain labels change and are based on whatever the most common label for a given chain that's been seen is.
The UI subscribes to chains by their label, but these labels could change at any time.
This requires the backend to maintain an uptodate mapping from chain label to chain details, so that it knows which chain a subscription is about. We run the risk of this mapping falling out of sync with reality, or of potential race conditions between a UI "subscribe to chain" message and a chain label changing (however improbabale).
I'd propose that we provide genesis hashes to the UI along with labels/node counts, and have the UI use those when subscribing to chains. This should reduce backend complexity and the scope for races.
The text was updated successfully, but these errors were encountered: