Skip to main content

ecall_dynamic_cost

Function ecall_dynamic_cost 

Source
pub fn ecall_dynamic_cost(is_ecalli: bool) -> u64
Expand description

Dynamic floor charged at every ecall block (the per-op base), keyed only on the instruction type — which both engines know at the ecall, so they charge identically: ecalli (host call) → HOST_CALL_FLOOR; ecall.jar (MGMT / CALL) → MGMT_OP_COST.

An in-kernel CALL (ecall.jar OP_HOST_CALL) pays this floor plus call_frame_cost (compile + eager read-only page-in + frame setup), charged by the kernel CALL dispatch once it has resolved the callee Image. TODO(gas-calibration): placeholder. Both engines must keep using this one function for the floor.