-
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
fix ticket expiration check #6635
fix ticket expiration check #6635
Conversation
… loops to retry GetTicket when retrying PreCommit1
this large number of cycles will cause the kvlog to increase rapidly |
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.
Thanks for the PR.
I'm not 100% sure if this will fully fix the issue, it likely can still happen after the precommit expires fully
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 good with 1 comment
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.
First pass looks good but I haven't fully reasoned about all the cases...Will do a second pass later (but okay to merge for now).
@@ -105,48 +105,66 @@ func checkTicketExpired(ticket, head abi.ChainEpoch) bool { | |||
return head-ticket > MaxTicketAge // TODO: allow configuring expected seal durations | |||
} | |||
|
|||
func (m *Sealing) getTicket(ctx statemachine.Context, sector SectorInfo) (abi.SealRandomness, abi.ChainEpoch, error) { | |||
func checkProveCommitExpired(preCommitEpoch, msd abi.ChainEpoch, currEpoch abi.ChainEpoch) bool { |
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.
should be called checkPreCommitExpired
?
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 is checking if we're past the time to prove (not precommit) a sector, so I think this name is correct
fix log Co-authored-by: Aayush Rajasekaran <[email protected]>
fix sector precommitted but expired judgment Co-authored-by: Łukasz Magiera <[email protected]>
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.
Thanks!
fix ticket expiration check, otherwise it may cause a large number of loops to retry GetTicket when retrying PreCommit1;
Because there may be C1 and C2 execution failures, and after they retries more than a certain number of times, will cause PreCommit1 to be re-executed, and now it is the submission period of 30, so it will cause an endless loop of repeated execution of GetTicket.