-
Notifications
You must be signed in to change notification settings - Fork 101
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
Refund leases that have not started. #206
Merged
fellowship-merge-bot
merged 11 commits into
polkadot-fellows:main
from
eskimor:rk-migrate-lazy-leases
Mar 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2cd4366
Also migrate leases that have not started.
69d1b23
Revert "Also migrate leases that have not started."
fe68b49
Clear all leases for unsupported.
099e179
Return value still needed.
f6cb253
Add changelog entry.
08d6d99
Merge branch 'main' into rk-migrate-lazy-leases
eskimor 1b491de
Update CHANGELOG.md
eskimor b951ddf
Merge branch 'main' into rk-migrate-lazy-leases
eskimor 619009a
Merge branch 'main' into rk-migrate-lazy-leases
eskimor dcee4ba
Add logging target.
4e1ebb1
Merge branch 'main' into rk-migrate-lazy-leases
bkchr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If they currently have an active lease which ends in say three months, then also won an auction which gives them a lease starting in three months, then this will kick them off their current lease as well as the one that has not yet started. Surely the intended functionality is that they are refunded for only the lease that has not yet started.
Or can they only swap at the point their current lease ends, i.e. the second lease that has not started is always under a separate
para_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.
In your particular scenario there would be no
None
s .. .you have a lease for the next three months and one an auction for the ones afterwards ... all good.In general, what happens here is you either get your lease to coretime or not. If not, you get all your leases refunded - even an ongoing one as in fact you just lost it. So this looks correct to me.
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.
Sorry, bad example. Slightly different to get a
None
in there but keeping my question the same:If they currently have an active lease which ends three months, then also won an auction which gives them a lease starting in four and half months, they have a
None
in there, they'll be refunded their future lease but also booted off their current lease three months earlier than they expected.Maybe that's a bit contrived, but I don't think a current lease should not be migrated, even if it is refunded, just because they have a gap before the lease they have won starts.
Maybe this edge case doesn't exist in reality, in which case all good.
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.
But in that case they already have a hole and thus downtime. I would assume if that edge case even exists that some more downtime won't kill them.
Not saying that this is ideal, but:
(1) I would really assume that this is an edge case that will very likely not even exist. And if so, a solution might be similar to whatever we are going to do about swaps.
(2) We could trim the leases to the first
None
, but then we would have another problem: The leases after theNone
s would keep their token locked, despite the fact that we would have ended their lease on coretime.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.
Missed this the other day, that sounds sensible to me