We wanted to share some finding we had when we tried using execute_metered_cost.
The context is that using execute for executing Ethereum mainnet blocks, but for some using execute_metered_cost returned empty public inputs (which shouldn't be the case).
Quoting @han0110 in his findings:
OpenVM has the a hook to check if the execution should suspend or not, and the impl MeteredCostCtx::should_suspend check if the cost has exceeded the configured maximum one (default to DEFAULT_MAX_COST and no way to configure in SDK unless we inline the code).
And I tried to run the tests again and found that indeed for some blocks the maximum cost is reached, so the execution is suspended earlier, and that's why we have the public values all zeros.
It feels like the right solution might be to allow the max cost to be configurable via SDK, but leaving that open to maintainers, since maybe there was a reason for not doing that.
We wanted to share some finding we had when we tried using
execute_metered_cost.The context is that using
executefor executing Ethereum mainnet blocks, but for some usingexecute_metered_costreturned empty public inputs (which shouldn't be the case).Quoting @han0110 in his findings:
It feels like the right solution might be to allow the max cost to be configurable via SDK, but leaving that open to maintainers, since maybe there was a reason for not doing that.