On chain app upgrade


#1

Has there been some work done on how one would go about making a Cosmos SDK based application which can be updated through an on chain transaction?

By upgrade I mean both updating the application state machine and also potentially transforming the on chain state/data. If one uses something like Ethermint/Lotion, the one sort og gets this for free, as there is a VM running on top of Tendermint, but how would one do this in the SDK, or in any other more light weight way.


#2

So here is my point of view.

We are currently focused on making full network upgrades via export and restart as painless as possible. This is important b/c

  • We anticipate consensus, data store and peer to peer layer upgrades will be important for the foreseeable future.
  • Ease of forking the blockchain is essential to censorship resistance.

At this point in the evolution of the network, we think building cultural norms around this kind of full stack upgrade is best for the health of the network.

Our friends and partners are also experimenting with on chain upgrades via governance parameters.

In the Ethermint project, we learning about routing transaction into systems that support on-chain code. What we learn from this should be also relatively easily applied to a WebAssembly VM allowing zone developers to more easily design on chain code into their applications.

One could imagine wrapping the entire Cosmos stack in some kind of higher level orchestration engine that would enable triggering switching the entire software stack based on chain events.

Finally if the approach substrate has taken really proves itself, it wouldn’t be that much work to make substrate based chains compatible with Cosmos.