-
Notifications
You must be signed in to change notification settings - Fork 700
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
migrations: take()
should consume read and write operation weight
#4302
Merged
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
dastansam
force-pushed
the
take-weight-correction
branch
from
April 25, 2024 22:32
f4d6426
to
1dd84cf
Compare
dastansam
force-pushed
the
take-weight-correction
branch
from
April 25, 2024 22:33
1dd84cf
to
0f0882e
Compare
dastansam
commented
Apr 25, 2024
The CI pipeline was cancelled due to failure one of the required jobs. |
liamaharon
approved these changes
Apr 26, 2024
ggwpez
approved these changes
Apr 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on the Trie version, but okay. Many chains are still on V0.
bkchr
approved these changes
May 12, 2024
Merged
via the queue into
paritytech:master
with commit May 12, 2024
efc2132
146 of 148 checks passed
ordian
added a commit
that referenced
this pull request
May 14, 2024
* master: improve MockValidationDataInherentDataProvider to support async backing (#4442) Bump `proc-macro-crate` to the latest version (#4409) [ci] Run check-runtime-migration in GHA (#4441) prospective-parachains rework (#4035) [ci] Add forklift to GHA ARC (#4372) `CheckWeight` SE: Check for extrinsic length + proof size combined (#4326) Add generate and verify logic for `AncestryProof` (#4430) Rococo AH: undeploy trie migration (#4414) Remove `substrate-frame-cli` (#4403) migrations: `take()`should consume read and write operation weight (#4302) `remote-externalities`: store block header in snapshot (#4349) xcm-emlator: Use `BlockNumberFor` instead of `parachains_common::BlockNumber=u32` (#4434) Remove `pallet::getter` usage from authority-discovery pallet (#4091) Remove pallet::getter usage from pallet-contracts-mock-network (#4417) Add docs to request_core_count (#4423)
hitchhooker
pushed a commit
to ibp-network/polkadot-sdk
that referenced
this pull request
Jun 5, 2024
…aritytech#4302) #### Problem `take()` consumes only 1 read worth of weight in `single-block-migrations` example, while `take()` [is](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/support/src/storage/unhashed.rs#L63) `get() + kill()`, i.e should be 1 read + 1 write. I think this could mislead developers who follow this example to write their migrations --------- Co-authored-by: Bastian Köcher <git@kchr.de>
liuchengxu
pushed a commit
to liuchengxu/polkadot-sdk
that referenced
this pull request
Jun 19, 2024
…aritytech#4302) #### Problem `take()` consumes only 1 read worth of weight in `single-block-migrations` example, while `take()` [is](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/support/src/storage/unhashed.rs#L63) `get() + kill()`, i.e should be 1 read + 1 write. I think this could mislead developers who follow this example to write their migrations --------- Co-authored-by: Bastian Köcher <git@kchr.de>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this pull request
Aug 2, 2024
…aritytech#4302) #### Problem `take()` consumes only 1 read worth of weight in `single-block-migrations` example, while `take()` [is](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/support/src/storage/unhashed.rs#L63) `get() + kill()`, i.e should be 1 read + 1 write. I think this could mislead developers who follow this example to write their migrations --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This was referenced Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
take()
consumes only 1 read worth of weight insingle-block-migrations
example, whiletake()
isget() + kill()
, i.e should be 1 read + 1 write. I think this could mislead developers who follow this example to write their migrations