gaia icon indicating copy to clipboard operation
gaia copied to clipboard

Support full history of cosmos hub

Open okwme opened this issue 2 years ago • 8 comments

Summary

Each hard fork upgrade of the cosmos hub creates a new blockchain. In order to make queries about the previous versions, nodes need to be kept online, even though they're no longer producing blocks. I'd like ICF to keep RPC and REST endpoints online for each historical version of the Cosmos Hub.

Problem Definition

Proposal

For cosmoshub-1, cosmoshub-2 and cosmoshub-3 there is a specific binary that is used to run the node. It needs to be configured to have a halt-height so that it doesn't fail trying to produce new blocks after the constituent upgrade heights were reached. That should allow the nodes to stay online and queryable.

For cosmoshub-4 there were soft fork upgrades that mean different binaries are necessary to be run after different heights. The history of cosmos hub upgrades can be seen in the roadmap home dir. For each of the soft forks of cosmoshub-4 to be accessible, each of the binaries should be able to be run on the same node, targeting the same home directory for data. They will need to be configured to use different ports of course. Then with a proper mapping of URLs to port IDs we can provide endpoints for queries that are correlated to different block heights. For instance the URLs could looks like this with a reference to which infra node is needed to support them:

# server-1
rpc-cosmoshub-1.interchain.io
rest-cosmoshub-1.interchain.io

# server-2
rpc-cosmoshub-2.interchain.io
rest-cosmoshub-2.interchain.io

# server-3
rpc-cosmoshub-3.interchain.io
rest-cosmoshub-3.interchain.io

# server-4
rpc-cosmoshub-4-1.interchain.io
rest-cosmoshub-4-1.interchain.io
rpc-cosmoshub-4-2.interchain.io
rest-cosmoshub-4-2.interchain.io
rpc-cosmoshub-4-3.interchain.io
rest-cosmoshub-4-3.interchain.io
rpc-cosmoshub-4-4.interchain.io
rest-cosmoshub-4-4.interchain.io

More fine grained details about which version of gaia to use and which range of block heights to query for can be seen in the history of cosmos hub upgrades above.


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

okwme avatar Feb 07 '22 15:02 okwme

There's additional archival data and information available at https://archive.interchain.io/

okwme avatar Feb 07 '22 15:02 okwme

  • Setup meeting with Hypha to review Ansible script

glnro avatar Feb 15 '22 08:02 glnro

@okwme What do we want the architecture for sentry nodes to look like...one to many or one to one? Have been discussing w @tokamak-git, wanted to wait before moving forward.

Also, do we want multiple sentries for different regions?

glnro avatar Feb 16 '22 09:02 glnro

archive 4 endpoints configured for internal use. e.g. as a seed node for state sync. refer gaiad status --node https://rpc-cosmoshub-4-4.interchain.io

tokamak-git avatar Apr 21 '22 11:04 tokamak-git

@glnro how would you like to proceed?

tokamak-git avatar Apr 25 '22 14:04 tokamak-git

Taking a look at this tonight to close out

glnro avatar Apr 25 '22 14:04 glnro

@tokamak-git discussed with @glnro, we can close this.

mmulji-ic avatar Jul 04 '22 16:07 mmulji-ic

Re-open as a long term issue to track "nice-to-have" features for the full history of gaia.

These include

  • backporting tests
  • performance improvements
  • unified queries
    • use one query format then route and reconfigure to the correct format depending on height

okwme avatar Aug 16 '22 08:08 okwme