-
Notifications
You must be signed in to change notification settings - Fork 129
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
Finishing "Additional priority boost for relayers that have explicitly registered at lane" #2605
base: bridges-v2
Are you sure you want to change the base?
Conversation
It is ready for review, but I'd like to extract couple of other changes into separate PRs to make it easier for review => still draft |
Marking this PR ready for review - it is still large, but all remaining changes are about managing those new |
I completely forgot about this gist I've made some time ago: https://gist.github.com/svyatonik/398bfd306541b693fe5afe37dc68f908 So #2597 + this PR + TODOs described in #2618 is the implementation of "Stage 1" from that gist, in particular this chapter: https://gist.github.com/svyatonik/398bfd306541b693fe5afe37dc68f908#relayers-queue-and-priority-boosts. I could provide more details if required, but feel free to review @paritytech/bridges-core . Thank you! |
related to #2486
follow up for #2597 (hence on top of it)
Opening it to give additional context when reviewing #2597. While there's still a lot of remaining work + a ton of TODOs, it show additional pallet calls + other changes, required for #2597. A brief overview:
LaneRelayersSet
structure. It contains the current active set of lane relayers + next set + a block number, when thenext_set
may replace theactive_set
;LaneRelayersSet
are ordered by the reward that they are willing to receive for delivering a single message. Relayers, which are ready to "work" for smaller reward will push our relayers, wanting larger reward. In theory it should eventually affect the message fee that is paid at the sending chain (AH) if we'll implement reporting (or sending chains will receive this information in some other way). For now it should make the bridge cheaper for mantainers;RequiredStake
was increased after relayer has registered itself);1_000
, registration may be active (so he can't claim his funds back) even at block2_000
if he's registered at some lane;register_at_lane
andderegister_at_lane
calls that the relayer will be able to call;enact_next_relayers_set_at_lane
call - it shall be called explicitly by one of relayers from thenext_set
for free (or for regular fee for other submitters) to activate thenext_set
. Why separate call? Because otherwise, we need to dance with hooks (on_initialize
,on_idle
, ...) and this is not well-scalable.There's a chance that I'll split this PR into several smaller PRs in the future, if it'll grow to unreviewable state.