OriginProtocol / OriginProtocol/origin-website
update_token_insight.py script failure
Open
Nobody has claimed this yet.
bug
- Dominant language
- HTML
- Stars
- 41
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
We seem to be hitting what I think are etherscan rate limiting when the update_token_insight.py script runs.
Seen in the logs:
2023-04-27T19:05:54.791682+00:00 app[scheduler.1237]: Error while fetching balance
2023-04-27T19:05:54.791698+00:00 app[scheduler.1237]: {'status': '0', 'message': 'NOTOK', 'result': 'Max rate limit reached'}
2023-04-27T19:05:54.840276+00:00 app[scheduler.1237]: Traceback (most recent call last):
2023-04-27T19:05:54.842113+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 483, in <module>
2023-04-27T19:05:54.842267+00:00 app[scheduler.1237]: fetch_reserved_wallet_balances()
2023-04-27T19:05:54.842271+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 453, in fetch_reserved_wallet_balances
2023-04-27T19:05:54.842340+00:00 app[scheduler.1237]: fetch_wallet_balance(token_stats.new_foundation_reserve_address)
2023-04-27T19:05:54.842342+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 389, in fetch_wallet_balance
2023-04-27T19:05:54.842406+00:00 app[scheduler.1237]: ogn_balance = fetch_wallet_token_balance(wallet, token_stats.ogn_contract)
2023-04-27T19:05:54.842407+00:00 app[scheduler.1237]: File "/app/logic/scripts/update_token_insight.py", line 359, in fetch_wallet_token_balance
2023-04-27T19:05:54.842467+00:00 app[scheduler.1237]: raise ValueError(resp["message"] or ("Failed to fetch %s balance" % token_addr))
2023-04-27T19:05:54.842478+00:00 app[scheduler.1237]: ValueError: NOTOK
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read logic/scripts/update_token_insight.py around fetch_wallet_token_balance at line 349 and trace the calls shown in the traceback. Reproduce or inspect the scheduler failure, then define and verify the expected behavior when Etherscan returns “Max rate limit reached”; the issue does not specify the intended handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100