filecoin-project / ref-fvm

Reference implementation of the Filecoin Virtual Machine
https://fvm.filecoin.io/
Other
385 stars 140 forks source link

Gas: Repricing for native wasm #1909

Open Stebalien opened 1 year ago

Stebalien commented 1 year ago

We need to improve the accuracy of the gas model to account for some fixed costs before we allow native webassembly actors. We accurately charge for (almost) all variable costs but we have several syscalls that don't have any explicit costs beyond the base "syscall" cost of 14000 gas:

Assumes https://github.com/filecoin-project/FIPs/discussions/845:

  1. Move context APIs to global variables.
  2. Make some APIs privileged.
maciejwitowski commented 1 year ago

@Stebalien to me this sounds more like a direct prerequisite of native WASM actors than general "FVM Foundational improvements". I suggest we schedule it in the roadmap only if we schedule native WASM actors too.

Stebalien commented 1 year ago

That's basically what the foundational improvements are. We need to address this issue for native wasm support, but we likely should address it anyways.