nearcore
nearcore copied to clipboard
contract runtime: fix LimitedMemoryPoll infrastructure to not abort the node when out of memories
Right now if the LimitedMemoryPool
runs out of memories -- and the number of them is hardcoded -- the node will abort execution.
That's a pretty severe reaction and it could be much milder -- we could drop our guarantees on stable performance for example and allocate additional pages from the OS; or we could block the callers until pages become available.
We should also provide a tunable for the operators to set how concurrent they want the contract runtime to be, rather than hardcoding the number of memories.