Skip to content
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

Runtime Upgrade ref docs and Single Block Migration example pallet #1554

Merged
merged 110 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
a9673c7
improve metadata docs
liamaharon Sep 13, 2023
e22a2e2
improve hooks docs
liamaharon Sep 13, 2023
c6a6984
add storage_alias docs
liamaharon Sep 13, 2023
b617ce9
wip: storage migrations example pallet
liamaharon Sep 13, 2023
37e45d4
dont export unversioned migrations
liamaharon Sep 13, 2023
22fe899
patterns preventing accidental usage of unversioned migrations
liamaharon Sep 14, 2023
3ef233f
Merge branch 'master' of github.com:paritytech/polkadot-sdk into liam…
liamaharon Sep 14, 2023
76c9150
private unversioned migrations
liamaharon Sep 14, 2023
d98a0fd
docs
liamaharon Sep 14, 2023
48100f0
docs
liamaharon Sep 14, 2023
986f0bd
note about pub(crate)
liamaharon Sep 14, 2023
548316c
migration safely docs
liamaharon Sep 14, 2023
4925243
typo
liamaharon Sep 14, 2023
7d75a75
docs
liamaharon Sep 14, 2023
6858f3c
docs
liamaharon Sep 14, 2023
8446ad2
doctest false
liamaharon Sep 14, 2023
bdb1ae5
note on chopsticks
liamaharon Sep 14, 2023
35b08fd
fix society tests
liamaharon Sep 14, 2023
1fa5207
zepter
liamaharon Sep 14, 2023
ebf4cd5
fix feature propagation
liamaharon Sep 14, 2023
3f55db7
add licences
liamaharon Sep 14, 2023
ca0e4e3
format features
liamaharon Sep 14, 2023
34da4a0
fix doc visibility issue
liamaharon Sep 14, 2023
009a958
improve docs
liamaharon Sep 14, 2023
1aa3555
fix std propagataion
liamaharon Sep 14, 2023
fc08b0e
zepter
liamaharon Sep 14, 2023
01b780a
fix broken link
liamaharon Sep 14, 2023
adcfeaf
dont ref private item
liamaharon Sep 14, 2023
655b376
dont ref private doc item
liamaharon Sep 14, 2023
8335171
doc build
liamaharon Sep 14, 2023
3fff7fb
Update substrate/frame/examples/storage-migrations/src/mock.rs
liamaharon Sep 16, 2023
3bd0ef2
Update substrate/frame/examples/src/lib.rs
liamaharon Sep 17, 2023
1a54755
docify
liamaharon Sep 17, 2023
222ed3a
derive_impl
liamaharon Sep 17, 2023
4a070fd
fix derive_impl
liamaharon Sep 20, 2023
f66f9e2
improve docs
liamaharon Sep 20, 2023
70a9da4
set dbweight
liamaharon Sep 20, 2023
d915026
clean up pallet
liamaharon Sep 20, 2023
a596074
module visibility
liamaharon Sep 20, 2023
0cf19ac
fix comment
liamaharon Sep 20, 2023
fe92288
fix comment
liamaharon Sep 20, 2023
0dc8a60
fix comment
liamaharon Sep 20, 2023
e3e4940
better naming
liamaharon Sep 20, 2023
0fe21d5
better naming
liamaharon Sep 20, 2023
92e43ac
fix wasm build
liamaharon Sep 20, 2023
55f876d
cargo fmt
liamaharon Sep 20, 2023
4819209
format features
liamaharon Sep 20, 2023
59d7352
set uniques storage version
liamaharon Sep 20, 2023
f16f628
fix asset hub storage versions
liamaharon Sep 20, 2023
bbae7ef
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Nov 28, 2023
7d4da68
merge
liamaharon Nov 28, 2023
eaa6aca
update cargo.lock
liamaharon Nov 28, 2023
8cafd48
reset polkadot-asset-hub-runtime
liamaharon Nov 28, 2023
a6c6781
fix merge
liamaharon Nov 28, 2023
fbdb77c
fix up merge
liamaharon Nov 28, 2023
e9aa91a
remove kusama runtime
liamaharon Nov 28, 2023
d135244
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Nov 29, 2023
7a23c5f
update cargo.lock
liamaharon Nov 29, 2023
c120f47
fix build
liamaharon Nov 29, 2023
a4c2ca3
rename single block migrations
liamaharon Nov 29, 2023
4275503
runtime upgrade ref docs
liamaharon Nov 30, 2023
48605c7
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Nov 30, 2023
2c014e7
version
liamaharon Nov 30, 2023
9f46c00
comment
liamaharon Nov 30, 2023
ef12e3e
note on version
liamaharon Nov 30, 2023
4881a0a
berevity
liamaharon Nov 30, 2023
e5ff5b2
brevity
liamaharon Nov 30, 2023
3f31c6b
Update substrate/frame/examples/single-block-migrations/Cargo.toml
liamaharon Dec 1, 2023
802aae3
Update substrate/frame/examples/single-block-migrations/src/lib.rs
liamaharon Dec 1, 2023
7aca6b6
Update substrate/frame/support/procedural/src/lib.rs
liamaharon Dec 1, 2023
564664e
Update substrate/frame/examples/single-block-migrations/src/runtime_u…
liamaharon Dec 1, 2023
dfa7f36
Update substrate/frame/examples/single-block-migrations/src/lib.rs
liamaharon Dec 1, 2023
b6d71a8
Update substrate/frame/examples/single-block-migrations/src/migration…
liamaharon Dec 1, 2023
4651a7e
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Dec 1, 2023
eaa427a
format toml
liamaharon Dec 1, 2023
406fad7
address comment
liamaharon Dec 1, 2023
4be8f4d
address comment
liamaharon Dec 1, 2023
a8df9cd
address comment
liamaharon Dec 1, 2023
8f32ece
add benchmark note
liamaharon Dec 1, 2023
ec3ce8c
take
liamaharon Dec 1, 2023
0ae45d8
fix typo
liamaharon Dec 1, 2023
f5ac289
address comment
liamaharon Dec 1, 2023
7f21f42
current storage version -> in_code storage version
liamaharon Dec 1, 2023
050f465
try fix ci
liamaharon Dec 1, 2023
91f80eb
rename
liamaharon Dec 1, 2023
66d2745
feature propagarion
liamaharon Dec 1, 2023
1a2d834
fix unused import wanrings
liamaharon Dec 1, 2023
69e4209
fix typo
liamaharon Dec 1, 2023
6c50902
Merge branch 'master' of github.com:paritytech/polkadot-sdk into liam…
liamaharon Dec 7, 2023
52963fa
fix merge
liamaharon Dec 7, 2023
dfe32c5
move reference doc to correct place
liamaharon Dec 7, 2023
2d08759
".git/.scripts/commands/fmt/fmt.sh"
Dec 7, 2023
2fadaad
prdoc
liamaharon Dec 7, 2023
fc9d605
Merge branch 'liam-migrations-reference-docs' of github.com:paritytec…
liamaharon Dec 7, 2023
8108b8e
fix prdoc
liamaharon Dec 7, 2023
a655cd8
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Dec 7, 2023
03b7735
keep current_storage_version around for 3 months
liamaharon Dec 7, 2023
27414b4
Merge branch 'liam-migrations-reference-docs' of github.com:paritytec…
liamaharon Dec 7, 2023
a6c1dc6
improve deprecation msg
liamaharon Dec 7, 2023
d8f5a38
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Jan 18, 2024
319b32d
update cargo.lock
liamaharon Jan 18, 2024
85860cf
Merge branch 'master' into liam-migrations-reference-docs
liamaharon Feb 28, 2024
65082f9
update cargo.lock
liamaharon Feb 28, 2024
5b0bc65
rename
liamaharon Feb 28, 2024
d76e813
address comments
liamaharon Feb 28, 2024
26bf39f
address comments
liamaharon Feb 28, 2024
c588805
address comments and make compile
liamaharon Feb 28, 2024
3aa6ccd
Update docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrati…
liamaharon Feb 28, 2024
0f63e03
address comment
liamaharon Feb 28, 2024
a97071b
Merge branch 'liam-migrations-reference-docs' of github.com:paritytec…
liamaharon Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ members = [
"substrate/frame/examples/frame-crate",
"substrate/frame/examples/kitchensink",
"substrate/frame/examples/offchain-worker",
"substrate/frame/examples/single-block-migrations",
"substrate/frame/examples/split",
"substrate/frame/executive",
"substrate/frame/fast-unstake",
Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub mod pallet {
use sp_staking::SessionIndex;
use sp_std::vec::Vec;

/// The current storage version.
/// The in-code storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);

type BalanceOf<T> =
Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/parachain-system/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use frame_support::{
weights::Weight,
};

/// The current storage version.
/// The in-code storage version.
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2);

/// Migrates the pallet storage to the most recent version.
Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/xcmp-queue/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use frame_support::{
weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, Weight},
};

