This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Conversation
This reverts commit a69b8eb.
Contributor
|
can we use atomics for wasm runtime only? |
shawntabrizi
approved these changes
Apr 4, 2022
Member
AFAIK yes, but in this case, there is probably not a significant overhead between the two options here. I think using overlay storage is fine, and it will never commit anything to the runtime since it always resets. |
kianenigma
approved these changes
Apr 4, 2022
Member
Author
|
Calling into the host should still be way slower than using atomics or environmental. But in this case it doesn't matter because it isn't a function that is called a lot of times. I think a proper solution would be to pick up this PR and add some |
Member
Author
|
I don't get why the companion is failing. It seems unrelated. Was something missing from #11136 ? |
DaviRain-Su
pushed a commit
to octopus-network/substrate
that referenced
this pull request
Aug 23, 2022
This reverts commit a69b8eb.
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
This reverts commit a69b8eb.
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
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.
Fixup for #10808
We cannot use atomics to store the storage layer counter because of the native runtime: In the native runtime multiple different calls into the runtime happen concurrently on the same memory. In the wasm case every call gets its own wasm instance with its own memory as it should be.
Storage access works as global data because the client uses thread local data for it.