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

Refactor Telos API endpoint settings to improve robustness #1950

Open
chuck-h opened this issue Jun 10, 2024 · 1 comment
Open

Refactor Telos API endpoint settings to improve robustness #1950

chuck-h opened this issue Jun 10, 2024 · 1 comment
Labels

Comments

@chuck-h
Copy link
Collaborator

chuck-h commented Jun 10, 2024

Background

The methods establishing endpoint URLs for blockchain http connections are confusing and fragile. API endpoints change over time, and most of the default values in the code are obsolete. The app relies on updated values from firebase remote config to replace these:
image
but connection_notifier is hard coded:
image
There are also a few hard-coded hypha.earth urls sprinkled around, not sure how many of them are dead.

There was a period of time when the telos.mainnet.net load-balancing endpoint was working well for us, but in Spring 2024 they put a rate limiter on it that locks us out during the burst of API calls at wallet startup. We will need to go back to finding our own public api providers (or eventually paid providers depending on how things scale and evolve).

Suggestion
API access should be refactored to have a single mechanism for reaching the Telos api that doesn't rely on telos.mainnet.net. When we get network errors we should use something like the connection_notifier code to pick a live endpoint from a list. The whole list should be updated from firebase remote config. (Also might access https://telos.antelope.tools/endpoints ).
ref https://github.com/JoinSEEDS/seeds_light_wallet/blob/master/lib/screens/app/interactor/viewmodels/connection_notifier.dart

@n13
Copy link
Member

n13 commented Jun 12, 2024

I would instead recommend:

1 - use the load balancer
2 - don't have a "burst of calls" on startup - this is here
#1951

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

No branches or pull requests

2 participants