You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is to be able to meter EEs and store those in the yaml file. It should be possible to try different metering approaches.
Regarding the API I suggest a slightly different one to Ewasm 1.x, to follow the naming planned for Primea: ticks as opposed to gas, where ticks represent "cpu ticks" aka "cpu cycles".
The only API would be useTicks(i64). This has been added in 0b9882e.
As part of that ticks are hardcoded currently to 10_000_000 in Runtime. We could consider exposing this to the YAML.
The YAML should be extended with a ticksCount or ticksUsed field next to the expected post state.
Lastly, the question is how to inject metering. We could consider:
Using the sentinel contract as is, but that would require the subset of Ewasm 1.0 API.
Changing the sentinel contract to have a different wasm API.
Using sentinel-rs as a Rust crate.
Originally chisel was supposed to have the metering algorithm and sentinel-rs would be the contract version (but this hasn't happened yet) and as such sentinel-rs should not be a library. However probably the easiest we can do is include wasm-utils (with our changes) as a crate from the sentinel-rs git repo. We do need to add useTicks to it though.
The text was updated successfully, but these errors were encountered:
The goal is to be able to meter EEs and store those in the yaml file. It should be possible to try different metering approaches.
Regarding the API I suggest a slightly different one to Ewasm 1.x, to follow the naming planned for Primea:
ticks
as opposed togas
, where ticks represent "cpu ticks" aka "cpu cycles".useTicks(i64)
. This has been added in 0b9882e.Runtime.
We could consider exposing this to the YAML.ticksCount
orticksUsed
field next to the expected post state.Lastly, the question is how to inject metering. We could consider:
sentinel-rs
as a Rust crate.Originally chisel was supposed to have the metering algorithm and
sentinel-rs
would be the contract version (but this hasn't happened yet) and as suchsentinel-rs
should not be a library. However probably the easiest we can do is includewasm-utils
(with our changes) as a crate from the sentinel-rs git repo. We do need to adduseTicks
to it though.The text was updated successfully, but these errors were encountered: