Operation to bump paid storage
Some contracts have their storage size fluctuate a lot. When several operations on that contract are going to be added at the same level, a few of them are likely to fail because their storage limit, computed by simulation, is too low for the real paid_storage_size_diff. This led to the opening of #1384 by @roxane3 and @jevonearth.
Computing a better estimate of the storage limit would be hard (static analysis, ...). In the meantime, here is a mitigation that should be quite easy to implement:
An operation to bump the prepaid storage of a contract. It would just be similar to a transfer from a tz1 to a contract's paid storage. Anyone could do it, a dapp author, a dapp user, a philanthropist, ...
Question: this is an external operation. What if we wanted to be able to do it as an internal operation too? Should it be implemented via a special entrypoint?
Cc @vbotbol @romain.nl protocol shepherds. Cc @bsall for token managements.
-
TZIP -
Implementation