Conversation
We should set the max memory for the executor in pages (64KiB) and not in bytes. The wasm memory is always a multiple of a page and we should use the same terminology.
|
I don't have a strong opinion if it's beneficial or not. Substrate executor deals with paging issues itself where needed, and external Wastime interfaces often use bytes to represent different types of limits (e.g. I mean, @koute any thoughts from you? |
koute
left a comment
There was a problem hiding this comment.
LGTM
Even if some of wasmtime's interfaces take a number of bytes instead of a number of pages (for convenience's sake I suppose) it doesn't change the fact that WASM memory can only grow in page increments, so it makes sense to define the limit also in page increments.
s0me0ne-unkn0wn
left a comment
There was a problem hiding this comment.
I'd anyway consider changing that on the Substrate executor side for the sake of consistency, otherwise looks good.
The change is already coming here: #6730 This is the reason I have opened this pr :D |
We should set the max memory for the executor in pages (64KiB) and not in bytes. The wasm memory is always a multiple of a page and we should use the same terminology.
Sorry to not have brought up this earlier 🙈 I just realized while doing some other things 🙈