-
Notifications
You must be signed in to change notification settings - Fork 135
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
Enable performance based relayer selection #1226
Enable performance based relayer selection #1226
Conversation
x/treasury/keeper/grpc_query.go
Outdated
for k := range i { | ||
keys = append(keys, k) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
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.
Looks really good! Left a few comments but they're all just minor issues and nitpicking.
Co-authored-by: Luis Carvalho <mail.lmcarvalho@gmail.com>
Co-authored-by: Luis Carvalho <mail.lmcarvalho@gmail.com>
Co-authored-by: Luis Carvalho <mail.lmcarvalho@gmail.com>
Co-authored-by: Luis Carvalho <mail.lmcarvalho@gmail.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.
👍
Related Github tickets
Background
This change introduces fundamental changes to the relayer selection process. Live values are now gathered from the metrics module, and individual relayer fees are taken into account.
Going forward, it's paramount for relayers to make sure they have their fees set and configured for each chain, otherwise they will not be eligible for relaying anymore.
The majority of the changes are in
msg_assigner.go
, that's where most of your attention will be needed. It works by collecting metric and fee data once per block for all validators and ranking them. Then each message during that block will be filtered depending on its requirements, and the top ranking eligible validator will be picked (and removed from the cache).They become eligible again next block. There are still some issues with this algorithm though. At the moment, the logic will prioritize the few top ranking validators only, with little way for the mid tier to rank up. This will need to be revisited in the future for sure.
Testing completed
Breaking changes