11# Release
22
3- The outputs of a release are the ` polkadot ` and ` polkadot-parachain ` node binaries, the runtimes for Westend & Rococo
4- and their system parachains, and new crate versions published to ` crates.io ` .
3+ The outputs of a stable release are:
4+
5+ - The binaries:
6+ - ` polkadot `
7+ - ` polkadot-execute-worker `
8+ - ` polkadot-prepare-worker `
9+ - ` polkadot-parachain `
10+ - ` polkadot-omni-node `
11+ - ` chain-spec-builder `
12+ - ` frame-omni-bencher `
13+
14+ built for the ` x86_64-unknown-linux-gnu ` and ` aarch64-apple-darwin ` targets. The gpg signatures and sha256 checksums.
15+
16+ - The runtimes for Westend and its system parachains.
17+ - The new crate versions published to ` crates.io ` .
18+ - Debian package for the Polkadot binary.
19+ - Docker images for:
20+ - ` polkadot ` (includes ` polkadot-execute-worker ` & ` polkadot-prepare-worker ` )
21+ - ` polkadot-parachain `
22+ - ` polkadot-omni-node `
23+ - ` chain-spec-builder `
24+
25+
26+ # Timeline
27+ ` Stable ` releases are scheduled on a quarterly basis, usually by the end of the last month of each quarter. The exact
28+ schedule can be found on the [ Release Registry] ( https://github.com/paritytech/release-registry/ ) .It is possible to
29+ subscribe to a [ calendar link] ( https://raw.githubusercontent.com/paritytech/release-registry/main/releases-v1.ics )
30+ to have it in your personal calendar.
31+
32+ Each stable release is supported for a period of one year from its first release. For example, ` Polkadot stable2412 `
33+ was released on ` 2024-12-17 ` and its end of life is set to ` 2025-12-16 ` .
34+
35+ During this period, each stable release is updated with patch releases, which are scheduled on a monthly basis
36+ and contain fixes for any bugs that may be found.
37+
38+ ℹ️ Note: the binaries and runtimes (if needed) are only provided for the latest ` stable ` release, for the previous
39+ releases only the crates.io release takes place.
40+
41+ This three month period between ` stable ` releases includes a 1.5 month QA period. This means that for each upcoming
42+ ` stable ` release, the branch from which that release will be made is created 1.5 months before the release date.
43+ This time is used to test the upcoming release candidate and find any issues that may arise with publishing crates
44+ to crates.io, binary artifacts and template synchronisation before the final release. The findings should be fixed
45+ and backported to the release branch. During this time, multiple release candidates may be built and rolled out.
546
647# Setup
748
8- We have two branches: ` master ` and ` stable ` . ` master ` is the main development branch where normal Pull Requests are
9- opened. Developers need to mostly only care about this branch.
10- The ` stable ` branch contains a version of the code that is ready to be released. Its contents are always audited.
11- Merging to it is restricted to [ Backports] ( #backports ) .
49+ We have two types of branches related to the releases: ` master ` and ` stableYYMM ` :
50+ - ` master ` is the main development branch where normal Pull Requests are opened. Developers need to mostly only care
51+ about this branch.
52+ - ` stableYYMM ` branch contains a version of the code that is ready to be released. Each ` stableYYMM ` branch corresponds
53+ to the corresponding stable release, which is in the maintenance or in a QA period. Its contents should be always
54+ audited. Merging to it is restricted to [ Backports] ( #backports ) .
1255
1356# Versioning
1457
1558We are releasing multiple different things from this repository in one release, but we don't want to use the same
16- version for everything. Thus, in the following we explain the versioning story for the crates, node and Westend &
17- Rococo.
59+ version for everything. Thus, in the following we explain the versioning story for the crates, node and Westend.
1860
19- To easily refer to a release, it shall be named by its date in the form ` stableYYMM ` . Patches to stable releases are
20- tagged in the form of ` stableYYMM-PATCH ` , with ` PATCH ` ranging from 1 to 99. For example, the fourth patch to
21- ` stable2409 ` would be ` stable2409-4 ` .
61+ To easily refer to a release, it shall be named by its date in the form ` Polkadot stableYYMM` . Patches to stable releases
62+ are tagged in the form of ` Polkadot stableYYMM-PATCH` , with ` PATCH ` ranging from 1 to 99. For example, the fourth patch
63+ to ` Polkadot stable2409` would be ` Polkadot stable2409-4` .
2264
2365## Crate
2466
2567We try to follow [ SemVer 2.0.0] ( https://semver.org/ ) as best as possible for versioning our crates. The definitions of
2668` major ` , ` minor ` and ` patch ` version for Rust crates are slightly altered from their standard for pre ` 1.0.0 ` versions.
27- Quoting [ rust-lang.org] ( https://doc.rust-lang.org/cargo/reference/semver.html ) :
69+ Quoting [ rust-lang.org] ( https://doc.rust-lang.org/cargo/reference/semver.html ) :
2870
29- > Initial development releases starting with “ 0.y.z” can treat changes in “y” as a major release, and “z” as a minor
30- release. “ 0.0.z” releases are always major changes. This is because Cargo uses the convention that only changes in the
71+ > Initial development releases starting with " 0.y.z" can treat changes in "y" as a major release, and "z" as a minor
72+ release. " 0.0.z" releases are always major changes. This is because Cargo uses the convention that only changes in the
3173left-most non-zero component are considered incompatible.
3274
3375SemVer requires a piece of software to first declare a public API. The public API of the Polkadot SDK
@@ -41,19 +83,19 @@ Inductively, the public API of our library crates is declared as all public item
4183## Node
4284
4385The versioning of the Polkadot node is done most of the time by only incrementing the ` minor ` version. The ` major `
44- version is only bumped for special releases and the ` patch ` can be used for an out of band release that fixes some
45- critical bug . The node version is not following SemVer. This means that the version doesn't express if there are any
46- breaking changes in the CLI interface or similar. The node version is declared in the
47- [ ` NODE_VERSION ` ] ( https://paritytech.github.io/polkadot-sdk/master/polkadot_node_primitives/constant.NODE_VERSION.html )
86+ version is only bumped for special releases and the ` patch ` is used for a patch release that happens every month and
87+ fixes found issues . The node version is not following SemVer. This means that the version doesn't express if there are
88+ any breaking changes in the CLI interface or similar. The node version is declared
89+ in the [ ` NODE_VERSION ` ] ( https://paritytech.github.io/polkadot-sdk/master/polkadot_node_primitives/constant.NODE_VERSION.html )
4890variable.
4991
50- ## Westend & Rococo
92+ ## Westend
5193
52- For these networks , in addition to incrementing the ` Cargo.toml ` version we also increment the ` spec_version ` and
94+ For the Westene testnet , in addition to incrementing the ` Cargo.toml ` version we also increment the ` spec_version ` and
5395sometimes the ` transaction_version ` . The spec version is also following the node version. Its schema is: ` M_mmm_ppp ` and
5496for example ` 1_002_000 ` is the node release ` 1.2.0 ` . This versioning has no further meaning, and is only done to map
55- from an on chain ` spec_version ` easily to the release in this repository.
56- The Westend testnet will be updated to a new runtime every two weeks with the latest ` nightly ` release.
97+ from an on chain ` spec_version ` easily to the release in this repository.
98+
5799
58100# Backports
59101
@@ -66,8 +108,10 @@ also have `major` version bumps through backports.
66108
67109** From ` stable ` to ` master ` **
68110
69- Should not be needed since all changes first get merged into ` master ` . The ` stable ` branch can get out of sync and will
70- be synced with the [ Clobbering] ( #clobbering ) process.
111+ Backports to ` master ` only happen after a ` stable ` or ` patch ` release has been made for the current stable release,
112+ and include node version and spec version bumps, plus reorganizing the prdoc files
113+ (they should go into the appropriate release folder under the [ prdoc] ( ./proc ) folder).
114+ This is done by the release team to keep things organized. Developers need not to care about such backports.
71115
72116# Processes
73117
@@ -77,7 +121,8 @@ Release Coordination* Matrix channel. All processes should be automated as much
77121
78122## Crate Bumping
79123
80- Cadence: (possibly) each Pull Request. Responsible: Developer that opened the Pull Request.
124+ Cadence: currently every 3 months for new ` stable ` releases and monthly for existing ` stables ` .
125+ Responsible: Developer that opened the Pull Request.
81126
82127Following SemVer isn't easy, but there exists [ a guide] ( https://doc.rust-lang.org/cargo/reference/semver.html ) in the
83128Rust documentation that explains the small details on when to bump what. This process is supported with a CI check that
@@ -86,80 +131,51 @@ utilizes [`cargo-semver-checks`](https://github.com/obi1kenobi/cargo-semver-chec
86131### Steps
87132
881331 . Developer opens a Pull Request with changed crates against ` master ` .
89- 1 . They bump all changed crates according to SemVer. Note that this includes any crates that expose the changed
90- behaviour in their * public API* and also transitive dependencies for whom the same rule applies.
134+ 2 . They mention the type of the bump of all changed crates according to SemVer in the prdoc file attached to the PR.
135+ Note that this includes any crates that expose the changed behaviour in their * public API* and also transitive dependencies
136+ for whom the same rule applies.
137+ 3 . The bump itself happens during the release and is done by a release engineer using the
138+ [ Parity-Publish] ( https://github.com/paritytech/parity-publish ) tool.
91139
92140## Stable Release
93141
94- Cadence: every two weeks . Responsible: Release Team.
142+ Cadence: every 3 months for new ` stable ` releases and monthly for existing ` stables ` . Responsible: Release Team.
95143
96- This process aims to release the ` stable ` branch as a * Stable * release every two weeks.
144+ ### Steps to execute a new stable release
97145
98- ### Steps
146+ From the main Polkadot-sdk repository in the paritytech org:
147+
148+ 1 . On the cut-off date, create a new branch with the name ` satbleYYMM `
149+ using [ Branch-off stable flow] ( /.github/workflows/release-10_branchoff-stable.yml )
150+ 2 . Create a new rc tag from the stable branch using [ RC Automation flow] ( /.github/workflows/release-11_rc-automation.yml )
151+
152+ From the forked Polkadot-sdk repository in the [ paritytech-release org] ( https://github.com/paritytech-release/polkadot-sdk/actions ) :
153+
154+ 1 . Sync the forks before continuing with the release using
155+ [ Sync the forked repo with the upstream] ( https://github.com/paritytech-release/polkadot-sdk/actions/workflows/fork-sync-action.yml )
156+ 2 . To build binaries trigger [ Release - Build node release candidate] ( /.github/workflows/release-20_build-rc.yml )
157+ 3 . When an rc build is ready to trigger [ Release - Publish draft] ( /.github/workflows/release-30_publish_release_draft.yml )
158+ to create a new release draft for the upcoming rc
159+ 4 . When the release is finalized and ready to go, publish crates using ` parity-publish ` tool and push changes
160+ to the release branch
161+ 5 . Repeat steps 1-3 to prepare the rc
162+ 6 . Trigger [ Release - Promote RC to final candidate on S3] ( /.github/workflows/release-31_promote-rc-to-final.yml )
163+ to have it as a final rc on the S3
164+ 7 . Publish deb package for the ` polakdot ` binary using
165+ [ Release - Publish polakdot deb package] ( /.github/workflows/release-40_publish-deb-package.yml )
166+ 8 . Adjust the release draft and publish release on the GitHub.
167+ 9 . Publish docker images using [ Release - Publish Docker Image] ( /.github/workflows/release-50_publish-docker.yml )
99168
100- 1 . Check and execute process [ Clobbering] ( #clobbering ) , if needed.
101- 2 . Check if there were any changes since the last release and abort, if not.
102- 3 . Check out the latest commit of ` stable ` .
103- 4 . Update the ` CHANGELOG.md ` version, date and compile the content using the PrDoc files.
104- 5 . Open a Pull Request against ` stable ` for visibility of the release happening.
105- 6 . Internal QA from the release team can happen here.
106- 7 . Do a dry-run release to ensure that it * should* work.
107- 8 . Comment in the Pull Request that a * Stable* release will happen from the merged commit hash.
108- 9 . Release all changed crates to crates.io.
109- 10 . Create the release ` stableYYYYMMDD ` on GitHub. Note that the Fellowship has a streamlined process that combines the
110- two last steps. A similar approach should be taken here.
111-
112- ## Nightly Release
113-
114- Cadence: every day at 00:00 UTC+1. Responsible: Release Team
115-
116- This process aims to release the ` master ` branch as a * Nightly* release. The process can start at 00:00 UTC+1 and should
117- automatically do the following steps.
118-
119- 1 . Check out the latest commit of branch ` master ` .
120- 2 . Compare this commit to the latest ` nightly* ` tag and abort if there are no changes detected.
121- 3 . Set the version of all crates that changed to ` major.0.0-nightlyYYMMDD ` where ` major ` is the last released ` major `
122- version of that crate plus one.
123- 4 . Patch the dependencies of the changed crates to point to the newest version of the dependency.
124- 5 . Tag this commit as ` nightlyYYMMDD ` .
125- 6 . Do a dry-run release to ensure that it * should* work.
126- 7 . Push this tag (the commit will not belong to any branch).
127- 8 . Release all crates that had changed to crates.io.
128-
129- ## Clobbering
130-
131- Cadence: every 6th release (~ 3 months). Responsible: Release Team
132-
133- This process aims to bring branch ` stable ` in sync with the latest audited commit of ` master ` . It is not done via a Pull
134- Request but rather by just copying files. It should be automated.
135- The following script is provided to do the clobbering. Note that it keeps the complete history of all past clobbering
136- processes.
137-
138- ``` bash
139- # Ensure we have the latest remote data
140- git fetch
141- # Switch to the stable branch
142- git checkout stable
143-
144- # Delete all tracked files in the working directory
145- git ls-files -z | xargs -0 rm -f
146- # Find and delete any empty directories
147- find . -type d -empty -delete
148-
149- # Get the last audited commit
150- AUDITED=$( git rev-parse --short=10 origin/audited)
151- # Grab the files from the commit
152- git checkout $AUDITED -- .
153-
154- # Stage, commit, and push the working directory which now matches 'audited' 1:1
155- git add .
156- git commit -m " Clobbering with audited ($AUDITED )"
157- git push
158- ```
159-
160- ## Bug and Security Fix
161-
162- Cadence: n.a. Responsible: Developer
169+ From the main Polkadot-sdk repository in the paritytech org:
170+
171+ 1 . Synchronize templates using [ Synchronize templates] ( /.github/workflows/misc-sync-templates.yml )
172+ 2 . Update the [ Release Registry] ( https://github.com/paritytech/release-registry/ )
173+ follwoing the [ instructions] ( https://github.com/paritytech/release-registry?tab=readme-ov-file#maintenance )
174+ in the repo with the actual release dates.
175+
176+ ## Patch release for the latest stable version
177+
178+ Cadence: every month. Responsible: Developer
163179
164180Describes how developers should merge bug and security fixes.
165181
@@ -170,5 +186,10 @@ Describes how developers should merge bug and security fixes.
1701863 . Audit happens with priority.
1711874 . It is merged into ` master ` .
1721885 . Dev adds the ` A4-needs-backport ` label.
173- 6 . It is automatically back-ported to ` stable ` .
174- 7 . The fix will be released in the next * Stable* release. In urgent cases, a release can happen earlier.
189+ 6 . It is automatically back-ported to ` stable ` and merged by a release engineer.
190+ 7 . The fix will be released in the next * Stable patch* release. In urgent cases, a release can happen earlier.
191+
192+ The release itself is similar to [ the new stable release] ( #steps-to-execute-a-new-stable-release ) process without
193+ the branching-off step, as the branch already exists and depending on the patch
194+ (whether it is for the current ` stable ` release or one of the previous ones) the binary build can be skipped
195+ and only crates and GitHub publishing is done.
0 commit comments