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
The guide is split into two:
- Upgrading from DRS 1
- Upgrading from DRS > 1 (i.e 2,3)
Please make sure you follow the right section according to your RollApp version.
Migration guide
- DRS 1
- DRS +1
Create the proposal
- 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
}
- Replace the
authority-address
in the previously created proposal.json with the value returned from the following command:
rollappd q auth module-account gov
- Replace deposit in the previously created proposal.json with a value ≥ min_deposit value returned from the following command:
rollappd q gov params
- 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.
- Submit the proposal using the following command (replace
rol-user
with your key name andarax
with your RollAp denom):
rollappd tx gov submit-proposal proposal.json --from rol-user --keyring-backend test --fees 2000000000000arax
Vote on the proposal
- Replace
arax
androl-user
according to your denom and key:
rollappd tx gov vote 1 yes --from rol-user --keyring-backend test --fees 2000000000000arax
Update Binary
- 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: {}
- Stop the rollapp services:
roller rollapp services stop
- 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)
For rollapp-wasm use wasm DRS binary (_https://github.com/dymensionxyz/rollapp-wasm.git*) and tag v2.0.0-rc07-drs4
- Migrate the RollApp in
roller
:
roller rollapp migrate
- Start the rollapp again:
roller rollapp services start
Migrating Full Nodes (in case running):
- Wait for full nodes to panic
- 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.
Create the proposal
- Create a proposal JSON file (e.g., proposal.json) with the following structure:
{
"title": "Update Dymension to DRS-4",
"description": "Upgrade Dymension to DRS-4 version with scheduled upgrade time",
"summary": "This proposal aims to upgrade the Dymension rollapp to DRS 4, implementing new features and improvements, with a scheduled upgrade time.",
"messages": [
{
"@type": "/rollapp.timeupgrade.types.MsgSoftwareUpgrade",
"authority": "<authority-address>",
"drs": 4,
"upgrade_time": "2024-09-06T18:10:00Z"
}
],
"deposit": "500arax",
"expedited": true
}
- Replace the
authority-address
in the previously created proposal.json with the value returned from the following command:
rollappd q auth module-account gov
- Replace deposit in the previously created proposal.json with a value ≥ min_deposit value returned from the following command:
rollappd q gov params
- 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.
- Submit the proposal using the following command (replace rol-user with your key name and arax with your rollapp denom):
rollappd tx gov submit-proposal proposal.json --from rol-user --keyring-backend test --fees 2000000000000arax
Vote on the proposal
- Replace
arax
androl-user
according to your denom and key:
rollappd tx gov vote 1 yes --from rol-user --keyring-backend test --fees 2000000000000arax
Update Binary
- 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: {}
- Stop the rollapp services:
roller rollapp services stop
- 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)
For rollapp-wasm use wasm DRS binary (https://github.com/dymensionxyz/rollapp-wasm.git) and tag v2.0.0-rc07-drs4
- Migrate RollApp in
roller
:
roller rollapp migrate
- Start the RollApp again:
roller rollapp services start
The rollapp should start producing new blocks and submitting batches to Dymension.
Migrating Full Nodes (In case running):
- Wait for full nodes to panic
- 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.