Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[+] Multi client for async tron #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

NitaKai
Copy link

@NitaKai NitaKai commented Nov 1, 2024

No description provided.

@NitaKai
Copy link
Author

NitaKai commented Nov 4, 2024

@andelf

@MrNaif2018
Copy link
Collaborator

Hi! I assume this is just a port from sync version of HTTPProvider.
In general this code of rate limit management is not optional, and hardcoding api keys isn't optimal either. The best is to use a different RPC, e.g. ankr which is also free.
I mean I can merge it to make both http providers use the same method, but honestly ankr is just better

@NitaKai
Copy link
Author

NitaKai commented Nov 4, 2024

Yep, it's just a port. But if I need more rps than ankr and trongrid can provide me, so use many keys instead of one
Ankr has only 30 rps and can't help me

@MrNaif2018
Copy link
Collaborator

Ankr has 1 million calls per day I think, and it's more than enough for me to parse the whole blockchain. Maybe re-adjust your logic instead of indeed sending too many requests. Another good way to fix it is to use https://pypi.org/project/aiolimiter/ and just send your requests at an a bit slower pace, then you will never ever hit a rate limit.
I'll merge this later when I run some tests locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants