Liam Aharon
12ce4f7d04
Runtime Upgrade ref docs and Single Block Migration example pallet ( #1554 )
...
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/55
- Changes 'current storage version' terminology to less ambiguous
'in-code storage version' (suggestion by @ggwpez)
- Adds a new example pallet `pallet-example-single-block-migrations`
- Adds a new reference doc to replace
https://docs.substrate.io/maintain/runtime-upgrades/ (temporarily living
in the pallet while we wait for developer hub PR to merge)
- Adds documentation for the `storage_alias` macro
- Improves `trait Hooks` docs
- Improves `trait GetStorageVersion` docs
- Update the suggested patterns for using `VersionedMigration`, so that
version unchecked migrations are never exported
- Prevents accidental usage of version unchecked migrations in runtimes
https://github.com/paritytech/substrate/pull/14421#discussion_r1255467895
- Unversioned migration code is kept inside `mod version_unchecked`,
versioned code is kept in `pub mod versioned`
- It is necessary to use modules to limit visibility because the inner
migration must be `pub`. See
https://github.com/rust-lang/rust/issues/30905 and
https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40
for more.
### todo
- [x] move to reference docs to proper place within sdk-docs (now that
https://github.com/paritytech/polkadot-sdk/pull/2102 is merged)
- [x] prdoc
---------
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Juan <juangirini@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: command-bot <>
Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com >
2024-02-28 07:32:02 +00:00
Przemek Rzad
bfb241d7f3
Add missing licenses and tune the scanning workflow ( #1288 )
...
* Add missing Cumulus licenses
* Typo
* Add missing Substrate licenses
* Single job checking the sub-repos in steps
* Remove dates
* Remove dates
* Add missing (C)
* Update FRAME UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update more UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-08-30 15:45:49 +03:00
PG Herveou
005b9d0989
Contracts: Use RuntimeUpgrade hooks instead of Hooks::on_runtime_upgrade ( #2570 )
...
* Fixes
* Remove on_runtime_upgrade hook
* remove upgrade_fn / add doc to Migration struct
* Add cumulus_pallet_*::migration to Migrations type
* add docstring
* fix
* Update parachain-template/runtime/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Update parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
* Update pallets/parachain-system/src/migration.rs
---------
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-06-05 11:56:55 +00:00
Vivek Pandya
9f09109eaf
Remove use of trait Store ( #2286 )
...
* Remove use of Store trait from xcmp-queue pallet
* Remove Store trait usage from dmp-queue pallet
* Remove Store trait usage from parachain-system pallet
* Remove use of Store trait from cumulus
* Run cargo fmt
2023-03-13 22:30:20 +01:00
Keith Yeung
7ad763f9bd
Fix a few migration issues with 2D weights ( #1755 )
...
* Give a max proof size to DMP individual weight processing during migration
* Fix a few migration issues with 2D weights
* Update substrate
* Fixes
* cargo fmt
* Re-add v1 migration
* Set DEFAULT_POV_SIZE to 64 KB
* Use Weight::from_parts
* Update Polkadot
* Fixes
2022-10-24 15:03:02 +00:00
Shawn Tabrizi
2c1e88522c
Companion for Weight v1.5 Follow Up ( #1584 )
...
* fixes
* oopsie
* [ci] Apply cargo-fmt
* fixes
* [ci] Apply cargo-fmt
* fixes
* fix cumulus template
* fix merge
* update lockfile for {"polkadot", "substrate"}
Co-authored-by: paritytech-ci <paritytech-ci@parity.io >
Co-authored-by: parity-processbot <>
2022-09-01 19:25:05 +00:00
Shawn Tabrizi
48d4f1c57d
Companion for Weight v1.5 ( #1581 )
...
* cargo test -p cumulus-primitives-utility
* cargo test -p cumulus-pallet-xcmp-queue
* cargo test -p cumulus-pallet-xcm
* cargo test -p cumulus-pallet-dmp-queue
* cargo test -p pallet-template
* cargo test -p cumulus-test-runtime
* fix weights
* fix more weights
* cargo test -p parachains-common
* cargo test -p parachain-template-runtime
* fix weights import
* cargo test -p collectives-polkadot-runtime
* cargo test -p contracts-rococo-runtime
* more
* unused
* fixes
* Update benchmarking.rs
* Update lib.rs
* Update lib.rs
* fix
* fix bug in conversion
* update lockfile for {"polkadot", "substrate"}
Co-authored-by: parity-processbot <>
2022-08-31 12:24:42 +00:00
Gavin Wood
02d9eb0883
Companion to Substrate #11490 ( #1305 )
...
* Fix warnings
* Bump
* Fix build
* Fix the build
* Fixes
* Formatting
Co-authored-by: Bastian Köcher <info@kchr.de >
2022-05-30 19:47:28 +02:00
Sergei Shulepov
3b3f9dca1d
Look at the upgrade go-ahead and restriction signals ( #517 )
...
* Look at the upgrade go-ahead and restriction signals
* Update Cargo.toml
* Drop old docs for validation code
* Update tests
* Fix typo
* Add doc-comments for read_optional_entry
* Add a note about ValidationData
* Introduce migration for removing unused storage entry
* Fix indentation
* Use intra-doc link syntax
* Double-check that GoAhead signal is not spurious
* fmt
* Drop commented code
* Fix typos
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Add a weight for StorageVersion write
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Chris Sosnin <chris125_@live.com >
Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-12 18:08:23 +02:00