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

Contract execution should have a limit of used memory #1314

Open
Neylix opened this issue Nov 3, 2023 · 0 comments
Open

Contract execution should have a limit of used memory #1314

Neylix opened this issue Nov 3, 2023 · 0 comments
Labels
bug Something isn't working smart contracts Involve smart contracts system Involve system management

Comments

@Neylix
Copy link
Member

Neylix commented Nov 3, 2023

Describe the problem you discovered

Currently the contract are executed without much restriction. But this can have unexpected effect.
For example a contract retrieving some data from an HTTP request and adding this into a list:

data = Http.request("https://website.com")
# Assume the data have a size of 200 Ko
list = []
for i in 1..10_000 do
  list = List.append(list, data]
end

The resulting list will have a size of 2 Go and will be stored in miner memory.

This can causes miner to crash if memory consumption is not handled.

Describe the solution you'd like

Implement a solution to limit the memory used by a contract execution

Epic

No response

@Neylix Neylix added bug Something isn't working smart contracts Involve smart contracts system Involve system management labels Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working smart contracts Involve smart contracts system Involve system management
Projects
None yet
Development

No branches or pull requests

1 participant