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

Support app version changes through EndBlock #16243

Closed
cmwaters opened this issue May 22, 2023 · 0 comments · Fixed by #16244
Closed

Support app version changes through EndBlock #16243

cmwaters opened this issue May 22, 2023 · 0 comments · Fixed by #16244

Comments

@cmwaters
Copy link
Contributor

Summary

There are two ways of modifying the app version that CometBFT uses:

  1. In the Info ABCI call upon startup
  2. In the EndBlock ABCI call as a consensus param after every block.

As the upgrade module expects every app version change to coincide with a restart of the users binary, I believe it thus relies on the first option (but I'm not 100% sure). Prior versions (v0.46.x and below) did not allow users to modify the app version in EndBlock. Since the refactor, users can now modify the app version via baseapp passing access to the ParamStore. There is still the baseapp.appVersion variable which the upgrade module uses to change but has no connection with the ConsensusParams that get returned in EndBlock. This appVersion is what the upgrade module modifies. As it's not associated with the ConsensusParams, app developers can't have rolling upgrades.

Proposal

  • remove appVersion and consolidate by using the ParamStore. The methods AppVersion and SetAppVersion remain as they were but instead modify the ConsensusParams
  • x/upgrade does not keep its own copy of the app version but rather relies on the canonical version held in baseapp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant