-
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(f3): when returning a partially used lease, trim its ValidityTerm #12667
Conversation
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
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.
... I thought I had tested this. How is anything working?
Oh, I see. The lease will eventually expire. We just won't get the overlap behavior. |
@@ -104,6 +104,8 @@ func (l *leaser) participate(ticket api.F3ParticipationTicket) (api.F3Participat | |||
if found { | |||
// short-circuite for reparticipation. | |||
if currentLease == newLease { | |||
newLease.ValidityTerm = newLease.ToInstance() - instant.ID | |||
newLease.FromInstance = instant.ID |
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.
New lease is not stored in lease map. Should it be?
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.
It shouldn't be stored because the lease in the lease map is the decoded ticket. It's... confusing and we should probably do something about it.
lotus-rc2 miss-registered error types, rc3 does it correctly Next release will additionally contain fix for early reneweal. filecoin-project/lotus#12667 filecoin-project#312 is still an issue Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
lotus-rc2 miss-registered error types, rc3 does it correctly Next release will additionally contain fix for early reneweal. filecoin-project/lotus#12667 filecoin-project#312 is still an issue Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
lotus-rc2 miss-registered error types, rc3 does it correctly Next release will additionally contain fix for early reneweal. filecoin-project/lotus#12667 #312 is still an issue Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
…#12667) Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
…#12667) Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Otherwise the early renew logic will never trigger.