/// The current storage version.
/// The in-code storage version.
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);

pub const LOG: &str = "runtime::xcmp-queue-migration";
Expand Down
2 changes: 1 addition & 1 deletion cumulus/parachains/pallets/collective-content/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub mod pallet {
use frame_system::pallet_prelude::*;
use sp_runtime::{traits::BadOrigin, Saturating};

/// The current storage version.
/// The in-code storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(0);

#[pallet::pallet]
Expand Down
14 changes: 7 additions & 7 deletions cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,37 +965,37 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions {
let mut writes = 0;

if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) {
PolkadotXcm::current_storage_version().put::<PolkadotXcm>();
PolkadotXcm::in_code_storage_version().put::<PolkadotXcm>();
writes.saturating_inc();
}

if Multisig::on_chain_storage_version() == StorageVersion::new(0) {
Multisig::current_storage_version().put::<Multisig>();
Multisig::in_code_storage_version().put::<Multisig>();
writes.saturating_inc();
}

if Assets::on_chain_storage_version() == StorageVersion::new(0) {
Assets::current_storage_version().put::<Assets>();
Assets::in_code_storage_version().put::<Assets>();
writes.saturating_inc();
}

if Uniques::on_chain_storage_version() == StorageVersion::new(0) {
Uniques::current_storage_version().put::<Uniques>();
Uniques::in_code_storage_version().put::<Uniques>();
writes.saturating_inc();
}

if Nfts::on_chain_storage_version() == StorageVersion::new(0) {
Nfts::current_storage_version().put::<Nfts>();
Nfts::in_code_storage_version().put::<Nfts>();
writes.saturating_inc();
}

if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) {
ForeignAssets::current_storage_version().put::<ForeignAssets>();
ForeignAssets::in_code_storage_version().put::<ForeignAssets>();
writes.saturating_inc();
}

