babylonchain / babylon

Main repo for Babylon full node
https://babylonchain.io
Other
234 stars 165 forks source link

upgrade: framework for writing software upgrade migration function #703

Closed SebastianElvis closed 2 months ago

SebastianElvis commented 2 months ago

Closes #700 Closes #701

This PR provides a framework for defining software upgrade migration function, based on Osmosis' approach.

The PR also provides a unit test that submits a software upgrade gov prop. The gov prop defines a migration function that removes an existing account and inserts a new FP, and the test asserts corresponding state diff before and after the gov prop. This proves that the migration function can manipulate states.

SebastianElvis commented 2 months ago

LGTM, can we add in the future an e2e test for this and the fork?

Of course, planned in https://github.com/babylonchain/babylon/issues/698