[pallet-revive] add get_storage_var_key for variable-sized keys#8274
Merged
athei merged 3 commits intoparitytech:masterfrom Apr 23, 2025
Merged
[pallet-revive] add get_storage_var_key for variable-sized keys#8274athei merged 3 commits intoparitytech:masterfrom
athei merged 3 commits intoparitytech:masterfrom
Conversation
c738efd to
bd56bf9
Compare
Contributor
Author
|
@athei @pgherveou I think this is ready for review. If there's anything I missed please let me know. |
pgherveou
approved these changes
Apr 22, 2025
athei
reviewed
Apr 22, 2025
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
athei
approved these changes
Apr 23, 2025
Merged
via the queue into
paritytech:master
with commit Apr 23, 2025
0fa1b00
231 of 244 checks passed
ordian
added a commit
that referenced
this pull request
Apr 28, 2025
* master: (120 commits) [CI] Improve GH build status checking (#8331) [CI/CD] Use original PR name in prdoc check for the backport PR's to the stable branches (#8329) Add new host APIs set_storage_or_clear and get_storage_or_zero (#7857) push to dockerhub (#8322) Snowbridge - V1 - Adds 2 hop transfer to Rococo (#7956) [AHM] Prepare `election-provider-multi-block` for full lazy data deletion (#8304) Check umbrella version (#8250) [AHM] Fully bound staking async (#8303) migrate parachain-templates tests to `gha` (#8226) staking-async: add missing new_session_genesis (#8310) New NFT traits: granular and abstract interface (#5620) Extract create_pool_with_native_on macro to common crate (#8289) XCMP: use batching when enqueuing inbound messages (#8021) Snowbridge - Tests refactor (#8014) Allow configuration of worst case buy execution weight (#7944) Fix faulty pre-upgrade migration check in pallet-session (#8294) [pallet-revive] add get_storage_var_key for variable-sized keys (#8274) add poke_deposit extrinsic to pallet-recovery (#7882) `txpool`: use tracing for structured logging (#8001) [revive] eth-rpc refactoring (#8148) ...
castillax
pushed a commit
that referenced
this pull request
May 12, 2025
# Description Fixes #8253 This adds a new runtime ReviveApi call `get_storage_var_key`, which does the same as `get_storage`, but for variable-sized keys, which are still being used by ink!v6 and use a different hashing function than the fixed-size 32-byte keys. I've considered changing the API of `get_storage` to support both type of keys, but on the issue discussion it was said that it would be better to add a new runtime call. ## Integration With the following runtime upgrade, all chains using revive should support it by default, as the low-level storage access already supports both types of keys. It was only the runtime call that was not exposing that properly. The trait `pallet_revive::ReviveApi` has changed to include the new runtime call, to implement it just relay the call to `Revive::get_storage_var_key`. # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. --------- Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Contributor
|
Hey! Just checking, will this be part of the next release? I noticed it’s not included in |
Member
|
It didn't make the cutoff. It will be in 2506. |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
This file contains hidden or 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
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.
Description
Fixes #8253
This adds a new runtime ReviveApi call
get_storage_var_key, which does the same asget_storage, but for variable-sized keys, which are still being used by ink!v6 and use a different hashing function than the fixed-size 32-byte keys.I've considered changing the API of
get_storageto support both type of keys, but on the issue discussion it was said that it would be better to add a new runtime call.Integration
With the following runtime upgrade, all chains using revive should support it by default, as the low-level storage access already supports both types of keys. It was only the runtime call that was not exposing that properly.
The trait
pallet_revive::ReviveApihas changed to include the new runtime call, to implement it just relay the call toRevive::get_storage_var_key.Checklist
Trequired)