Skip to content

Commit

Permalink
New runtime spec_version format + backport of the bump to 1.4.0 (#2468
Browse files Browse the repository at this point in the history
)

## Overview

This PR aligns the `spec_version` formatting to the [recent
changes](https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R142)
made for the Polkadot/Kusama runtimes.

It also backports the latest version `v1.4.0` bumps as `1_004_000`.

## Details

During the switch from `v0.9` to `v1.x`, the format of the
`spec_version` was modified from: `(M)m_ppp` for a runtime considered on
version `M.m.pp`. For instance `0.9.42` had a `spec_version` of `9420`.

With the transition to `v1.x`, the format was changed to a bigger number
(still `u32`) formatted as `MM_mm_ppp` where `1.2.3` would be stored as
`01_02_003`.

This PR aligns the format with that has been introduced in the
fellowship repo: `MMM_mmm_ppp`.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
chevdor and bkchr authored Nov 27, 2023
1 parent cfa19c3 commit 4f8048b
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand All @@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemint"),
impl_name: create_runtime_str!("statemint"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand All @@ -127,7 +127,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("westmint"),
impl_name: create_runtime_str!("westmint"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-kusama"),
impl_name: create_runtime_str!("bridge-hub-kusama"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-polkadot"),
impl_name: create_runtime_str!("bridge-hub-polkadot"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-rococo"),
impl_name: create_runtime_str!("bridge-hub-rococo"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-westend"),
impl_name: create_runtime_str!("bridge-hub-westend"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("collectives"),
impl_name: create_runtime_str!("collectives"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("collectives-westend"),
impl_name: create_runtime_str!("collectives-westend"),
authoring_version: 1,
spec_version: 1_003_000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("contracts-rococo"),
impl_name: create_runtime_str!("contracts-rococo"),
authoring_version: 1,
spec_version: 10001,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("glutton"),
impl_name: create_runtime_str!("glutton"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("glutton-westend"),
impl_name: create_runtime_str!("glutton-westend"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
2 changes: 1 addition & 1 deletion cumulus/parachains/runtimes/starters/seedling/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("seedling"),
impl_name: create_runtime_str!("seedling"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down
2 changes: 1 addition & 1 deletion cumulus/parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("penpal-parachain"),
impl_name: create_runtime_str!("penpal-parachain"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("test-parachain"),
impl_name: create_runtime_str!("test-parachain"),
authoring_version: 1,
spec_version: 10000,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 6,
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("rococo"),
impl_name: create_runtime_str!("parity-rococo-v2.0"),
authoring_version: 0,
spec_version: 10020,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 22,
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("westend"),
impl_name: create_runtime_str!("parity-westend"),
authoring_version: 2,
spec_version: 10020,
spec_version: 1_004_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 22,
Expand Down

0 comments on commit 4f8048b

Please sign in to comment.