Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Generate storage info for Pallets Offences and Session #10113

Closed
wants to merge 94 commits into from
Closed

Generate storage info for Pallets Offences and Session #10113

wants to merge 94 commits into from

Conversation

georgesdib
Copy link
Contributor

@georgesdib georgesdib commented Oct 28, 2021

Fixes part of paritytech/polkadot-sdk#323.

Adding generate_storage_info to pallets offences and session.

This PR depends on #9864 being merged first.

Polkadot companion: paritytech/polkadot#4174.

Cumulus companion: paritytech/cumulus#710.

Summary of changes below:

  • Changing MAXIMUM_TARGETS constant into a runtime param MaxTargets.

  • Updated election-provider-support documentation accordingly.

  • Adding generate_storage_info to pallets offences and session with the corresponding changes and test changes.
    I had to introduce MaxKeysEncodingSize to bound the encoding of the keys.

  • Adding map_collect and map_collect_ref utility functions to WeakBoundedVec, this allows to write shorter code when manipulating BoundedVec. I have also added tests for these 2 functions.

  • Moved traits ReportOffence and OnOffenceHandler as well as the struct OffenceDetails from primitives/staking into frame-support to be able to use WeakBoundedVec.

Georges Dib added 30 commits September 20, 2021 22:11
to pallet staking.
Moved MAX_UNLOCKING_CHUNKS from being a constant to being a type
called `MaxUnlockingChunks`
`MaxNominations` to allow it to be a bound for a `BoundedVec`
storage to being a runtime parameter `MaxNbOfValidators`
Fixing various other compile errors
Georges Dib added 3 commits October 30, 2021 18:17
in session pallet.
This is done so that it's less restrictive on cumulus
when using `SessionManager`
Moving implementation of `map_collect` to `WeakBoundedVec`
Adding tests for `map_collect` and `map_collect_ref`
@georgesdib georgesdib marked this pull request as ready for review October 30, 2021 20:19
@stale
Copy link

stale bot commented Dec 12, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Dec 12, 2021
@stale stale bot closed this Dec 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants