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

Allow starting networks from arbitrary actor versions #5817

Closed
arajasek opened this issue Mar 15, 2021 · 1 comment · Fixed by #6305 or #6333
Closed

Allow starting networks from arbitrary actor versions #5817

arajasek opened this issue Mar 15, 2021 · 1 comment · Fixed by #6305 or #6333
Assignees
Labels
area/chain Area: Chain P2 P2: Should be resolved

Comments

@arajasek
Copy link
Contributor

arajasek commented Mar 15, 2021

First step is to support generating genesis files from not-v0 actors.

Motivation:
The primary motivation here is to be able to start networks from arbitrary actor versions, which allows other implementations of the Filecoin protocol to be able to sync a chain even if they only have support from, say, v3 actors and onwards. More broadly, this advances the goal of making the Lotus codebase and utils less mainnet-specific. One could start a chain from any actor's version and so should be able to, even if the actual Filecoin mainnet started from v0.
Design and steps:

  • Get familiar with the genesis creation code in chain/gen/genesis.go. The key methods are MakeGenesisBlock and MakeInitialStateTree.
  • Tweak the code to receive an actors version as a parameter (chain/actors/version.go for actors versions). Maybe this goes into the genesis template in genesis/types.go.
  • Based on provided actors version, use the appropriate version of specs-actors when constructing state tree (bultion0.AccountActorCodeID -> builtin4.AccountActorCodeID, for example)
  • Start the network from the appropriate network version (e.g. network v14 for actors v4). Bit unclear how to do this, probably requires tweaking how we set up the stage in the build params file (see the NewStateManagerWithUpgradeSchedule method).
  • Iron out remaining kinks
    Testing:
    The best way to test this out would be to run a devnet that starts from a non-v0 actors version. Doing so will require tweaking the upgrade epoch heights in params_2k.go. The next step will be to kick off the desired interopnet using this new feature, and seeing if that works well.
@jennijuju jennijuju added this to the v1.9.x milestone Apr 30, 2021
@jennijuju jennijuju added the area/chain Area: Chain label Apr 30, 2021
@jennijuju jennijuju added the P2 P2: Should be resolved label Apr 30, 2021
@jennijuju jennijuju mentioned this issue May 4, 2021
80 tasks
@BigLep BigLep modified the milestones: v1.9.x, Hyperdrive May 14, 2021
@magik6k magik6k reopened this May 26, 2021
@magik6k
Copy link
Contributor

magik6k commented May 26, 2021

Reverted temporary in #6330 due to a regression in devnet setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chain Area: Chain P2 P2: Should be resolved
Projects
None yet
4 participants