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

Investigate better types for max len of bounded storage items #290

Open
emostov opened this issue Jan 7, 2022 · 2 comments
Open

Investigate better types for max len of bounded storage items #290

emostov opened this issue Jan 7, 2022 · 2 comments
Labels
I4-refactor Code needs refactoring. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@emostov
Copy link

emostov commented Jan 7, 2022

Currently, bounded storage items require a type that implements Get for its max length. This permits the user to configure the type as something that can be modified at runtime.

Modifying the bounds at runtime is a foot gun for chain builders. For example, it could render some storage items non-decodable or break assumptions used to create weights and soften DDoS vectors.

We should look into forcing the bound to be a const or something similiar

@emostov emostov added the I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. label Jan 7, 2022
@bkchr bkchr added I7-refactor and removed I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. labels Jan 9, 2022
@kianenigma
Copy link
Contributor

Generally speaking, I realized again that Get can break everything.

For example, if you put a type Foo: Get<u32> into the metadata, but the Get<_> is actually implemented by a real storage that can change on the fly, PJS api breaks.

@juangirini
Copy link
Contributor

related issue #244

@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I4-refactor Code needs refactoring. T1-FRAME This PR/Issue is related to core FRAME, the framework. and removed I7-refactor labels Aug 25, 2023
claravanstaden pushed a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
* Update open ethereum.

* Remove extra line break.

* Remove branch comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-refactor Code needs refactoring. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Backlog
Development

No branches or pull requests

5 participants