noble-assets / noble-cctp-relayer

Apache License 2.0
15 stars 9 forks source link

Excessive Chain Requests / Subscriptions #78

Closed joelsmith-2019 closed 7 months ago

joelsmith-2019 commented 7 months ago

With the latest metrics update, the relayer subscribes to 'newHeads' on ETH-based chains. This subscription is triggered every time a chain produces a new block. This new change is resulting in excessive requests to our chain providers. Arbitrum, for example, is producing over 300K blocks a day.

Proposed Changes: The relayer should only make occasional requests to retrieve the latest chain height. The latest chain height is not responsible for gathering the latest CCTP transactions, but simply for flushing and metrics. We utilize a different subscription for retrieving valid CCTP transactions.