osmosis-frontend icon indicating copy to clipboard operation
osmosis-frontend copied to clipboard

Multiple nodes per chain & advanced settings

Open daniel-farina opened this issue 2 years ago • 5 comments

I'm starting this issue to discuss and brainstorm ideas that will further decentralize our frontend application.

Multiple nodes per chain

Currently the frontend relies on network information stored here:

https://github.com/osmosis-labs/osmosis-frontend/blob/7c830cef41d51c536efc81756c0832088da1c241/packages/web/config/chain-infos.ts#L5

The problem with this approach is that if any of these nodes goes down then the chain becomes unusable by our frontend. I think it would be great to have a list of nodes per chain so that if one network is not available we are able to use additional networks.

This might not be a feature that is very easy to implement so this brings a second idea:

Advanced settings

A section within the site where we give users advanced options to do things like:

  • chain network information
  • add tokens that are not available by default
  • etc

Probably low priority but worth having in the baglog

daniel-farina avatar Jul 01 '22 15:07 daniel-farina

We'll discuss this in our product meeting. I've thought about this as well in the past. I've also thought of some sort of web service that could provide node urls given a chain ID. It could only provide urls to health-checked notes, as well as a variety of URLs to double as a load balancer. I wouldn't be surprised if this functionality is built into the load balancer already.

Perhaps- we can simply solve this issue if we provide urls to load balancers instead of nodes directly? I think the keplr nodes are already load balanced (via those URLs there), but that may not be the case for other chains.

jonator avatar Jul 01 '22 15:07 jonator

Yes, great topic to discuss. Just keep in mind that that there are two parts to this:

  • Our backend being able to load balance multiple node providers (The main note is already behind a cluster of nodes but adding an additional layer on top makes sense ad the DNS level of multiple entries with different priorities).
  • The front-end being able to support multiple nodes or a settings page where you can edit it.

The first option would still be a centralized way of doing it, we still need the second option in order to keep it decentralized.

daniel-farina avatar Jul 01 '22 17:07 daniel-farina

I would like to add:

  • Option to select testnet/main net on the bottom of the page somewhere would be really ally useful.

daniel-farina avatar Jul 02 '22 20:07 daniel-farina

Lots of this can be provided by switching to using chain registry (once it's ready) as our data source rather than hardcoded; for specifying nodes, networks, tokens, etc.

JeremyParish69 avatar Jul 03 '22 19:07 JeremyParish69

@daniel-farina We've (@sunnya97 @pyramation @ValarDragon ) have been discussing the possibility of automating this

  • #766

It doesn't rule this out though. We'll soon be adding a settings dropdown, and perhaps in an advanced section we can let users specify specific nodes they want to interact with..

jonator avatar Sep 15 '22 12:09 jonator

Closing in favor of #766 . We'd like this to be automated for users.

Can reopen if we want to add this as an advanced setting so users can override with their own endpoints.

jonator avatar Sep 23 '22 19:09 jonator