Skip to main content
Version: Testnet

DRS migration

This section demonstrates how to upgrade a RollApp to a new Dymension RollApp Standard (DRS). For more information on DRS and security standards in Dymension please review the Security section.

DRS are specific Dymension RDK versions that can be used for RollApp deployment. This system enhances the security of RollApps and provides developers with the latest technology in a standardized manner.

Prerequisites

  • The Rollapp has at least one governor, necessary to pass governance proposals. In case the RollApp has no governor, it can be created in the Portal or via CLI:
rollappd tx staking create-validator \
--amount=SELF-STAKED-AMOUNT \
--moniker=MONIKER \
--chain-id=CHAIN-ID \
--from=KEY-NAME \
--commission-rate=COMMISSION \
--commission-max-rate=MAX-RATE \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--pubkey=$(rollappd dymint show-sequencer --home ~/.roller/rollapp) \
--node=RPC
  • To determine the rollapp DRS, please run the following command:
rollappd q rollappparams params
note

The guide is split into two:

  1. Upgrading from DRS 1
  2. Upgrading from DRS > 1 (i.e 2,3)

Please make sure you follow the right section according to your RollApp version.

Migration guide

Create the proposal

  1. Create a proposal JSON file (e.g., proposal.json) with the following structure:
{
"title": "Update rollapp to DRS-4",
"description": "Upgrade Dymension rollapp to version DRS-4 scheduled upgrade time",
"summary": "This proposal aims to upgrade the Dymension rollapp to version DRS-4, implementing new features and improvements, with a scheduled upgrade time.",
"messages": [
{
"@type": "/rollapp.timeupgrade.types.MsgSoftwareUpgrade",
"original_upgrade": {
"authority": "<authority-address>",
"plan": {
"name": "drs-4",
"time": "0001-01-01T00:00:00Z",
"height": "1800",
"info": "{}",
"upgraded_client_state": null
}
},
"upgrade_time": "2024-09-06T18:10:00Z"
}
],
"deposit": "500arax",
"expedited": true
}
  1. Replace the authority-address in the previously created proposal.json with the value returned from the following command:
rollappd q auth module-account gov
  1. Replace deposit in the previously created proposal.json with a value ≥ min_deposit value returned from the following command:
rollappd q gov params
  1. Replace upgrade-time.

upgrade_time is the time when the upgrade will be executed. This time must be in UTC time and it will need to be after the governance proposal is passed. By default governance proposal time is 5 minutes on Playground RollApps, so an example value could be e.g 10 minutes from the moment the gov proposal is submitted.

  1. Submit the proposal using the following command (replace rol-user with your key name and arax with your RollAp denom):
rollappd tx gov submit-proposal proposal.json --from rol-user --keyring-backend test --fees 2000000000000arax

Vote on the proposal

  1. Replace arax and rol-user according to your denom and key:
rollappd tx gov vote 1 yes --from rol-user --keyring-backend test --fees 2000000000000arax

Update Binary

  1. Wait for the upgrade to be executed. Once it is, the rollapp will panic with the following message:
panic: UPGRADE "drs-4" NEEDED at height: 100: {}
  1. Stop the rollapp services:
roller rollapp services stop
  1. Install the DRS-4 new binary:
git clone -b v3.0.0-rc07-drs-4 https://github.com/dymensionxyz/rollapp-evm.git
cd rollapp-evm
export BECH32_PREFIX=<rollapp_prefix> && make build BECH32_PREFIX=$BECH32_PREFIX
sudo cp ./build/rollapp-evm $(which rollappd)
note

For rollapp-wasm use wasm DRS binary (_https://github.com/dymensionxyz/rollapp-wasm.git*) and tag v2.0.0-rc07-drs4

  1. Migrate the RollApp in roller:
roller rollapp migrate
  1. Start the rollapp again:
roller rollapp services start

Migrating Full Nodes (in case running):

  1. Wait for full nodes to panic
  2. Start them again with the following command:
rollappd start --home <roller_path>/rollapp --dymint.skip_validation_height <upgrade_height>

Where upgrade_height is the height of the first block that will be received after changing to DRS-4 version. Once the node has processed the upgrade_height block, the full node can be stopped and run using roller as usual.