This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Contracts: Better migration types #14418
Merged
pgherveou
merged 1 commit into
pg/more_migratinons_per_block
from
pg/migrations_vx_updates
Jun 20, 2023
Merged
Contracts: Better migration types #14418
pgherveou
merged 1 commit into
pg/more_migratinons_per_block
from
pg/migrations_vx_updates
Jun 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
athei
approved these changes
Jun 20, 2023
agryaznov
approved these changes
Jun 20, 2023
paritytech-processbot bot
pushed a commit
that referenced
this pull request
Jun 20, 2023
* move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * Update contract multi-block migration Ensure that we do as many steps as possible given the weight limit passed to on_idle * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * wip * fix comment (#14316) * fix test * fix * Update frame/contracts/src/migration.rs Co-authored-by: Juan <juangirini@gmail.com> * fix test doc * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Fix compilation with feature runtime-benchmarks * fix example * fix cargo doc --document-private-items * private links * Remove dup comment * add doc for MigrationInProgress * PR review remove duplicate asserts * simplify upper bound * fix link * typo * typo * no unwrap() * correct log message * missing * fix typo * PR comment * Add example with single element tuple * Improve migration message * Update frame/contracts/src/benchmarking/mod.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Update frame/contracts/src/migration.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Update frame/contracts/src/migration.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * use saturating_accrue instead of += * add more doc * Contracts: Better migration types (#14418) * Add explicit error, if try-runtime runs a noop migration * use mut remaining_weight --------- Co-authored-by: Juan Girini <juangirini@gmail.com> Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
* move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * Update contract multi-block migration Ensure that we do as many steps as possible given the weight limit passed to on_idle * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * wip * fix comment (paritytech#14316) * fix test * fix * Update frame/contracts/src/migration.rs Co-authored-by: Juan <juangirini@gmail.com> * fix test doc * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Fix compilation with feature runtime-benchmarks * fix example * fix cargo doc --document-private-items * private links * Remove dup comment * add doc for MigrationInProgress * PR review remove duplicate asserts * simplify upper bound * fix link * typo * typo * no unwrap() * correct log message * missing * fix typo * PR comment * Add example with single element tuple * Improve migration message * Update frame/contracts/src/benchmarking/mod.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Update frame/contracts/src/migration.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Update frame/contracts/src/migration.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * use saturating_accrue instead of += * add more doc * Contracts: Better migration types (paritytech#14418) * Add explicit error, if try-runtime runs a noop migration * use mut remaining_weight --------- Co-authored-by: Juan Girini <juangirini@gmail.com> Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The v9 migration currently assumes that the migration fits into a bounded vector of 256 bits. While this is typically true in practice because the code hash is an alias for
<T as frame_system::Config>::Hash
, which is usually set toBlakeTwo256
or a similar hash function, the code should not make assumptions about it.Same goes for v10 and the migration keys that should use
T::AccountId
.