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

Sets gas sentinel in ibc_tx_charge_gas #2395

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/2395-gas-sentinel-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Ibc transactions can be rewrapped in case of a gas error.
([\#2395](https://github.com/anoma/namada/pull/2395))
2 changes: 2 additions & 0 deletions shared/src/vm/host_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,8 @@ where
// if we run out of gas, we need to stop the execution
let result = gas_meter.consume(used_gas).into_storage_result();
if let Err(err) = &result {
let sentinel = unsafe { ctx.sentinel.get() };
sentinel.set_out_of_gas();
tracing::info!(
"Stopping transaction execution because of gas error: {}",
err
Expand Down
Loading