Closed sisyphusSmiling closed 9 months ago
@JeffreyDoyle this is very interesting for flix.
Nice idea! 👍
The part that worries me a bit (but is not really improving or making it worse to the current state) is what happens when one contract update fails, but maybe there can be a CLI tool supporting this and it can leverage mainnet/testnet emulator simulation to dry-run the updates. This is however out of the FLIP scope but I feel related to its integration.
maybe there can be a CLI tool supporting this and it can leverage mainnet/testnet emulator simulation to dry-run the updates
Love this idea @sideninja! That would be really helpful to prevent failed updates.
I would slso like to add that in order to have a stable migration path to stable-cadence we need a way to test this process. I belive @joshuahannan created an issue about adding an invalid contract to emulator, but i could not find it now.
maybe there can be a CLI tool supporting this and it can leverage mainnet/testnet emulator simulation to dry-run the updates
Love this idea @sideninja! That would be really helpful to prevent failed updates.
cc @m-Peter
There is a stable cadence emulator now so the suggested code snippets and repo should be updated to use stable-cadence clmpatible syntax. In particilar the entitlements on Account permissions.
Thanks for the callouts @bjartek! I've got a draft PR here: https://github.com/sisyphusSmiling/contract-updater/pull/6
It's currently in draft bc there's a bug in the CLI pre-release related to passing transaction args that prevents running through manual testing.
If we're leaning toward approving this mechanism, though, I can start working on a test suite for pre- and post-Cadence 1.0 since we'll need both versions
I would slso like to add that in order to have a stable migration path to stable-cadence we need a way to test this process. I belive @joshuahannan created an issue about adding an invalid contract to emulator, but i could not find it now.
Agreed on this. Very necessary to put together guidance on upgrade paths and ensuring devs know how to prep contracts for updates.
Closing the comms loop here to point to the updated Cadence 1.0 migration plan. The contract detailed in this FLIP may still be useful for the purposes of coordinated contract upgrades whether it's Flow-managed or otherwise. Deployment of this contract is deprioritized in favor of a contract supporting network migration and will be revisited post-Cadence 1.0
See the latest changes to the staging contract interface here - https://github.com/onflow/contract-updater/pull/14
Update: Forum post covering the new staging mechanism
FLIP Issue: #203
This proposal outlines a mechanism for automated and efficient contract updates to take effect at or beyond a specified block height with the goal of minimizing recovery time following breaking improvements. Included in this FLIP is a design enabling contract developers to pre-define a sequence of contract updates across an arbitrary number of contracts and accounts, and either execute these updates themselves or delegate deployment authority to some trusted party.