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

feat: state: add a second premigration for nv17 #9525

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

arajasek
Copy link
Contributor

Related Issues

More work towards optimizing the migration

Proposed Changes

We move the first premigration back to be 2 hours before the upgrade.

  • Motivation: This is the part we really care about. We do not want any users entering the upgrade without at least one premigration, if possible.

We add a second premigration 7.5 minutes before the upgrade.

  • Motivation: This covers any state that's changed since the first premigration, and seems to give a 20% speed up to the actual migration time. If this doesn't complete on time, it isn't important.

This PR also adds more functionality to the lotus-shed tools around migrations and state diffs.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@arajasek arajasek requested a review from a team as a code owner October 20, 2022 17:18
}

return nil
},
}

func checkStateInvariants(ctx context.Context, v8StateRoot cid.Cid, v9StateRoot cid.Cid, bs blockstore.Blockstore) error {
actorStore := store.ActorStore(ctx, blockstore.NewTieredBstore(bs, blockstore.NewMemorySync()))
func checkStateInvariants(ctx context.Context, v8StateRoot cid.Cid, v9StateRoot cid.Cid, bs blockstore.Blockstore, epoch abi.ChainEpoch) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

For clarity all instances of checkStateInvariants should change to i.e. checkMigrationInvariants. This is the historical name for the pure state invariants check called as a subset of all migration checks in the commented out code below. Calls to check only the v9 pure state invariants should exist as a standalone command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good feedback, thank you!

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.

2 participants