Upgrade DRS
DRS
are specific Rollapp versions that are approved for RollApp deployment.
This section demonstrates how to upgrade a RollApp to a new Dymension RollApp Standard (DRS
). For more information about DRS & upgradability in Dymension please review the Standards & Upgradability section.
Steps Overview
- Create a governance proposal to upgrade the RollApp to a new DRS version.
- Vote on the proposal.
- Update the RollApp binary.
- Migrate the RollApp using
roller
. - Start the RollApp again.
To determine the currnt rollapp DRS version, please run the following command:
rollappd q rollappparams params
Prerequisites
In order to create and vote on a governance proposal, the RollApp must have at least one governor. Governors can be created using the Portal by going to the Rollapp Page and clicking the Create New Governor
button in the Staking
tab.
Steps
Create the proposal
Create a proposal JSON file (e.g., proposal.json) with the following structure:
{
"title": "Update Dymension to DRS-<x>",
"description": "Upgrade Dymension to DRS-<x> version with scheduled upgrade time",
"summary": "This proposal aims to upgrade the Dymension rollapp to DRS <x>, implementing new features and improvements, with a scheduled upgrade time.",
"messages": [
{
"@type": "/rollapp.timeupgrade.types.MsgSoftwareUpgrade",
"authority": "<authority-address>",
"drs": <x>,
"upgrade_time": "2024-09-06T18:10:00Z"
}
],
"deposit": "1000arax",
"expedited": true
}
replace
<x>
with the desired DRS version (e.g 5)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
Voting can be done either using the portal or CLI. example CLI command (replace rol-user with your key name and arax with your rollapp denom):
rollappd tx gov vote 1 yes --from rol-user --keyring-backend test --fees 2000000000000arax
Update Binary
It's recommended to backup the roller data directory (usually located in ~/.roller
) before starting the upgrade process.
Wait for the upgrade to be executed. Once it is, the rollapp will panic with the following message:
panic: UPGRADE "drs-<x>" NEEDED at height: 100: {}
Stop the rollapp services:
roller rollapp services stop
Install the
DRS-<x>
new binary. replace<relevant-tag>
with the tag of the new DRS version (e.g v3.0.0-rc07-drs-4) and<relevant-repo>
with the repo of the rollapp (e.g https://github.com/dymensionxyz/rollapp-evm.git) and<rollapp-binary>
with the name of the rollapp binary (e.g rollapp-evm):git clone -b <relevant-tag> <relevant-repo>
cd <relevant-repo>
export BECH32_PREFIX=<rollapp_prefix> && make build BECH32_PREFIX=$BECH32_PREFIX
sudo cp ./build/<rollapp-binary> $(which rollappd)
Migrate RollApp in roller
roller rollapp migrate
Start the RollApp again
If you are running a full node, before starting the rollapp again in the background, you should first start it 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-x
version. Once the node has processed the upgrade_height
block, the full node can be stopped and run using roller as usual.
Start the node in the background:
roller rollapp services start
In case of a sequencer node, the node should start producing new blocks and submitting batches to Dymension.