UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
361 stars 175 forks source link

fix: multichain blocks in serverless hub #4706

Closed Reinis-FRP closed 4 months ago

Reinis-FRP commented 4 months ago

Motivation

The logic for multichain bot block number fetching in serverless hub still deviates from single chain bots that result in not caching of fetched block numbers for multichain bots and starting from genesis block first time when multichain bot is added for new chain.

Summary

Fixes the issue by using the same logic in multichain block number fetching as is used for single chain bots.

Details

Batches single chain and multichain block number fetching in a single promises array that is then processed using the same logic.

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

Issue(s)

Fixes: https://linear.app/uma/issue/UMA-2413/improve-block-number-fetching-for-multichain-blocks-in-hub

linear[bot] commented 4 months ago

UMA-2413 Improve block number fetching for multichain blocks in hub