-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Integrate specs-actors v3 #5363
Conversation
chain/stmgr/utils.go
Outdated
mid, err := address.IDFromAddress(maddr) | ||
if err != nil { | ||
return nil, xerrors.Errorf("getting miner ID: %w", err) | ||
} | ||
|
||
ids, err := pv.GenerateWinningPoStSectorChallenge(ctx, wpt, abi.ActorID(mid), rand, numProvSect) | ||
// TODO: move this to somewhere in specs-actors or the state types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @anorth. Will the winning proof always be paired 1:1 with the window post proof? If so, we should have a helper function to convert one to the other (well, ideally, we'd just get rid of the difference...).
The tricky part is that we're using the same type for winning and window proofs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know they will be paired 1:1, but I don't know the scope of possible futures. You need @porcuquine.
Winning PoSt has nothing to do with actors. The WinningPoSt proof types are declared there only for proximity to the other types, but arguably should be removed. It's unfortunate they use the same type, yes. We could probably make a change in Lotus in the near future to stop referencing the WinningPoSt constants altogether (by duplicating locally), opening up a path to removing them from there.
I think a mapping function in Lotus is the best immediate solution.
Devnet now runs past the upgrade epoch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, obviously some todos in the code, but generally looks good
@@ -704,6 +701,73 @@ func UpgradeCalico(ctx context.Context, sm *StateManager, cb ExecCallback, root | |||
return newRoot, nil | |||
} | |||
|
|||
func UpgradeActorsV3(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { | |||
buf := bufbstore.NewTieredBstore(sm.cs.Blockstore(), bstore.NewTemporarySync()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check how much memory this uses on mainnet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the best way to test this? compute-state on the live network? Or just set a node to run the upgrade early?
5eeeef5
to
6cbc978
Compare
Different maps have different parameters now so we just construct/load them manually where needed.
Well, not fully, but this is enough to ensure we use the correct bitwidth and such.
b9c3778
to
e8ecfed
Compare
d0413f7
to
032ebdc
Compare
It's causing the tests to flake.
032ebdc
to
d412ccd
Compare
It's kind of slow.
As in the title. Needs:
next
in a separate PR)Fixes #5363