Skip to content
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

Ensure referenda TracksInfo is sorted #3325

Merged
merged 13 commits into from
Feb 17, 2024
Merged

Ensure referenda TracksInfo is sorted #3325

merged 13 commits into from
Feb 17, 2024

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Feb 14, 2024

Changes:

  • Add integrity_check to trait TracksInfo to assert the sorting
  • Use the check in integrity_test
  • Rely upon sorted property in the info for speedup

Note that the pallet already relies upon this (so far) untested assumption here.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez requested a review from a team as a code owner February 14, 2024 14:16
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez added the T2-pallets This PR/Issue is related to a particular pallet. label Feb 14, 2024
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
substrate/frame/referenda/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez enabled auto-merge February 16, 2024 17:52
@ggwpez ggwpez added this pull request to the merge queue Feb 17, 2024
Merged via the queue into master with commit 8dc910c Feb 17, 2024
127 of 129 checks passed
@ggwpez ggwpez deleted the oty-sorted-tracks branch February 17, 2024 11:57
ordian added a commit that referenced this pull request Feb 19, 2024
* master: (41 commits)
  Add Coretime to Westend (#3319)
  removed `pallet::getter` from `pallet-sudo` (#3370)
  gossip-support: add unittests for update authorities (#3258)
  [FRAME Core] remove unnecessary overrides while using derive_impl for frame_system (#3317)
  Update coretime-westend bootnodes (#3380)
  `im-online` removal cleanup: remove off-chain storage (#2290)
  Bump the known_good_semver group with 1 update (#3379)
  Fix documentation dead link (#3372)
  Make `sp-keystore` `no_std`-compatible and fix the `build-runtimes-polkavm` CI job (#3363)
  Remove unused `im-online` weights (#3373)
  Ensure referenda `TracksInfo` is sorted (#3325)
  rpc server: add rate limiting middleware (#3301)
  do not block finality for "disabled" disputes (#3358)
  fix(zombienet): docker `img` version to use in merge queues for bridges (#3337)
  Various nits and alignments for SP testnets found during bumping `polkadot-fellows` repo (#3359)
  Add broker pallet to `coretime-westend` (#3272)
  remove recursion limit (#3348)
  Update subkey README.md (#3355)
  Bump the known_good_semver group with 6 updates (#3347)
  Document LocalKeystore insert method (#3336)
  ...
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
Changes:
- Add `integrity_check` to trait `TracksInfo` to assert the sorting 
- Use the check in `integrity_test`
- Rely upon sorted property in the `info` for speedup

Note that the pallet already relies upon this (so far) untested
assumption
[here](https://github.com/paritytech/polkadot-sdk/blob/4963c86d2a5e79380e16f070321ef5be3701761c/substrate/frame/referenda/src/lib.rs#L1280).

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants