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

feat: add InUnsealed utility to boostx #1680

Merged
merged 2 commits into from
Sep 7, 2023
Merged

Conversation

LexLuthr
Copy link
Collaborator

@LexLuthr LexLuthr commented Sep 7, 2023

Tested on devnet

# boostx sector is-unsealed --help
NAME:
   boostx sector is-unsealed - boostx sector is-unsealed <Sector ID>

USAGE:
   boostx sector is-unsealed [command options] [arguments...]

DESCRIPTION:
   Check if a particular sector is unsealed using the miner API. This is a definitive method to check for unsealed copies

OPTIONS:
   --api-fullnode value  the endpoint for the full node API
   --api-storage value   the endpoint for the storage node API
   --help, -h            show help

For pre-sealed sector

# boostx sector is-unsealed --api-fullnode $FULLNODE_API_INFO --api-storage $MINER_API_INFO 0
Sector 0 is NOT unsealed

For a new deal sector

# boostx sector is-unsealed --api-fullnode $FULLNODE_API_INFO --api-storage $MINER_API_INFO 1
Sector 1 is unsealed

@LexLuthr LexLuthr requested a review from dirkmc September 7, 2023 11:02
Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

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

Looks great! Nice work 🙌

Comment on lines 136 to 140
err = lib.CheckFullNodeApiVersion(ctx, fullnodeApi)
if err != nil {
return err
}

Copy link
Contributor

Choose a reason for hiding this comment

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

For simplicity I'd suggest we don't check the api version - probably this particular API is not going to change, and this way the SP doesn't have to worry about getting the version of the API in boostx to exactly match the API version in lotus-miner

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Shall I remove it from

err = lib.CheckFullNodeApiVersion(ctx, fullnodeApi)
as well? The use case as same.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure sounds good 👍

@LexLuthr LexLuthr merged commit d43861b into main Sep 7, 2023
@LexLuthr LexLuthr deleted the feat/check-IsUnsealed branch September 7, 2023 12:36
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