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

fix ticket expiration check #6635

Merged
merged 4 commits into from
Jul 2, 2021

Conversation

llifezou
Copy link
Contributor

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.

… loops to retry GetTicket when retrying PreCommit1
@llifezou
Copy link
Contributor Author

this large number of cycles will cause the kvlog to increase rapidly

Copy link
Contributor

@magik6k magik6k left a 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

extern/storage-sealing/states_sealing.go Show resolved Hide resolved
@magik6k magik6k mentioned this pull request Jul 1, 2021
10 tasks
Copy link
Contributor

@magik6k magik6k left a 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

extern/storage-sealing/states_sealing.go Outdated Show resolved Hide resolved
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.

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

extern/storage-sealing/states_sealing.go Outdated Show resolved Hide resolved
@@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be called checkPreCommitExpired?

Copy link
Contributor

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

llifezou and others added 2 commits July 2, 2021 11:38
fix log

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
fix sector precommitted but expired judgment

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

None yet

4 participants