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

Add a terminate sectors command to lotus-shed #4507

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

jennijuju
Copy link
Member

@jennijuju jennijuju commented Oct 20, 2020

Add terminate sectors based on 1475's #4433 implementation in lotus-shed:

  • 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.

jennijuju and others added 2 commits October 20, 2020 17:38
…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.
@jennijuju jennijuju changed the title Move #4433 to lotus-shed Move #4433 to lotus-shed with some UI change Oct 20, 2020
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.

One suggested change.

Otherwise looks good, I think, but lots of "Use with care" needs to be messaged.

}

fmt.Println("Message CID:", smsg.Cid())

Copy link
Contributor

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

lotus/cli/multisig.go

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

@arajasek arajasek changed the title Move #4433 to lotus-shed with some UI change Add a terminate sectors command to lotus-shed Oct 20, 2020
@arajasek arajasek merged commit 75eb644 into master Oct 20, 2020
@arajasek arajasek deleted the lotus-shed-terminate-1475 branch October 20, 2020 22:28
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.

3 participants