Replies: 6 comments 10 replies
-
I think you summed it up pretty nicely @aaronc. As far as I see it, the proxy/service approach might be the easiest path forward. All an operator would have to do is state which height ranges map to which versions and what endpoints the service can reach each individual binary version at. This service itself should be fairly trivial to understand and implement. It just requires for operators to run all desired (old) binary versions they wish to support. |
Beta Was this translation helpful? Give feedback.
-
I explored this option with the soft upgrades RFC. It is feasible but challenging and probably not worth the endeavour. You might also find this issue interesting which looks at introducing a lean archive mode in Tendermint that runs a few bare services designed for data availability of previous versions of a chain |
Beta Was this translation helpful? Give feedback.
-
Another idea is to support a limited number of "old" query services (eg for the previous version of the SDK). This is how it can be implemented:
IMHO, however, supporting historical state should be delegated to indexers. |
Beta Was this translation helpful? Give feedback.
-
This issue highlights an architectural shortfall of the current Cosmos SDK application design; that the app itself that tendermint is interacting with has no concept of internal versioning against the on chain configuration. The Cosmovisor process offers a partial solution to this problem by trying to start and stop binary versions as requested by the chain. The proxied multiprocess query server(s) approach above is also offering partial solutions around this core design problem. Module version number maps are also a step along this path but as they do not go for enough as they only focus on upgrades instead of parallel support. In the future it would make sense if a full design effort was implemented that allowed the abci applicaiton to understand and execute these different versions in parallel according to the on chain configuration. In this type of design a user could always run the "latest" version of the app as it would contain all the versioned protocols as internal components/process... upgrades for nodes would be much easier to deal with as the additional configuration could be loaded into the processes in advance, validated, and transitioned to when scheduled. These same libraries could be maintained for historical queries. |
Beta Was this translation helpful? Give feedback.
-
Great idea, I found this old discussion when started working on subnode (https://github.com/notional-labs/subnode). It also fix the problem of archive node too big, too slow. |
Beta Was this translation helpful? Give feedback.
-
Great idea! |
Beta Was this translation helpful? Give feedback.
-
When we do an upgrade with x/upgrade, historical queries have a high chance of breaking. Even though the node still has the historical state, the query handlers are expecting state in the new format which may have been migrated starting with the upgrade block.
So we need to find a way to gracefully support historical queries. The simplest method would probably be having nodes that are halted at upgrade heights. To make this user friendly we'd likely want a proxy server which routes requests to different nodes based on the height parameter. Possibly this is something that cosmovisor could do. I'm not sure if there would be an easy way for historical binaries to be spun up in query only mode against the same data dir. Anyway, maybe something worth thinking about just for RPC nodes.
Another idea could be somehow trying to migrate historical states for RPC nodes... but I'm not sure about the feasibility of that. Seems like a lot of work and proofs would break, but maybe...
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions