Open Stebalien opened 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.
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.
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:
fvm_actor1::get_state_root
,fvm_actor1::set_state_root
,fvm_actor1::current_balance
-- small fixed charge?ipld1::block_stat
,ipld1::block_read
-- charge for block_id resolution.ipld1::block_open
-- find some way to handle the variable (size-based) charge before opening the block. We charge after the fact, but we likely need to either (a) reserve some maximum or (b) change the underlying blockstore interface to allow us to lookup a block and the block's size before actually loading it.fvm_actor1::balance_of
,fvm_actor1::get_actor_code_cid
,fvm_actor1::lookup_delegated_address
,fvm_actor1::resolve_address
-- charge for cached lookups.fvm_actor1::exit
-- charge for "unwinding" the stack?Assumes https://github.com/filecoin-project/FIPs/discussions/845: