-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional fuel tracking for wasm execution #371
base: main
Are you sure you want to change the base?
Conversation
We should probably add a different error type to better handle out of fuel errors |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #371 +/- ##
==========================================
- Coverage 87.15% 86.84% -0.32%
==========================================
Files 43 43
Lines 18510 18064 -446
Branches 18510 18064 -446
==========================================
- Hits 16132 15687 -445
+ Misses 1048 1045 -3
- Partials 1330 1332 +2 ☔ View full report in Codecov by Sentry. |
clar2wasm/src/tools.rs
Outdated
|
||
assert!(env.evaluate("(+ 1 2)").is_err()); | ||
|
||
let mut env = TestEnvironment::new(StacksEpochId::latest(), ClarityVersion::latest(), Some(90)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know about 90
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trial and error, setting the limits will require a similar process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks promising. It is definitely a departure from the current cost-tracking model, but I think we can merge this and build from here to fully flesh out the new mechanism. Thanks @krl!
clar2wasm/src/tools.rs
Outdated
@@ -1,4 +1,4 @@ | |||
//! The `tools` module contains tools for evaluating Clarity snippets. | |||
//! THE `tools` module contains tools for evaluating Clarity snippets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Does the fuel mechanism have any impact on the execution time? |
Fuel tracking based on wasmtime for limiting execution