-
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
Extending sectors: more practical and flexible tools #6097
Conversation
The gas-feecap seems not working as expected. Will fix it. |
cmd/lotus-storage-miner/sectors.go
Outdated
} | ||
MaxExpiration := sector.Activation + maxLifetime | ||
|
||
MaxExtendNow := currEpoch + miner3.MaxSectorExpirationExtension |
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.
nit: miner5
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.
Fixed. And code rebased onto master.
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.
To merge you need to get ci passing. There are some lint errors and something going on with gen-check.
I'm not going to block merging on this but the code for the renew command would benefit from more decomposition. There are lots of separate logical pieces here that you could split out to help with future maintenance. If you go down this route you could test these pieces separately which will help increase the confidence that everything works as it should.
cmd/lotus-miner/sectors.go
Outdated
return &res, nil | ||
} | ||
|
||
// Example: {1,3,4,5,8,9} -> "1,3-5,8-9" |
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.
nit: // Duplictes are not filtered, inputs must be sorted
cmd/lotus-miner/sectors.go
Outdated
}, | ||
&cli.StringFlag{ | ||
Name: "max-fee", | ||
Usage: "use up to this amount of attoFIL for one message. pass this flag to avoid message congestion.", |
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.
This should now be specified in FIL (see later comment or recent change to mpool replace)
cmd/lotus-miner/sectors.go
Outdated
mf, err := types.BigFromString(cctx.String("max-fee")) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
spec := &api.MessageSendSpec{MaxFee: mf} |
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.
mf, err := types.BigFromString(cctx.String("max-fee")) | |
if err != nil { | |
return err | |
} | |
spec := &api.MessageSendSpec{MaxFee: mf} | |
mf, err := types.ParseFIL(cctx.String("max-fee")) | |
if err != nil { | |
return err | |
} | |
spec := &api.MessageSendSpec{MaxFee: abi.TokenAmount(mf)} |
cmd/lotus-miner/sectors.go
Outdated
fmt.Println(smsg.Cid()) | ||
} | ||
|
||
fmt.Printf("Totally %d sectors renewed\n", stotal) |
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.
nit: "%d sectors renewed"
@ZenGround0 lint and gen-check got passed. Please also consider #6961 for a more intuitive display of expiration time (and mainnet epoch time in general). |
New cli tools for managing sectors expiration:
check-expire
, facilitates insepection of expiring sectorsrenew
, a more practical alternative toextend
with the following features:can automatically extend sectors of all kinds of seal proof, not just v1 ones
can mannully provide sector numbers in a file
can choose from 2 extending schemes: a relative extension or an uniform new expiration
will take care of
SectorMaxLifetime
andMaxSectorExpirationExtension
fast search of sector location
can specify max-fee to avoid message congestion