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

Migrate to Bounded Vec and Derive MaxEncodedLen #1036

Merged
merged 9 commits into from
May 26, 2021
Merged

Conversation

brettkolodny
Copy link
Contributor

@brettkolodny brettkolodny commented May 21, 2021

Closes #1034

@brettkolodny brettkolodny changed the title Derived MaxEncodedLen Migrate to Bounded Vec and Derive MaxEncodedLen May 21, 2021
@brettkolodny
Copy link
Contributor Author

There are already two types for MaxCandidates and MaxInvulnerables that are tied to the two storage items that need to be migrated to BoundedVec but those traits are used for benchmarking only.

Should these be left as Vec or should two new types be implemented that serve as maximum amount that should ever be possible?

@brettkolodny brettkolodny requested a review from xlc May 21, 2021 18:28
@xlc
Copy link
Member

xlc commented May 22, 2021

We can make them strictly enforced

@brettkolodny brettkolodny marked this pull request as ready for review May 24, 2021 20:06
Copy link
Member

@xlc xlc left a comment

Choose a reason for hiding this comment

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

I think we still want desired_candidates as a soft limit can be increased without runtime upgrade.

@xlc xlc requested a review from wangjj9219 May 25, 2021 22:32
@xlc xlc merged commit 071a8d5 into master May 26, 2021
@xlc xlc deleted the bounded-collator-select branch May 26, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate collator-selection Module to BoundedVec
2 participants