This PR fixes a bug to execute PreBlocker for the upgrade module, such that the chain will handle software upgrade logic properly (i.e., at the upgrade height, the old version panicks, while the new version handles the upgrade logic and makes progress). This PR also refactors the vanilla upgrade for testing purposes.
As Babylon has a PreBlocker in the proposal handler (for BTC timestamping), this PR has taken care of this by appending checkpointing module's PreBlocker after the upgrade modules'.
This PR fixes a bug to execute
PreBlocker
for the upgrade module, such that the chain will handle software upgrade logic properly (i.e., at the upgrade height, the old version panicks, while the new version handles the upgrade logic and makes progress). This PR also refactors the vanilla upgrade for testing purposes.As Babylon has a PreBlocker in the proposal handler (for BTC timestamping), this PR has taken care of this by appending checkpointing module's
PreBlocker
after the upgrade modules'.Test plan: https://babylon-chain.atlassian.net/wiki/spaces/BABYLON/pages/340721842/PoC+for+software+upgrade+with+arbitrary+state+update. Testing this e2e requires significant amount of work that is out of this PR's scope, so suggest we do this in subsequent PRs.