-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps #7671
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
Merged
ggwpez
merged 17 commits into
paritytech:master
from
pandres95:fix/represent-tracks-constant-as-a-vec-id-info-tuple
Mar 21, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9a458d3
fix(pallet-referenda): represent `Tracks` constant as `Vec<(TrackId, …
pandres95 f03a5a8
fix(pallet-referenda): define `StringLike` to represent a static arra…
pandres95 44b58c7
chore: add prdoc
pandres95 906a0a0
feat(pallet-referenda): apply suggestions from @ggwpez's review
pandres95 279cff2
fix(pallet-referenda): make clippy happy
pandres95 18662d0
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
pandres95 df8d03e
fix: make ci happy
pandres95 29d1650
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
pandres95 91b963b
chore(pallet-referenda): fmt/add docs for `StringLike`
pandres95 18393f3
chore(pallet-referenda): set different types for `TrackInfo` (storage…
pandres95 28ad818
chore(pallet-referenda): revert change of `str_array`
pandres95 1afaf8c
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
pandres95 65706fe
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
pandres95 0bc3716
chore(pallet-referenda):document `tracks` constant function.
pandres95 3130968
feat(pallet-referenda): test `StringLike` encoding and decoding.
pandres95 7ef3632
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
gui1117 b5762a7
Merge branch 'master' into fix/represent-tracks-constant-as-a-vec-id-…
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| title: 'Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps' | ||
|
|
||
| doc: | ||
| - audience: Runtime Dev | ||
| description: |- | ||
| The PR #2072 introduces a change in the representation of the `name` field, from a `&str` to a `[u8; N]` array. This is because | ||
| tracks can be retrieves from storage, and thus, a static string representation doesn't meet with the storage traits requirements. | ||
|
|
||
| This PR encapsulates this array into a `StringLike` structure that allows representing the value as a `str` for SCALE and metadata | ||
| purposes. This is to avoid breaking changes. | ||
|
|
||
| This PR also reverts the representation of the `Tracks` constant as a tuple of `(TrackId, TrackInfo)` to accomplish the same | ||
| purpose of avoid breaking changes to runtime users and clients. | ||
| crates: | ||
| - name: pallet-referenda | ||
| bump: minor | ||
| - name: collectives-westend-runtime | ||
| bump: minor | ||
| - name: kitchensink-runtime | ||
| bump: minor | ||
| - name: rococo-runtime | ||
| bump: minor | ||
| - name: westend-runtime | ||
| bump: minor |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.