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

Balances really slow for one Safe in Base network #2283

Closed
Uxio0 opened this issue Oct 25, 2024 · 1 comment · Fixed by #2326
Closed

Balances really slow for one Safe in Base network #2283

Uxio0 opened this issue Oct 25, 2024 · 1 comment · Fixed by #2326
Assignees
Labels
bug Something isn't working

Comments

@Uxio0
Copy link
Member

Uxio0 commented Oct 25, 2024

For https://safe-transaction-base.safe.global/api/v1/safes/0x32e52896663De88a65c2D94917b006404415A89f/balances/ is really slow (until cache is warm).

After debugging it, we realised is not an RPC or database optimization issue.

The issue is that for a lot of tokens they don't exist in the database so we try to recover them from blockchain, with no luck as they don't hold usual ERC20 information like name or symbol: https://basescan.org/address/0x20b09dCb0Ca884448acE9DDB10D7851Bfe26C261#readContract

Method causing the bottleneck: https://github.com/safe-global/safe-transaction-service/blob/main/safe_transaction_service/history/services/balance_service.py#L293

@Uxio0 Uxio0 added the bug Something isn't working label Oct 25, 2024
@Uxio0 Uxio0 self-assigned this Oct 25, 2024
Uxio0 added a commit that referenced this issue Nov 12, 2024
- Not valid tokens are retrieved again and again after cache expires
- Add a simple list of not valid tokens so RPC call is not required
- Closes #2283
Uxio0 added a commit that referenced this issue Nov 18, 2024
- Not valid tokens are retrieved again and again after cache expires
- Add a simple list of not valid tokens so RPC call is not required
- Closes #2283
Uxio0 added a commit that referenced this issue Nov 18, 2024
- Not valid tokens are retrieved again and again after cache expires
- Add a simple list of not valid tokens so RPC call is not required
- Closes #2283
@JagoFigueroa
Copy link

Tested and verified after our latest deployment. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@Uxio0 @JagoFigueroa and others