Mainnet State Exported Testnet [Internal Only]
Testing Upgrades
Start a local mainnet node
- Download the latest polkachu snapshot from here
- Checkout the mainnet version of stride, build the binary, and then switch back to the working branch
# Ex: git checkout v28.0.0
git checkout {old-version}
make install
git checkout {working-branch}
- [Mac Only] Setup the home directory - this assumes the snapshot above is in you ~/Downloads folder
make setup-localstride-node
make start-localstride-node
- Kill the node once it's caught up to the latest block
- Export the current state
# Ex: STAGE=before UPGRADE_NAME=v29 make localstride-state-export
STAGE=before UPGRADE_NAME=v{UPGRADE_NAME} make localstride-state-export
- Backup the state files in case the upgrade fails, allowing restarting from a checkpoint
make backup-localstride
Upgrade the Node
- Testnetify the node and start it up again
# Ex: UPGRADE_NAME=v29 make upgrade-localstride
UPGRADE_NAME=v{UPGRADE_NAME} make upgrade-localstride
- This first repairs the node's last seen commit, which
strided in-place-testnet would otherwise
corrupt whenever the validator in slot 0 was absent from that block, panicking on startup with
converting seen commit: validator address is present. See localstride/fixseencommit for details
- Once the upgrade height is reached, it will crash
- Then kill it and build the new stride binary on the current branch
make install
- And start up the node with the new version
make start-localstride-node
- Kill it once again, and export the new state
STAGE=after UPGRADE_NAME=v{UPGRADE_NAME} make localstride-state-export
- View the logs and confirm the upgrade passed
- If it fails and you have to restart, kill it, restore the checkpoint and then re-run the upgrade command
make restore-localstride-backup
- Finally, compare the two export jsons in
localstride/exports