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

Check datacaps for v8 verifreg match v9 datacap actor #9446

Conversation

geoff-vball
Copy link
Contributor

Related Issues

Proposed Changes

Adds a check to the lotus-shed migrate-nv17 command.

Additional Info

Checklist

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

  • All commits have a clear commit message.
  • The 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, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@geoff-vball geoff-vball requested a review from a team as a code owner October 6, 2022 20:04
@geoff-vball geoff-vball requested a review from arajasek October 6, 2022 20:04
@geoff-vball geoff-vball force-pushed the gstuart/check-state-invariants branch from 94fd9be to 1a1eff3 Compare October 6, 2022 20:08
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Some nits that I'll fix up in #9355


datacapV9State, err := datacap.Load(actorStore, datacapV9)
if err = actorStore.Get(ctx, datacapV9.Head, &datacapV9State); err != nil {
return nil, xerrors.Errorf("failed to get verifreg actor state: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

copypasta

for addr, oldDcap := range verifregDatacaps {
dcap, ok := newDatacaps[addr]
if !ok {
return xerrors.Errorf("datacap for address: %s not found in datacap state", addr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return xerrors.Errorf("datacap for address: %s not found in datacap state", addr)
return xerrors.Errorf("datacap for address %s not found in datacap state", addr)

@arajasek arajasek merged commit 098d403 into gstuart/integrate-verifreg-changes-fip45 Oct 6, 2022
@arajasek arajasek deleted the gstuart/check-state-invariants branch October 6, 2022 23:07
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