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

Conversation

@georgesdib
Copy link
Contributor

@georgesdib georgesdib commented Mar 23, 2022

Fixes #11092

when constructing NposSolution via from_assignment, check that the number of voters is less than the bound MaxVoters provided for the implementation of MaxEncodedLen.

@kianenigma

Polkadot address: 131dPecTmpTC1p1ofemufqFBJo9vNbV7dkgN7vWwKnaSMkC4

@georgesdib georgesdib requested a review from kianenigma as a code owner March 23, 2022 21:14
@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. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. labels Mar 24, 2022
@kianenigma kianenigma requested a review from emostov March 24, 2022 20:07
no need to interate to calculate len
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 modulo #11103 (comment)

@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

Copy link
Contributor

@emostov emostov left a comment

Choose a reason for hiding this comment

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

LGTM

@kianenigma
Copy link
Contributor

bot merge

@paritytech-processbot paritytech-processbot bot merged commit b254351 into paritytech:master Mar 31, 2022
@georgesdib georgesdib deleted the solution_type_too_big_copy branch March 31, 2022 13:50
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
* Fail if `MaxVoters` too small

* Fixing benchmarking test, better naming of error

* reverting accidental change

* use fully qualified syntax
no need to interate to calculate len

* Fail directly if too many voters
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Fail if `MaxVoters` too small

* Fixing benchmarking test, better naming of error

* reverting accidental change

* use fully qualified syntax
no need to interate to calculate len

* Fail directly if too many voters
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. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enforce MaxEncodedLen impl for NposSolution

3 participants