This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Couldn't load subscription status.
- Fork 2.7k
read_storage panics #3589
Merged
Merged
read_storage panics #3589
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
alternative here: #3597 which i prefer since it just forces a cap on the value rather than introducing a full conditional.
|
* Update with_std.rs * Update with_std.rs
|
Ah, but in this case we don't return the original value's length here which panics with the following error |
|
should do the trick. |
gavofyork
approved these changes
Sep 11, 2019
andresilva
pushed a commit
that referenced
this pull request
Sep 17, 2019
* Add a failing test case * Actual fix * read_child_storage, fix wasm side * Bump the impl version. * Alternative (#3597) * Update with_std.rs * Update with_std.rs * Update wasm_executor.rs * Update wasm_executor.rs * Update with_std.rs * Update wasm_executor.rs
Demi-Marie
pushed a commit
to Demi-Marie/substrate
that referenced
this pull request
Sep 17, 2019
* Add a failing test case * Actual fix * read_child_storage, fix wasm side * Bump the impl version. * Alternative (paritytech#3597) * Update with_std.rs * Update with_std.rs * Update wasm_executor.rs * Update wasm_executor.rs * Update with_std.rs * Update wasm_executor.rs
en
pushed a commit
to en/substrate
that referenced
this pull request
Sep 24, 2019
* Add a failing test case * Actual fix * read_child_storage, fix wasm side * Bump the impl version. * Alternative (paritytech#3597) * Update with_std.rs * Update with_std.rs * Update wasm_executor.rs * Update wasm_executor.rs * Update with_std.rs * Update wasm_executor.rs
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a problem with
read_storage, if an offset passed that is out of bounds of the length of the value the implementation of an extrinsic will panic. This PR solves it.There is another problem with the API itself: there is no way to indicate how many bytes were read. So even if we fix the panic, the API wouldn't be universally usable since the API cannot indicate how many bytes it wrote to the buffer.
The API is not used within Substrate, except for implementing
exists(e.g. this).