Skip to content

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.

  1. 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 in deploymentFile field.
  • Remove the stackrApp field.
  • Remove domain.chainId and domain.verifyingContract fields.
  • Rename enableEmptyBlocks to allowEmptyBlocks in sequencer field.
  1. If you are passing any of isSandbox, disableBuilder, disableVulcanSync or disableL1Sync arguments to MicroRollup, 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.

  1. Delete existing registration.
$ rm deployment.json && rm db.sqlite
  1. 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
  1. In your stackr.config.ts file, rename the batchSize and batchTime fields to blockSize and blockTime respectively.

  2. Update the REGISTRY_CONTRACT variable in your .env to point to the updated contract. Refer to Network Configuration for the new address.

  3. 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:

  1. 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
  1. 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.

  2. Restore this dumped state JSON file as the new genesis state.

$ mv latest-state.json genesis-state.json