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

fvm debug execution #288

Merged
merged 6 commits into from
Jun 23, 2022
Merged

fvm debug execution #288

merged 6 commits into from
Jun 23, 2022

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Jun 10, 2022

@vyzo vyzo marked this pull request as ready for review June 10, 2022 17:42
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is sound. But I agree with raul on deduplicating (or just combining into a single method entirely).

@raulk
Copy link
Member

raulk commented Jun 21, 2022

@vyzo Can you please remove the duplication so we can merge this PR?

@vyzo
Copy link
Contributor Author

vyzo commented Jun 21, 2022

yes of course!

@vyzo vyzo force-pushed the feat/debug-execution branch from 21bf73a to 4effec4 Compare June 22, 2022 09:22
@vyzo
Copy link
Contributor Author

vyzo commented Jun 22, 2022

Changes:

  • rebased on master and squashed a few commits
  • patched ref-fvm to point to release/v1 branch which contains the debug execution feature
  • deduplicated the code.

Should be ready now.

@vyzo vyzo requested a review from raulk June 22, 2022 09:35
Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM besides the comments. Would prefer @Stebalien to give the final signoff as a more active maintainer of this repo.

Comment on lines 81 to 94
let manifest_cid = match manifest_cid {
Some(manifest_cid) => {
let cid = Cid::try_from(&manifest_cid[..])
.map_err(|err| anyhow!("invalid manifest: {}", err))?;
Some(cid)
}
// handle cid.Undef for no manifest
// this can mean two things:
// - for pre nv16, use the builtin bundles
// - for nv16 or higher, it means we have already migrated state for system
// actor and we can pass None to the machine constructor to fish it from state.
// The presence of the manifest cid argument allows us to test with new bundles
// with minimum friction.
None
None => None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a longer version and a bit pedantic with None => None. Since we're changing this, wouldn't it be more succinct to have a manifest_cid.map()?

Copy link
Contributor Author

@vyzo vyzo Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map didnt like me, but i can remove the comment completely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a "rusty" way of doing this, which you can feel free to revert if it triggers something. it's more of a demonstration than anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it came from outer space... this language is an obscurity competition.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Says the lisper (although APL still wins this round).

@@ -102,9 +101,28 @@ fn create_fvm_machine(
Ok(Some(manifest)) => {
network_config.override_actors(manifest);
}
Ok(None) => {}
Ok(None) => (),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its equivalent, so its a matter of style; fine with reverting it.

Feel free to revert if this is too rusty.
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works (once we've removed the branch dependencies). Are we planning on getting this into the lotus release? If so, we should revert the dependency updates in Cargo.toml.

Comment on lines 81 to 94
let manifest_cid = match manifest_cid {
Some(manifest_cid) => {
let cid = Cid::try_from(&manifest_cid[..])
.map_err(|err| anyhow!("invalid manifest: {}", err))?;
Some(cid)
}
// handle cid.Undef for no manifest
// this can mean two things:
// - for pre nv16, use the builtin bundles
// - for nv16 or higher, it means we have already migrated state for system
// actor and we can pass None to the machine constructor to fish it from state.
// The presence of the manifest cid argument allows us to test with new bundles
// with minimum friction.
None
None => None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a "rusty" way of doing this, which you can feel free to revert if it triggers something. it's more of a demonstration than anything.

@vyzo
Copy link
Contributor Author

vyzo commented Jun 22, 2022

I think we are aiming for lotus master -- @arajasek ?

@arajasek arajasek merged commit 0d607fd into master Jun 23, 2022
arajasek added a commit that referenced this pull request Jun 23, 2022
@arajasek arajasek mentioned this pull request Jun 28, 2022
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

Successfully merging this pull request may close these issues.

4 participants