Summary
- Update versioning
- Create new branch with the format
release-vX.Y.Z
- Build branch using srtool
- Save output of srtool
- Create new release in Github, supplying the output from srtool
- Test runtime upgrade locally
- Perform runtime upgrade on live-chain
-
Update Versioning
- Create temporary branch to create PR from
- Change version in the following locations
runtime/common/Cargo.toml
runtime/devnet/Cargo.toml
runtime/mainnet/Cargo.toml
runtime/devnet/src/lib.rs
- update
spec_version
- update
runtime/mainnet/src/lib.rs
- update
spec_version
- update
- If the polkadot branch is changed,
node/Cargo.toml
- Cargo.toml uses
X.Y.Z
while thespec_version
field uses “XYYZ”. For example- Cargo.toml:
1.1.1
- spec_version:
1101
- Cargo.toml:
- To update the
node/Cargo.toml
file (only if the polkadot branch has changed)- If following (for example)
polkadot-v0.9.27
, then update the version to0.9.270
- For example, if updating to
polkadot-v0.9.33
, enter0.9.330
- Updates to the client requires a restart of collators
- If following (for example)
- Commit, and push changes
- Merge branch into main, assuming all checks passed
- It is good practice to run the following before merging
cargo fmt --all
cargo clippy --all --features runtime-benchmarks
cargo test
- and parachains-integration-tests
- It is good practice to run the following before merging
-
Create New Release Branch
- Create new branch with name
release-vX.Y.Z
. For example,- if the new version is
1.1.1
, then create branchrelease-v1.1.1
- if the new version is
- Create new branch with name
-
Build Branch
- Use the Deterministic Build to build the release branch with srtool.
-
After completion save the artifacts and copy the subwasm output
- If the following error is outputted:
error: the lock file /build/Cargo.lock needs to be updated but --locked was passed to prevent this
, the solution is to rebuild the project (locally) and push the updated Cargo.lock
- If the following error is outputted:
-
- Use the Deterministic Build to build the release branch with srtool.
-
Create New Release on Github
- Navigate to the release page
- Press “Draft a new release”
- Select the release branch in the “Target: release-vX.Y.Z” dropdown
- Create a new tag with the version (e.g.
v1.1.1
) - Provide the release title
- If it is just devnet, explicitly add that to the name
- For example, “Watr Devnet v1.1.0”
- Provide release details, such as what has been added, and any breaking changes.
- If the client was changed (
node/
) make sure to include that - Paste the srtool output
- Paste the subwasm output
- Include the .wasm file as an asset
-
Perform a Dry-Run Runtime Upgrade
- Build the previous release branch
- Start the network with zombienet
- Perform the runtime upgrade (using the wasm generated from srtool)
- After the runtime upgrade completes, ensure everything performs as expected
- It is recommended to run the
parachains-integration-tests
- It is recommended to run the
-
Perform the Real Runtime Upgrade
- Perform the runtime upgrade (using the wasm generated from srtool) on the live network