-
Notifications
You must be signed in to change notification settings - Fork 130
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
Introduce ActiveLaneRelayersSet and NextLaneRelayersSet #2627
Merged
Conversation
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
svyatonik
commented
Oct 17, 2023
/// | ||
/// Relayers set is a bounded priority queue, where relayers with lower expected reward are | ||
/// prioritized over greedier relayers. At the end of epoch, we select top | ||
/// `MaxActiveRelayersPerLane` relayers from the next set and move them to the next set. To |
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.
Please note that it isn't the whole solution - there's yet two additional steps mentioned in #2605 (comment) and extracted to the #2618
serban300
reviewed
Oct 25, 2023
serban300
approved these changes
Oct 27, 2023
bkontur
pushed a commit
that referenced
this pull request
May 7, 2024
* intreoduce ActiveLaneRelayersSet and NextLaneRelayersSet * more tests * fix runtimes * CI * CI 2 * CI 3 * apply review suggestions * return Option<> from try_remove * RelayerAndReward -> LaneRegistration * separate BTreeSet -> boolean flag
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
related to #2486
extracted from #2605
I'm splitting #2605 into smaller parts (while still fixing remaining TODOs there), because it is IMO easier to review it that way (#2605 is too large already). Feel free to argue - I'll close this PR and leave all changes in the #2605.
This PR adds two structures
ActiveLaneRelayersSet
andNextLaneRelayersSet
+ two runtime storage values for those (instead of oneLaneRelayersSet
that was there previously). Later we'll add two three calls to:NextLaneRelayers
;NextLaneRelayers
;ActiveLaneRelayers
with theNextLaneRelayers
.Why two storage values instead of one? Because
NextLaneRelayers
is only touched in above ^^^ calls andActiveLaneRelayers
will be touched during every message delivery and confirmation transaction. So it makes sense to have two storage values to decrease PoV.