Skip to content

[Add] - runtime upgrade tutorial #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 8, 2025

Conversation

nhussein11
Copy link
Collaborator

This PR adds a tutorial for performing runtime upgrades as part of the zero to hero tutorials.

This is a follow up of #756, so please, let's merge that first

This PR is needed to solve #689.

@nhussein11 nhussein11 self-assigned this Jul 1, 2025
@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 11:44
@nhussein11 nhussein11 requested a review from a team as a code owner July 1, 2025 11:44
@nhussein11 nhussein11 added B0 - Needs Review Pull request is ready for review C1 - Medium Medium priority task A0 - New Content Pull request contains new content pages labels Jul 1, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new tutorial on performing runtime upgrades for Polkadot SDK-based chains, integrates it into the existing zero-to-hero series, and updates navigation and documentation indices.

  • Introduces runtime-upgrade.md with step-by-step guidance to add a reset_counter dispatchable, bump runtime versions, submit via sudo/governance, and verify the upgrade.
  • Updates the tutorial navigation (.pages) and LLMS index (llms.txt) to include the new “Runtime Upgrade” entry.
  • Adds a termynal snippet (runtime-compilation.html) to show WASM build artifacts, plus minor line-reference updates in existing tutorials.

Reviewed Changes

Copilot reviewed 8 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tutorials/polkadot-sdk/parachains/zero-to-hero/runtime-upgrade.md New tutorial on runtime upgrades
tutorials/polkadot-sdk/parachains/zero-to-hero/.pages Adds “Runtime Upgrade” to navigation
tutorials/polkadot-sdk/parachains/zero-to-hero/llms.txt Registers the new tutorial URL for LLMS
.snippets/code/.../runtime-upgrade/runtime-compilation.html Adds terminal snippet for WASM build output
tutorials/polkadot-sdk/parachains/zero-to-hero/pallet-unit-testing.md Updates code reference line numbers
tutorials/polkadot-sdk/parachains/zero-to-hero/pallet-benchmarking.md Pins frame-omni-bencher to v0.10.0 and updates hl_lines
tutorials/polkadot-sdk/parachains/zero-to-hero/build-custom-pallet.md Updates code reference line numbers
tutorials/polkadot-sdk/parachains/zero-to-hero/add-pallets-to-runtime.md Adjusts code reference hl_lines and minor phrasing
Comments suppressed due to low confidence (4)

tutorials/polkadot-sdk/parachains/zero-to-hero/runtime-upgrade.md:79

  • The comment refers to the “decrement action” but the test is checking an increment. Update it to reflect the increment action (e.g., “Ensure the event matches the increment action”).
        // Ensure the event matches the decrement action

tutorials/polkadot-sdk/parachains/zero-to-hero/runtime-upgrade.md:116

  • [nitpick] This heading duplicates an earlier section title. Consider renaming it to something more specific (e.g., “Update Runtime Configuration”) to avoid confusion.
### Update the Runtime 

tutorials/polkadot-sdk/parachains/zero-to-hero/runtime-upgrade.md:179

  • The list numbering jumps from 1 to 3, which may confuse readers. Change “3.” to “2.” to maintain proper sequence.
3. Click on the **Developer** and select the **Extrinsics** option in the dropdown

tutorials/polkadot-sdk/parachains/zero-to-hero/.pages:8

  • [nitpick] The navigation list has an extra dash and inconsistent indentation here. Align this entry with the other list items for consistent YAML formatting.
  - 'Pallet Benchmarking': pallet-benchmarking.md

Copy link
Contributor

@brunopgalvao brunopgalvao left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-07-08 at 10 13 30 AM
Pallet Benchmarking should point to Runtime Upgrade page in the Where to go Next section.

Copy link

github-actions bot commented Jul 8, 2025

🔍 Documentation URL Checker

This PR modifies documentation files in ways that could potentially create broken links.

Deleted files:

develop/smart-contracts/dev-environments/foundry.md

🚨 Please review these changes carefully 🚨

If not handled properly, broken links (404 errors) could appear. To maintain a smooth user experience, consider:

  • Adding redirects in the mkdocs.yml file from the old URLs to the new ones
  • Updating internal references to these files

Copy link

github-actions bot commented Jul 8, 2025

🔍 Documentation URL Checker

This PR modifies documentation files in ways that could potentially create broken links.

Deleted files:

develop/smart-contracts/dev-environments/foundry.md

🚨 Please review these changes carefully 🚨

If not handled properly, broken links (404 errors) could appear. To maintain a smooth user experience, consider:

  • Adding redirects in the mkdocs.yml file from the old URLs to the new ones
  • Updating internal references to these files

@nhussein11
Copy link
Collaborator Author

Pallet Benchmarking should point to Runtime Upgrade page in the Where to go Next section.
Nice catch! Thank you, fixed in 2ef117a

@dawnkelly09
Copy link
Collaborator

🔍 Documentation URL Checker

This PR modifies documentation files in ways that could potentially create broken links.

Deleted files:

develop/smart-contracts/dev-environments/foundry.md

🚨 Please review these changes carefully 🚨

If not handled properly, broken links (404 errors) could appear. To maintain a smooth user experience, consider:

  • Adding redirects in the mkdocs.yml file from the old URLs to the new ones
  • Updating internal references to these files

I checked for anything linking to the now removed Foundry page but didn't find anything I think this is ok.

@dawnkelly09 dawnkelly09 self-requested a review July 8, 2025 14:53
Copy link
Collaborator

@dawnkelly09 dawnkelly09 left a comment

Choose a reason for hiding this comment

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

🚀

@dawnkelly09 dawnkelly09 added B1 - Ready to Merge Pull request is ready to be merged and removed B0 - Needs Review Pull request is ready for review labels Jul 8, 2025
@eshaben eshaben merged commit 81ab749 into master Jul 8, 2025
9 checks passed
@eshaben eshaben deleted the nhussein11/add-runtime-upgrade-tutorial branch July 8, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0 - New Content Pull request contains new content pages B1 - Ready to Merge Pull request is ready to be merged C1 - Medium Medium priority task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants