Skip to content

Commit

Permalink
chore: backport FVM update (#423)
Browse files Browse the repository at this point in the history
* chore: update fvm

* chore: update fvm

---------

Co-authored-by: Steven Allen <[email protected]>
  • Loading branch information
arajasek and Stebalien authored Oct 3, 2023
1 parent b532413 commit 3f96cc8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
18 changes: 9 additions & 9 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ anyhow = "1.0.23"
serde_json = "1.0.46"
rust-gpu-tools = { version = "0.7", optional = true, default-features = false }
fr32 = { version = "9.0.0", default-features = false }
fvm4 = { package = "fvm", version = "~4.0.0-alpha.2", default-features = false }
fvm4_shared = { package = "fvm_shared", version = "~4.0.0-alpha.2" }
fvm4 = { package = "fvm", version = "~4.0.0-alpha.4", default-features = false }
fvm4_shared = { package = "fvm_shared", version = "~4.0.0-alpha.4" }
fvm3 = { package = "fvm", version = "~3.8.0", default-features = false }
fvm3_shared = { package = "fvm_shared", version = "~3.6.0" }
fvm2 = { package = "fvm", version = "~2.7", default-features = false }
Expand Down
11 changes: 7 additions & 4 deletions rust/src/fvm/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ mod v3 {

use fvm4::call_manager::{backtrace::Backtrace, backtrace::Cause, backtrace::Frame};
use fvm4::executor::{ApplyFailure, ApplyKind, ApplyRet};
use fvm4::gas::{Gas, GasCharge};
use fvm4::gas::{Gas, GasCharge, GasDuration};
use fvm4::kernel::SyscallError;

use fvm4::trace::ExecutionEvent;
Expand Down Expand Up @@ -389,9 +389,12 @@ mod v3 {
charge.compute_gas.as_milligas(),
),
other_gas: Gas::from_milligas(charge.other_gas.as_milligas()),
// TODO: There's no way to convert at the moment without a
// transmute.
elapsed: Default::default(),
elapsed: charge
.elapsed
.get()
.copied()
.map(GasDuration::from)
.unwrap_or_default(),
}))
}
ExecutionEvent3::Call {
Expand Down

0 comments on commit 3f96cc8

Please sign in to comment.