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

Enable "lightweight" migration support #8780

Closed
arajasek opened this issue Jun 1, 2022 · 2 comments · Fixed by #8843
Closed

Enable "lightweight" migration support #8780

arajasek opened this issue Jun 1, 2022 · 2 comments · Fixed by #8843
Assignees
Labels
P1 P1: Must be resolved
Milestone

Comments

@arajasek
Copy link
Contributor

arajasek commented Jun 1, 2022

As discussed in #8534, Lotus is continuing to rely on specs-actors for migrations, despite the refactor to have state types in go-state-types, and the introduction of the FVM.

While this motivates a larger redesign (that might eventually involve having the FVM perform these migrations through the FFI), there is a smaller actionable item: supporting actor code-only migrations in Lotus (no state transformation except the System Actor).

The inputs would simply be the old manifest, new manifest, and state root, and all the migration needs to do is convert all actor CIDs based on the manifests, and update the system actor state. This should be relatively easy to do quickly without any bells and whistles.

It would be good to have this ready sooner rather than later so as to support quick actor upgrades if needed.

@arajasek arajasek added this to the Network v16 milestone Jun 1, 2022
@arajasek
Copy link
Contributor Author

arajasek commented Jun 1, 2022

  • Link to actors top-level migration: https://github.com/filecoin-project/specs-actors/blob/master/actors/migration/nv16/top.go#L69
    • We need to poach most of this logic
    • We will need to either add an input manifest CID, or just have the migration use the system actor state. Latter is probably better.
    • We may want to drop the concurrent migration, just for simplicity.
    • We will need to keep the system actor state migration (changing from old manifest to new manifest). This is the only state migration we will need.
  • We probably want to put the new lightweight migration in chain/filcns/upgrades.go, or a new file alongside it.

@vyzo
Copy link
Contributor

vyzo commented Jun 2, 2022

Shouldnt this link to the nv16 migration?

We should use the system actor state for source, and only argument should be the new manifest cid i think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 P1: Must be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants