Skip to content

Commit b715c94

Browse files
rjan90Stebalien
andauthored
chore: update FVM to v4.1.2 and v3.9.0 (filecoin-project#447)
* chore: update FVM to v4.1.2 chore: update FVM to v4.1.2 * chore: update fvm v3 This brings back the InvokeActor event to the v3 trace, but with all the new information we get in v4. Co-authored-by: Steven Allen <[email protected]>
1 parent 880602e commit b715c94

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

rust/Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ rayon = "1.2.1"
3131
anyhow = "1.0.23"
3232
serde_json = "1.0.46"
3333
rust-gpu-tools = { version = "0.7", optional = true, default-features = false }
34-
fvm4 = { package = "fvm", version = "~4.1.1", default-features = false }
35-
fvm4_shared = { package = "fvm_shared", version = "~4.1.1" }
36-
fvm3 = { package = "fvm", version = "~3.8.0", default-features = false }
34+
fvm4 = { package = "fvm", version = "~4.1.2", default-features = false }
35+
fvm4_shared = { package = "fvm_shared", version = "~4.1.2" }
36+
fvm3 = { package = "fvm", version = "~3.9.0", default-features = false }
3737
fvm3_shared = { package = "fvm_shared", version = "~3.6.0" }
3838
fvm2 = { package = "fvm", version = "~2.7", default-features = false }
3939
fvm2_shared = { package = "fvm_shared", version = "~2.6" }

rust/src/fvm/engine.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ mod v3 {
274274
use fvm4::trace::ExecutionEvent;
275275
use fvm4_shared::{
276276
address::Address, econ::TokenAmount, error::ErrorNumber, error::ExitCode, message::Message,
277-
receipt::Receipt,
277+
receipt::Receipt, state::ActorState,
278278
};
279279

280280
use crate::fvm::engine::{
@@ -427,6 +427,24 @@ mod v3 {
427427
.unwrap_or(ErrorNumber::AssertionFailed),
428428
)))
429429
}
430+
ExecutionEvent3::InvokeActor { id, state } => {
431+
Some(ExecutionEvent::InvokeActor {
432+
id,
433+
state: ActorState {
434+
code: state.code,
435+
state: state.state,
436+
sequence: state.sequence,
437+
balance: TokenAmount::from_atto(
438+
state.balance.atto().clone(),
439+
),
440+
delegated_address: state
441+
.delegated_address
442+
// Do our best to convert the address, or drop it if
443+
// that's impossible for some reason.
444+
.and_then(|a| Address::from_bytes(&a.to_bytes()).ok()),
445+
},
446+
})
447+
}
430448
_ => None,
431449
})
432450
.collect(),

0 commit comments

Comments
 (0)