CPU fuel and memory limit #1983
amitu
started this conversation in
Ideas & RFCs
Replies: 1 comment
-
There is also a possibility that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a request is getting handled, we should allocate a configurable but finite "fuel" and memory, and during parsing etc, we keep track of how much fuel is consumed, eg every byte read, is one unit, every cpu instruction another fuel and so on.
Read fuel handling in wasmtime: https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.consume_fuel for inspiration.
Also check their memory management primitive: https://docs.rs/wasmtime/latest/wasmtime/trait.MemoryCreator.html
Beta Was this translation helpful? Give feedback.
All reactions