archethic-node
archethic-node copied to clipboard
Contract execution should have a limit of used memory
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