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

Remove sbkr in favor of a static buffer #53

Open
xermicus opened this issue Sep 19, 2024 · 0 comments
Open

Remove sbkr in favor of a static buffer #53

xermicus opened this issue Sep 19, 2024 · 0 comments
Assignees

Comments

@xermicus
Copy link
Member

Dynamic allocations need to be metered in polkavm but this will be implemented later on. As an interim solution, we just use a static buffer instead.

The exact size of this has still to be determined. The amount of memory a contract can consume on EVM is capped by the blocks gas limit, currently around a couple megabytes (see also this discussion). Using a static buffer implies a fixed a fixed cost, it is also connected to the maximum call stack depth we will allow. However, assuming we can do away with just a fraction of EVMs call stack depth limit of 1024, this penalty should be very small regardless.

If needed, the static buffer size it could also be set as a compiler option.

@xermicus xermicus self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant