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

Implement MaxEncodedLen wherever necessary #387

Open
ghzlatarev opened this issue Feb 7, 2022 · 1 comment
Open

Implement MaxEncodedLen wherever necessary #387

ghzlatarev opened this issue Feb 7, 2022 · 1 comment
Assignees
Labels
A-runtime Area: Issues and PRs related to Runtimes C-good-first-issue Category: Good first issues P-medium Priority: Medium
Milestone

Comments

@ghzlatarev
Copy link
Contributor

ghzlatarev commented Feb 7, 2022

currently without_storage_info is used in all Pallets that do not implement MaxEncodedLen
paritytech/substrate#10662
Essentially without_storage_info means that the storage consumption of this pallet is unbounded.
As part of this big PoV benchmarking issue paritytech/polkadot-sdk#398, they added a trait StorageInfoTrait that every storage should implement (on condition that value and keys implement MaxEncodedLen) paritytech/substrate#8735
Originally you had to use the generate_storage_info attribute to make a pallet implement the StorageInfoTrait. Since this shouldn't be missed in new pallets they made it implement by default, but now keys and values that don't implement MaxEncodedLen will not compile. So the without_storage_info attribute is used to skip implementation of StorageInfoTrait until MaxEncodedLen is implemented wherever necessary. paritytech/substrate#10662

Enabling this will allow us to adopt the following test:
paritytech/substrate#11699

@ghzlatarev ghzlatarev added the A-runtime Area: Issues and PRs related to Runtimes label Feb 7, 2022
@ghzlatarev ghzlatarev changed the title Implement MaxEncodedLen wherever necessary Implement MaxEncodedLen wherever necessary Feb 7, 2022
@ghzlatarev ghzlatarev added the P-medium Priority: Medium label Feb 7, 2022
@ghzlatarev ghzlatarev self-assigned this Feb 17, 2022
@Garandor Garandor added this to the Future milestone Jul 6, 2022
@ghzlatarev
Copy link
Contributor Author

ghzlatarev commented Jul 18, 2022

Since this work is also underway in Praity repos there are many PRs to study like https://github.com/paritytech/cumulus/pull/1337/files . Therefore it can also be good for first issue.

@ghzlatarev ghzlatarev added the C-good-first-issue Category: Good first issues label Jul 18, 2022
@ghzlatarev ghzlatarev assigned Apokalip and unassigned ghzlatarev Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: Issues and PRs related to Runtimes C-good-first-issue Category: Good first issues P-medium Priority: Medium
Projects
None yet
Development

No branches or pull requests

3 participants