ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

IPLD Block Limits

Open Stebalien opened this issue 3 years ago • 3 comments

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:

  1. Limit the number of blocks per instance.
  2. Count all cached blocks (read and written) against the call-stack's memory limit.

Stebalien avatar Nov 11 '22 23:11 Stebalien

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.

aakoshh avatar Nov 14 '22 11:11 aakoshh

Yep.

Stebalien avatar Nov 15 '22 22:11 Stebalien

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.

Stebalien avatar Dec 10 '22 22:12 Stebalien