babylonchain / babylon

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

upgrade: framework for writing software upgrade migration function #703

Closed SebastianElvis closed 4 months ago

SebastianElvis commented 4 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 4 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