ref-fvm
ref-fvm copied to clipboard
IPLD Block Limits
Currently, we don't count read/written blocks towards memory limits. We need to limit the number and total size of IPLD blocks cached in the call-stack. Specifically:
- Limit the number of blocks per instance.
- Count all cached blocks (read and written) against the call-stack's memory limit.
Good point! These are the blocks that get parked in the BlockRegistry, right? There is gas charge for putting them in, but they take up extra space in addition to the parts that get copied into the Wasm memory.
Yep.
So, we currently charge 10gas/byte, ensuring that we never end up with more than 1GiB of memory cached. But this is a massive over-charge.