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

Implementing MaxEncodedLen for generate_solution_type #11032

Merged
merged 34 commits into from
Mar 23, 2022
Merged

Implementing MaxEncodedLen for generate_solution_type #11032

merged 34 commits into from
Mar 23, 2022

Conversation

georgesdib
Copy link
Contributor

@georgesdib georgesdib commented Mar 14, 2022

Fixes #10866

This is a follow up on #11016 and #11031

Implementing MaxEncodedLen on the macro as per the above mentioned issue.

Polkadot companion: paritytech/polkadot#5145
skip check-dependent-cumulus

@kianenigma

Polkadot address: 131dPecTmpTC1p1ofemufqFBJo9vNbV7dkgN7vWwKnaSMkC4

Georges Dib and others added 23 commits March 6, 2022 11:48
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff
on `generate_solution_type`
adding some comments and documentation
renaming, and re exporting macro.
on `generate_solution_type`
adding some comments and documentation
on `generate_solution_type`
adding some comments and documentation
@georgesdib georgesdib requested a review from kianenigma as a code owner March 14, 2022 20:34
@kianenigma kianenigma added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Mar 22, 2022
Cargo.lock Show resolved Hide resolved
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Removing unneeded imports in tests.
@kianenigma
Copy link
Contributor

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 096f205 into paritytech:master Mar 23, 2022
@kianenigma
Copy link
Contributor

/tip small

@substrate-tip-bot
Copy link

A small tip was successfully submitted for georgesdib (131dPecTmpTC1p1ofemufqFBJo9vNbV7dkgN7vWwKnaSMkC4 on polkadot).

https://polkadot.js.org/apps/#/treasury/tips

@georgesdib georgesdib deleted the election-solution-bounded branch March 23, 2022 11:04
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
…#11032)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Move `NposSolution` to frame

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Fixing test

* Removing unneeded dependencies

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* Removing TODO and change bound

* renaming `size_bound` to `max_voters`

* Enabling tests for `solution-type`
These got dropped off after the crate was moved from `sp_npos_elections`

* Adding tests for `MaxEncodedLen` of solution_type

* Better rustdocs. Better indenting and comments.
Removing unneeded imports in tests.
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
…#11032)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Move `NposSolution` to frame

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Fixing test

* Removing unneeded dependencies

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* Removing TODO and change bound

* renaming `size_bound` to `max_voters`

* Enabling tests for `solution-type`
These got dropped off after the crate was moved from `sp_npos_elections`

* Adding tests for `MaxEncodedLen` of solution_type

* Better rustdocs. Better indenting and comments.
Removing unneeded imports in tests.
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
…#11032)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Move `NposSolution` to frame

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Fixing test

* Removing unneeded dependencies

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* Removing TODO and change bound

* renaming `size_bound` to `max_voters`

* Enabling tests for `solution-type`
These got dropped off after the crate was moved from `sp_npos_elections`

* Adding tests for `MaxEncodedLen` of solution_type

* Better rustdocs. Better indenting and comments.
Removing unneeded imports in tests.
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
…#11032)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Move `NposSolution` to frame

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Fixing test

* Removing unneeded dependencies

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* Removing TODO and change bound

* renaming `size_bound` to `max_voters`

* Enabling tests for `solution-type`
These got dropped off after the crate was moved from `sp_npos_elections`

* Adding tests for `MaxEncodedLen` of solution_type

* Better rustdocs. Better indenting and comments.
Removing unneeded imports in tests.
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
…#11032)

* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff

* Fixing tests

* Fixing tests

* Fixing cargo.toml for std configuration

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* fmt

* Committing suggested changes
renaming, and re exporting macro.

* Removing unneeded imports

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Move `NposSolution` to frame

* Implementing `MaxEncodedLen`
on `generate_solution_type`

* Full implementation of `max_encoded_len`

* Fixing implementation bug
adding some comments and documentation

* Fixing test

* Removing unneeded dependencies

* `VoterSnapshotPerBlock` -> `MaxElectingVoters`

* rename `SizeBound` to `MaxVoters`

* Removing TODO and change bound

* renaming `size_bound` to `max_voters`

* Enabling tests for `solution-type`
These got dropped off after the crate was moved from `sp_npos_elections`

* Adding tests for `MaxEncodedLen` of solution_type

* Better rustdocs. Better indenting and comments.
Removing unneeded imports in tests.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Move sp-npos-elections-solution-type to frame-election-provider-support
3 participants