ref-fvm
ref-fvm copied to clipboard
FVM: Pick page config params
We need a good number of initial and max pages that can absolutely 100% run any Filecoin message, but also doesn't gobble up too much memory. Experimenting with mainnet state is probably a good start pointe.
I think @raulk had some thoughts on initial values here.
For M1 (nv16), we are going with unlimited max pages given that the system can only run trusted logic via builtin system actors. However, it's not clear how many initial pages should be to avoid excessive memory expansion operations. Opened #369 to track that.
@Stebalien will your benchmarks yield a good value for initial pages?
For M2, there's a proposal here: https://github.com/filecoin-project/FIPs/pull/317.
Need to resurrect this issue for M2.1 (FEVM). In discussions over time we have settled on not charging for memory allocated, but rather for memory expansions. Finding the gas value/formula to charge per expansion will be subject of upcoming work, but for now we should at least set a max pages to a reasonable value (in the past we've discussed 64MiB, 256MiB, or 512MiB, IIRC).
We're sticking with 2GiB for now. Pending FIP.