-
Notifications
You must be signed in to change notification settings - Fork 688
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
chainHead/storage: Fix storage iteration using the query key #1665
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
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
lexnv
added
A1-insubstantial
Pull request requires no code review (e.g., a sub-repository hash update).
I2-bug
The node fails to follow expected behavior.
D1-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
labels
Sep 21, 2023
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
tadeohepperle
approved these changes
Sep 25, 2023
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.
👍
skunert
approved these changes
Sep 26, 2023
ordian
added a commit
that referenced
this pull request
Sep 27, 2023
* master: (61 commits) OpenGov in Westend and Rococo (#1177) Associated type Hasher for `QueryPreimage`, `StorePreimage` and `Bounded` (#1720) Migrate polkadot-primitives to v6 (#1543) genesis-builder: implemented for all runtimes (#1492) `BlockId` removal: `tx-pool` refactor (#1678) Bump directories from 4.0.1 to 5.0.1 (#1656) Allow debug_assertions in short-benchmarks CI job (#1711) chainHead/storage: Fix storage iteration using the query key (#1665) Implement more useful traits in `Slot` type (#1595) Make downloads in parallel and give more time to complete (#1699) Bump actions/checkout from 4.0.0 to 4.1.0 (#1688) contracts: Fix incorrect storage alias in mirgration (#1687) Fix documentation about justification and `finalized == true` requirement (#1607) tweak pallet macro (genesis_config etc) to cater for RA users as well. (#1689) Uncoupling pallet-xcm from frame-system's RuntimeCall (#1684) Bump aes-gcm from 0.10.2 to 0.10.3 (#1681) docs / Update PR template to reflect monorepo (#1674) update contributing guide and ui-tests scripts (#1668) pallet epm: add `TrimmingStatus` to the mined solution (#1659) Update HRMP pallet benchmarking to use benchmarks v2 (#1676) ...
ordian
added a commit
that referenced
this pull request
Oct 10, 2023
* tsv-disabling-node-side: (69 commits) runtime-api: cleanup after v7 stabilization (#1729) Move requests-responses and polling from `ChainSync` to `SyncingEngine` (#1650) Add custom error message for `StorageNoopGuard` (#1727) Clarify docs cargo fmt add a CAVEAT comment implement disabled_validators correctly remove unnecessary hash string (#1722) OpenGov in Westend and Rococo (#1177) Associated type Hasher for `QueryPreimage`, `StorePreimage` and `Bounded` (#1720) Migrate polkadot-primitives to v6 (#1543) genesis-builder: implemented for all runtimes (#1492) `BlockId` removal: `tx-pool` refactor (#1678) Bump directories from 4.0.1 to 5.0.1 (#1656) Allow debug_assertions in short-benchmarks CI job (#1711) chainHead/storage: Fix storage iteration using the query key (#1665) Implement more useful traits in `Slot` type (#1595) Make downloads in parallel and give more time to complete (#1699) Bump actions/checkout from 4.0.0 to 4.1.0 (#1688) contracts: Fix incorrect storage alias in mirgration (#1687) ...
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this pull request
Mar 25, 2024
…ech#1665) This PR ensures that all storage keys under a prefix are returned by the `chainHead_storage` method. Before this PR, the `storage_keys` was used with just the `start_key`. Before the pagination event was generated, the last reported key `last_key` was saved internally. When the pagination is resumed, the `last_key` will serve as the next `start_key` to the `storage_keys` API. However, this behavior does not function properly for non-prefixed storage keys. Entry keys `a`, `ab`, `abc` share a common prefix and therefore the `ab` key leads to `abc`. However, for `a`, `ab`, `aB` and `abc`, the `aB` key does not immediately lead to `abc`. To mitigate this, the PR saves the start key of the query, together with the next pagination key. Improve testing to ensure we have a key entry that doesn't share the prefix with the descendant key. @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Mar 26, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Mar 27, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 10, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 10, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
bkchr
pushed a commit
that referenced
this pull request
Apr 10, 2024
* per-lane rewards in pallet-bridge-relayers * add lane id to RewardPaid event * clippy * fix benchmarks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A1-insubstantial
Pull request requires no code review (e.g., a sub-repository hash update).
D1-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
I2-bug
The node fails to follow expected behavior.
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.
This PR ensures that all storage keys under a prefix are returned by the
chainHead_storage
method.Before this PR, the
storage_keys
was used with just thestart_key
.Before the pagination event was generated, the last reported key
last_key
was saved internally.When the pagination is resumed, the
last_key
will serve as the nextstart_key
to thestorage_keys
API.However, this behavior does not function properly for non-prefixed storage keys.
Entry keys
a
,ab
,abc
share a common prefix and therefore theab
key leads toabc
.However, for
a
,ab
,aB
andabc
, theaB
key does not immediately lead toabc
.To mitigate this, the PR saves the start key of the query, together with the next pagination key.
Improve testing to ensure we have a key entry that doesn't share the prefix with the descendant key.
@paritytech/subxt-team