Skip to content

mainnet - runtime version bump#4428

Merged
Lezek123 merged 4 commits intoJoystream:mainnetfrom
mnaamani:mainnet-update-from-carthage
Nov 10, 2022
Merged

mainnet - runtime version bump#4428
Lezek123 merged 4 commits intoJoystream:mainnetfrom
mnaamani:mainnet-update-from-carthage

Conversation

@mnaamani
Copy link
Copy Markdown
Member

@mnaamani mnaamani commented Nov 8, 2022

  • Bump runtime and binaries versions (84ce9f8)
  • Configure playground runtime to have single council seat (84ce9f8)
  • Update from carthage branch

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Nov 10, 2022 at 5:16AM (UTC)

Comment on lines +149 to +151
authoring_version: 12,
// cartahge liberated + 1
spec_version: 6,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by this change, I understand authoring_version being set to 12, but why is spec_version set to 6? Shouldn't the spec_version reset to 0 if the authoring_version changes? And if so, I understand we would have:

  • spec_version: 0 for Frozen/Thawn
  • spec_version: 1 for Supervised
  • spec_version: 2 for Liberated
  • spec_version: 3 for post-liberated (?) (like enabling bounties etc.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is true we have always reset spec version back to 0 on new chains and bumping the authoring version.
I think this was not the right approach, if you observe substrate/polkadot/kusama runtime spec versions they always increment, even when they were going through staging/testnets.

Another reason to always increment is because of a suspicion I have about how polkadot-js/app and extension detects new metadata updates seems to be dependent on spec version (as well as chain name) so it seems safer to not return to older spec versions at least.

Am I overthinking this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm not very familiar with how polkadot{js} extension works, so perhaps it is safer to not reuse spec_versions.
But if we're trying to predict what number will be correct if we always increment by 1 it becomes hard to manage I think.
Polkadot/Kusama seems to use the approach where spec_version is the version that matches the "release version", like v0.9.29 => 9290 etc., perhaps we should use a similar approach?

Something like {chain_version}.{release_version}.{minor_version} with 00.00.00 semantic, so for example Carthage could start with 120000, then last stage of Carthage would be 120002 (liberated), then mainnet starts from 130000, then 130002 would be liberated, 130100 could be the next major release after mainnet, like Ephesus etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually now that I think about this, it's probably better to keep the current versioning for Carthage, but just start this spec versioning on mainnet with 10000?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your suggestion. A while back I considered a similar scheme, even tried to find a workable scheme that takes into account different runtime profiles (staging, testing, production). The gist was that production runtime starts at high number, and the others at low numbers. This would prevent you from accidentally doing a runtime upgrade to a different profile since system::set_code prevents upgrading to a runtime with lower spec version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been following a convention for release and runtime cargo.toml versioning for the github release also: https://github.com/Joystream/joystream/releases

# Follow convention: https://github.com/Joystream/substrate-runtime-joystream/issues/1
# {Authoring}.{Spec}.{Impl} of the RuntimeVersion
version = '12.1000.0'

Shall we stick with this, and start mainnet spec version at 1000 ?

Copy link
Copy Markdown
Contributor

@Lezek123 Lezek123 Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main question in this case is what would be the semantics of {Spec}?
Would it be like {SpecMajor}.{SpecMinor}.{SpecPatch}, with 1000 meaning 1.00.0?
So let's say:

  • 12.1000.0 is frozen mainnet
  • 12.1010.0 is supervised mainnet
  • 12.1011.0 could be some supervised-stage hotfix for example
  • 12.1020.0 is liberated mainnet
  • 12.1030.0 is post-liberated mainnet
  • 12.2000.0 is Ephesus (to signify it's a major release an also allow us not having to predict how many other smaller upgrades / patches there will be between mainnet and Ephesus)

I think this should work

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that looks like a nice scheme. Double checked that type of spec_version, is at least u32 so we don't run into problems.

@mnaamani mnaamani changed the title Mainnet update from carthage mainnet - runtime version bump Nov 9, 2022
@mnaamani
Copy link
Copy Markdown
Member Author

mnaamani commented Nov 9, 2022

I opened #4431 @Lezek123 if you want that can be merged first, I'll then update this PR to only have the changes noted in opening comment?

@mnaamani mnaamani requested a review from Lezek123 November 10, 2022 05:21
Copy link
Copy Markdown
Contributor

@Lezek123 Lezek123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lezek123 Lezek123 merged commit 76994e0 into Joystream:mainnet Nov 10, 2022
@Lezek123 Lezek123 mentioned this pull request Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants