telosnetwork / teloscan

Telos EVM block explorer for viewing blocks, transactions, contracts, staking, and more
https://teloscan.io
Apache License 2.0
22 stars 25 forks source link

Rate limiting issue on Holders View #816

Open pmjanus opened 3 months ago

pmjanus commented 3 months ago

Describe the bug

Rate limiting issue when making too many requests to the TelosScan API for retrieving token holders. https://www.teloscan.io/address/0xa9991E4daA44922D00a78B6D986cDf628d46C4DD?tab=holders

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to the holders page
  2. Load a large number of token holders by paginating or requesting a large result set

Expected behavior

The application should be able to retrieve and display token holder information from the TelesScan API without encountering rate limiting errors (429 status code).

Viterbo commented 3 months ago

https://github.com/telosnetwork/teloscan/pull/830 partially addresses this issue since it creates a large cache of address names for the same purposes.

Also, this issue depends very much on https://github.com/telosnetwork/teloscan-indexer/issues/268

Viterbo commented 2 months ago

This issue will be solved with this PR changing the strategy to fetch the contract's metadata from the local cache and delegating the API the responsibility of populating that cache.