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
[ ] test coverage exists or has been added/updated
[ ] tested in a private testnet
Breaking changes
[ ] I have checked my code for breaking changes
[ ] If there are breaking changes, there is a supporting migration.
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