Skip to content
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

Out of fuel identification #617

Open
samuelmanzanera opened this issue Aug 7, 2024 · 1 comment
Open

Out of fuel identification #617

samuelmanzanera opened this issue Aug 7, 2024 · 1 comment

Comments

@samuelmanzanera
Copy link

samuelmanzanera commented Aug 7, 2024

Since wasmtime supports fuel consumption, we have the possibility to allow this feature from the engine.
However when the execution fails due to out of fuel the error message is not particularly clear.
We don't know if the error is related to module error (i.e. unreachable state) or fuel consumption.

Is it possible to return a custom error when the fuel is completely used and the flow is stopped ?

Thanks

@tessi
Copy link
Owner

tessi commented Aug 13, 2024

Hey @samuelmanzanera

I agree that it's hard to find out why exactly a wasm call fails. After some poking around in wasmtime's APIs I found a good approach on how to get more information out in some error scenarios. Do you mind giving this PR a try and see if it solves the issue?
#620

It's just added more information to the error reason string. It might be a bit nicer to have a separate atom for this for matching, but that would be a bit bigger of a refactor :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants