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

fix(sandbox): clear sandbox store inside a block #4420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ByteNacked
Copy link
Member

@ByteNacked ByteNacked commented Dec 23, 2024

Resolves # .

Relates #4192

This hack fixes the error:

 tokio-runtime-worker gear::authorship: ⌛️ Pseudo-inherent is taking too long and will not be included in the block.    

HACK: It was discovered that starting with version 4.0, Wasmer experiences a slowdown
when creating a large number of memory/instances beyond a certain threshold.
The usual method to clear the store doesn't work for benchmarks (see Sandboxes::get)
or when too many instances/memories are created within a single block, as the store
is only cleared at the start of a new block.

This is a temporary solution to reset the store after reaching a certain limit
(see SANDBOX_STORE_CLEAR_COUNTER_LIMIT) for memory/instances.
Otherwise, the store grows too large, leading to performance degradation during
normal node execution and benchmarks.

@reviewer-or-team

@ByteNacked ByteNacked self-assigned this Dec 23, 2024
@ByteNacked ByteNacked added the A0-pleasereview PR is ready to be reviewed by the team label Dec 23, 2024
@ByteNacked
Copy link
Member Author

ByteNacked commented Dec 24, 2024

Synced:

  • testnet
  • mainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant