Skip to content
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

Make UI subscribe by genesis hash, not chain label #350

Closed
jsdw opened this issue Jun 30, 2021 · 1 comment · Fixed by #395
Closed

Make UI subscribe by genesis hash, not chain label #350

jsdw opened this issue Jun 30, 2021 · 1 comment · Fixed by #395
Labels
enhancement New feature or request

Comments

@jsdw
Copy link
Collaborator

jsdw commented Jun 30, 2021

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.

@jsdw 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
@jsdw jsdw added the enhancement New feature or request label Jul 30, 2021
@chevdor
Copy link
Contributor

chevdor commented Aug 16, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants