-
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 a terminate sectors command to lotus-shed #4507
Conversation
…hed: - Moving the cmd to lotus-shed so that miners can use this right away without waiting for fsm changes.- Note: this should only be used when the miner is 100% sure that they want to terminate the sector on chain and they will be lose the power and pay a big one-time termination penalty for the sectors. - Only live sectors can be terminated. - To use, run `./lotus-shed sectors terminate --really-do-it=true sectorNum1 sectorNum2`. - A message will be sent and after the message is landed on chain, miner can run `lotus-miner sectors status --on-chain-info <terminated sector number>`, and check Expiration Info at the bottom. Both `OnTime` and `Early` are 0 indicates the sector is terminated.
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.
One suggested change.
Otherwise looks good, I think, but lots of "Use with care" needs to be messaged.
} | ||
|
||
fmt.Println("Message CID:", smsg.Cid()) | ||
|
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.
Can we add a StateWaitMsg
call until the message lands on chain here (see the multisig cli for examples, like
Lines 552 to 563 in c56ef26
fmt.Println("sent approval in message: ", msgCid) | |
wait, err := api.StateWaitMsg(ctx, msgCid, uint64(cctx.Int("confidence"))) | |
if err != nil { | |
return err | |
} | |
if wait.Receipt.ExitCode != 0 { | |
return fmt.Errorf("approve returned exit %d", wait.Receipt.ExitCode) | |
} | |
return nil |
d8fee58
to
ee5dcbc
Compare
Add terminate sectors based on 1475's #4433 implementation in lotus-shed:
./lotus-shed sectors terminate --really-do-it=true sectorNum1 sectorNum2
.lotus-miner sectors status --on-chain-info <terminated sector number>
, and check Expiration Info at the bottom. BothOnTime
andEarly
are 0 indicates the sector is terminated.