Upgrade Guide
This page has instructions on upgrading your Micro-Rollup to a specific or latest versions of the Stackr SDK and CLI.
Upgrading to v0.5.2
This release introduces some changes in StackrConfig and MicroRollup.
- In your
stackr.config.tsfile,
- Remove the line which imports the
deployment.jsonfile. The file is now directly read by the SDK. If you renamed this file, specify the path indeploymentFilefield. - Remove the
stackrAppfield. - Remove
domain.chainIdanddomain.verifyingContractfields. - Rename
enableEmptyBlockstoallowEmptyBlocksinsequencerfield.
- If you are passing any of
isSandbox,disableBuilder,disableVulcanSyncordisableL1Syncarguments toMicroRollup, they should be moved to the config now, in corresponding sections.
Upgrading to v0.5.0
To upgrade your existing application to SDK version v0.5.0 from any older version, you need to perform a "squash fork". It basically is a new registration and deployment of your application but using the previous latest state as the new genesis state.
- Delete existing registration.
$ rm deployment.json && rm db.sqlite- Update the SDK version in your
package.jsonand the Stackr CLI version as well.
$ npm install @stackr/sdk@v0.5.0
$ npm install -g @stackr/cli-
In your
stackr.config.tsfile, rename thebatchSizeandbatchTimefields toblockSizeandblockTimerespectively. -
Update the
REGISTRY_CONTRACTvariable in your.envto point to the updated contract. Refer to Network Configuration for the new address. -
Re-register and re-deploy your MRU as a new application.
$ stackr register
$ stackr deployWith this, you now have a new application with the restored state! ✨
Backing up your Micro-Rollup state
To get your application's latest state dumped into a JSON file, follow these steps:
- Update the SDK version in your
package.json. If you are upgrading from version < v0.4.3, update to v0.4.3 first for this step.
$ npm install @stackr/sdk@v0.4.3-
Try to boot up the application. It should fail with an error stating "SDK version mismatch with Vulcan" and will dump your MRU's latest state into a
latest-state.jsonfile. -
Restore this dumped state JSON file as the new genesis state.
$ mv latest-state.json genesis-state.json