WASM: make host functions and reveals able to consume more than one tick
Context
This MR allows host functions and reveal to consume a certain amount of ticks, to mimic the behavior of a similar instruction in the regular interpreter that would take multiple ticks.
For example, writing memory of a certain size takes more than one tick, while using a host function to read a value from the durable storage and writing in memory will take a single one.
Note that for now every host function takes 1 ticks and needs to be benchmarked. This is only a framework.
Manually testing the MR
Trust the CI, but I'll try to write a test to check it works as expected.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Pierrick Couderc