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.ts
file,
- Remove the line which imports the
deployment.json
file. The file is now directly read by the SDK. If you renamed this file, specify the path indeploymentFile
field. - Remove the
stackrApp
field. - Remove
domain.chainId
anddomain.verifyingContract
fields. - Rename
enableEmptyBlocks
toallowEmptyBlocks
insequencer
field.
- If you are passing any of
isSandbox
,disableBuilder
,disableVulcanSync
ordisableL1Sync
arguments 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.json
and the Stackr CLI version as well.
$ npm install @stackr/sdk@v0.5.0
$ npm install -g @stackr/cli
-
In your
stackr.config.ts
file, rename thebatchSize
andbatchTime
fields toblockSize
andblockTime
respectively. -
Update the
REGISTRY_CONTRACT
variable in your.env
to 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 deploy
With 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.json
file. -
Restore this dumped state JSON file as the new genesis state.
$ mv latest-state.json genesis-state.json