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

Changes client memory allocation limits when executing in the offchain context #6081

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

gpestana
Copy link
Contributor

@gpestana gpestana commented Oct 15, 2024

This PR refactors the client allocator to allocate up to 2GiB of memory when running in the offchain context, instead of limiting the allocation to 32MiB as nowadays. This refactor allows for the generation of large chainspecs and memory intensive offchain-worker computation, which is important for staking as the size of the election snapshots increase.

The context: CallContext enum variant in the executor is passed down to the wasm instance, which then instantiates the allocator with the limits corresponding to the call context.

Closes #5419

@gpestana gpestana added the T0-node This PR/Issue is related to the topic “node”. label Oct 15, 2024
@gpestana gpestana self-assigned this Oct 15, 2024
@gpestana gpestana requested a review from koute as a code owner October 15, 2024 23:50
@gpestana gpestana marked this pull request as draft October 15, 2024 23:50
@gpestana gpestana changed the title [WIP] Changes client memory allocation limits when executing in the offchain context Changes client memory allocation limits when executing in the offchain context Oct 16, 2024
@gpestana gpestana marked this pull request as ready for review October 16, 2024 12:36
gpestana and others added 4 commits October 16, 2024 15:51
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chain-spec building failure due to WASM allocation size
3 participants