Files
dotCooCoo e49a0d628c Plug-ins: storage calls pay instructions for the bytes they move
The settings and cache imports could move up to 1 GiB a run while the
instruction budget charged only for the calls themselves. The bytes they
read or write now cost the run one instruction per 64 bytes, counted
over the whole run so that splitting a transfer into calls costs the
same. A get also pays for the bytes it copies into the module's memory
that the store didn't count, such as a setting answered from memory.

A storage call pays from the store's fuel and from the part of the
budget not yet handed out. The meter it gives the storage holds no more
bytes than those instructions pay for, so a read or write the run can't
pay for doesn't happen, and the run ends with "instruction budget". A
read or write past the 1 GiB still returns -7. Bytes beyond the current
slice are read or written only before the deadline and Cancel, and the
host checks the deadline and Cancel after every storage call, so a run
past either stops after the call instead of at the next slice.

The plug-in fuzz test now also makes writes of up to about 1 MiB on
small instruction budgets.

Docs: docs/plugins.md.
2026-11-20 21:38:22 -08:00
..