if PoolAssets::on_chain_storage_version() == StorageVersion::new(0) {
PoolAssets::current_storage_version().put::<PoolAssets>();
PoolAssets::in_code_storage_version().put::<PoolAssets>();
writes.saturating_inc();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1019,17 +1019,17 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions {
let mut writes = 0;

if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) {
PolkadotXcm::current_storage_version().put::<PolkadotXcm>();
PolkadotXcm::in_code_storage_version().put::<PolkadotXcm>();
writes.saturating_inc();
}

if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) {
ForeignAssets::current_storage_version().put::<ForeignAssets>();
ForeignAssets::in_code_storage_version().put::<ForeignAssets>();
writes.saturating_inc();
}

if PoolAssets::on_chain_storage_version() == StorageVersion::new(0) {
PoolAssets::current_storage_version().put::<PoolAssets>();
PoolAssets::in_code_storage_version().put::<PoolAssets>();
writes.saturating_inc();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions {
let mut writes = 0;

if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) {
PolkadotXcm::current_storage_version().put::<PolkadotXcm>();
PolkadotXcm::in_code_storage_version().put::<PolkadotXcm>();
writes.saturating_inc();
}

if Balances::on_chain_storage_version() == StorageVersion::new(0) {
Balances::current_storage_version().put::<Balances>();
Balances::in_code_storage_version().put::<Balances>();
writes.saturating_inc();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions {
let mut writes = 0;

if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) {
PolkadotXcm::current_storage_version().put::<PolkadotXcm>();
PolkadotXcm::in_code_storage_version().put::<PolkadotXcm>();
writes.saturating_inc();
}

if Balances::on_chain_storage_version() == StorageVersion::new(0) {
Balances::current_storage_version().put::<Balances>();
Balances::in_code_storage_version().put::<Balances>();
writes.saturating_inc();
}

Expand Down
5 changes: 5 additions & 0 deletions docs/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ node-cli = { package = "staging-node-cli", path = "../../substrate/bin/node/cli"
kitchensink-runtime = { path = "../../substrate/bin/node/runtime" }
chain-spec-builder = { package = "staging-chain-spec-builder", path = "../../substrate/bin/utils/chain-spec-builder" }
subkey = { path = "../../substrate/bin/utils/subkey" }
frame-system = { path = "../../substrate/frame/system", default-features = false }
frame-support = { path = "../../substrate/frame/support", default-features = false }
frame-executive = { path = "../../substrate/frame/executive", default-features = false }
pallet-example-single-block-migrations = { path = "../../substrate/frame/examples/single-block-migrations" }

# Substrate
sc-network = { path = "../../substrate/client/network" }
Expand Down Expand Up @@ -57,6 +61,7 @@ sp-api = { path = "../../substrate/primitives/api" }
sp-core = { path = "../../substrate/primitives/core" }
sp-keyring = { path = "../../substrate/primitives/keyring" }
sp-runtime = { path = "../../substrate/primitives/runtime" }
sp-version = { path = "../../substrate/primitives/version" }

[dev-dependencies]
parity-scale-codec = "3.6.5"
Expand Down
9 changes: 0 additions & 9 deletions docs/sdk/src/reference_docs/frame_runtime_migration.rs

This file was deleted.

135 changes: 135 additions & 0 deletions docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
//! # Runtime Upgrades
//!
//! At their core, blockchain logic consists of
//!
//! 1. on-chain state and
//! 2. a state transition function
//!
//! In Substrate-based blockchains, state transition functions are referred to as
//! [runtimes](https://docs.substrate.io/learn/runtime-development/).
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! Traditionally, before Substrate, upgrading state transition functions required node
//! operators to download new software and restart their nodes in a process called
//! [forking](https://en.wikipedia.org/wiki/Fork_(blockchain)).
//!
//! Substrate-based blockchains do not require forking, and instead upgrade runtimes
//! in a process called "Runtime Upgrades".
//!
//! Forkless runtime upgrades are a defining feature of the Substrate framework. Updating the
//! runtime logic without forking the code base enables your blockchain to seemlessly evolve
//! over time in a deterministic, rules-based manner. It also removes ambiguity for node operators
//! and other participants in the network about what is the canonical runtime.
//!
//! This capability is possible due to the runtime of a blockchain existing in on-chain storage.
//!
//! ## Performing a Runtime Upgrade
//!
//! To upgrade a runtime, an [`Origin`](frame_system::RawOrigin) with the necesarry permissions
//! (usually via governance) executes [`set_code`] (or [`set_code_without_checks`]) with the
//! desired new blob.
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! Prior to building the new runtime, don't forget to update the
//! [`RuntimeVersion`](sp_version::RuntimeVersion).
//!
//! # Migrations
//!
//! It is often desirable to define logic to execute immediately after runtime upgrades.
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! Self-contained pieces of logic that execute after a runtime upgrade are called "Migrations".
//!
//! Migrations are typically used to 'migrate' pallet storage into a new layout when the expected
//! storage layout of a pallet changes, but they do anything including but not limited to:
//!
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//! - Calling arbitrary pallet methods
//! - Mutating arbitrary on-chain state
//! - Cleaning up some old storage items that are no longer needed
//!
//! ## Single Block Migrations
//!
//! - Execute immediately and entirely at the beginning of the block following
//! a runtime upgrade.
//! - Are suitable for migrations which are guaranteed to not exceed the block weight.
//! - Are simply implementations of [`OnRuntimeUpgrade`].
//!
//! To learn best practices for writing single block pallet storage migrations, see the
//! [Single Block Migration Example Pallet](pallet_example_single_block_migrations).
//!
//! ### Scheduling the Single Block Migrations to Run Next Runtime Upgrade
//!
//! Schedule migrations to run next runtime upgrade passing them as a generic parameter to your
//! [`Executive`](frame_executive) pallet:
//!
//! ```ignore
//! /// Tuple of migrations (structs that implement `OnRuntimeUpgrade`)
//! type Migrations = (
//! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1,
//! MyCustomMigration,
//! // ...more migrations here
//! );
//! pub type Executive = frame_executive::Executive<
//! Runtime,
//! Block,
//! frame_system::ChainContext<Runtime>,
//! Runtime,
//! AllPalletsWithSystem,
//! Migrations, // <-- pass your migrations to Executive here
//! >;
//! ```
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! ### Ensuring Single Block Migration Safety
//!
//! "My migration unit tests pass, so it should be safe to deploy right?"
//!
//! No! Unit tests execute the migration in a very simple test environment, and cannot account
//! for the complexities of a real runtime or real on-chain state.
//!
//! Prior to deploying migrations, it is critical to perform additional checks to ensure that when
//! run in our real runtime they will not brick the chain due to:
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//! - Panicing
//! - Touching too many storage keys and resulting in an excessively large PoV
//! - Taking too long to execute
//!
//! [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) has a sub-command
//! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade)
//! which is designed to help with exactly this.
//!
//! Developers MUST run this command before deploying migrations to ensure they will not
//! inadvertently result in a bricked chain.
//!
//! It is recommended to run as part of your CI pipeline. See the
//! [polkadot-sdk check-runtime-migration job](https://github.com/paritytech/polkadot-sdk/blob/4a293bc5a25be637c06ce950a34490706597615b/.gitlab/pipeline/check.yml#L103-L124)
//! for an example of how to configure this.
//!
//! ### Note on the Manipulability of PoV Size and Execution Time
//!
//! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with
//! very high certianty that a migration will succeed given **existing** on-chain state, it cannot
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//! prevent a malicious actor from manipulating state in a way that will cause the migration to take
//! longer or produce a PoV much larger than previously measured.
//!
//! Therefore, it is important to write migrations in such a way that the execution time or PoV size
//! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over
//! storage that can quickly or cheaply be bloated.
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! If writing your migration in such a way is not possible, a multi block migration should be used
//! instead.
//!
//! ### Other useful tools
//!
//! [`Chopsticks`](https://github.com/AcalaNetwork/chopsticks) is another tool in the Substrate
//! ecosystem which developers may find useful to use in addition to `try-runtime-cli` when testing
//! their single block migrations.
//!
//! ## Multi Block Migrations
//!
//! Safely and easily execute long-running migrations across multiple blocks.
//!
//! Suitable for migrations which could use arbitrary amounts of block weight.
//!
//! TODO: Link to multi block migration example/s.
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
//!
//! [`GetStorageVersion`]: frame_support::traits::GetStorageVersion
//! [`OnRuntimeUpgrade`]: frame_support::traits::OnRuntimeUpgrade
//! [`StorageVersion`]: frame_support::traits::StorageVersion
//! [`set_code`]: frame_system::Call::set_code
//! [`set_code_without_checks`]: frame_system::Call::set_code_without_checks
5 changes: 2 additions & 3 deletions docs/sdk/src/reference_docs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ pub mod cli;
// TODO: @JoshOrndorff @kianenigma https://github.com/paritytech/polkadot-sdk-docs/issues/54
pub mod consensus_swapping;

/// Learn about all the advance ways to test your coordinate a rutnime upgrade and data migration.
// TODO: @liamaharon https://github.com/paritytech/polkadot-sdk-docs/issues/55
pub mod frame_runtime_migration;
/// Learn about Runtime Upgrades and best practices for writing Migrations.
pub mod frame_runtime_upgrades_and_migrations;

/// Learn about light nodes, how they function, and how Substrate-based chains come
/// light-node-first out of the box.
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/service/src/parachains_db/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub(crate) fn try_upgrade_db(
}

/// Try upgrading parachain's database to the next version.
/// If successfull, it returns the current version.
/// If successful, it returns the current version.
pub(crate) fn try_upgrade_db_to_next_version(
db_path: &Path,
db_kind: DatabaseKind,
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/common/src/assigned_slots/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type LeasePeriodOf<T> = <<T as Config>::Leaser as Leaser<BlockNumberFor<T>>>::Le
pub mod pallet {
use super::*;

/// The current storage version.
/// The in-code storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);

#[pallet::pallet]
Expand Down
Loading