-
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
Add commands to change the worker key #4513
Conversation
var actorConfirmChangeWorker = &cli.Command{ | ||
Name: "confirm-change-worker", | ||
Usage: "Confirm a worker address change", | ||
ArgsUsage: "[address]", |
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.
I could drop this flag, but it's nice to check twice.
cmd/lotus-storage-miner/actor.go
Outdated
if !cctx.Bool("really-do-it") { | ||
fmt.Println("Pass --really-do-it to actually execute this action") | ||
return nil | ||
} |
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.
Probably not necessary for this command?
worker, err := api.StateAccountKey(ctx, mi.Worker, types.EmptyTSK) | ||
if err != nil { | ||
return nil, err | ||
} |
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.
I assume we just needed to do this to perform the sanity checks inside the miner. I'm now only resolving the worker key there: https://github.com/filecoin-project/lotus/pull/4513/files#diff-e5e6c18c093f7eb4f4d0bb2e19388a831f34ded5ceeff4737091f6dc686aafe6R181-R184
Looks like real test failures, still need to figure out what I broke... |
b1d4653
to
fed47cd
Compare
Ok... fixed. |
f6b0de1
to
43eb06f
Compare
b86d633
to
9ea309a
Compare
9ea309a
to
8380c96
Compare
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.
Looks like this may even work, would be really good to test on some devnet / in pond first
Just 1.5 nits
8f560e0
to
d244d96
Compare
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.
LGTM
Fixed and rebased. |
e6f490f
to
6790c50
Compare
6790c50
to
832c099
Compare
if s.worker != worker { | ||
s.worker = worker | ||
msg.From = s.worker | ||
return xerrors.Errorf("error getting miner info: %w", err) | ||
} |
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.
My original patch didn't bother caching (see above comment) but this was added in by a subsequent commit on master. I can add this back if desired, but it seems unnecessary and storing the key seems error prone.
No description provided.