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

Duplicate fvm_shared::actor::builtin::Type into runtime::builtins::Type #547

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

anorth
Copy link
Member

@anorth anorth commented Aug 15, 2022

This PR copies the builtin actor Type enum out of the FVM SDK into the built-in actors repo.

Breaking coupling is necessary to enable development of the built-in actors (e.g. adding a new one) without depending on changes to the FVM SDK. Since the FVM doesn't want to depend on the actors, any changes to the enum need to be propagated to the FVM.

This removes all but one reference to the path fvm_shared::actor, the holdout being the conversion between the two Type enums at the SDK syscall. This last one should be removed by changing the SDK to pass through the bare i32 value that it wrapped.

[~/p/f/builtin-actors](anorth/builtin-type)$ rg 'fvm_shared::actor'
runtime/src/runtime/fvm.rs
173:        let t = fvm_shared::actor::builtin::Type::from_i32(typ as i32).unwrap();

Closes #520.

Copy link
Contributor

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

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

Can't speak to the implications on fvm side but for builtin actors this change LGTM

@anorth anorth merged commit 3868e5d into master Aug 16, 2022
@anorth anorth deleted the anorth/builtin-type branch August 16, 2022 03:00
shamb0 pushed a commit to shamb0/builtin-actors that referenced this pull request Oct 3, 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.

Decouple actor Type enum from the FVM
2 participants