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

Token balances not loading (getBalance HRC20 calls), leading to DEXs like Viper, Mochi unusable #3743

Closed
gupadhyaya opened this issue Jun 8, 2021 · 7 comments
Assignees
Labels
high priority high priority issue with customer impact

Comments

@gupadhyaya
Copy link
Contributor

Currently there is an issue going on related to explorer nodes lagging due to increase in the number of transactions per block (more info here), and it is understandable that transaction confirmations could get impacted due to this, however, currently even the normal EVM calls like getBalance of a HRC20 token is slow and most times does not work, which is rendering DEXs like viper, mochi, almost unusable. Feels like this is more to do with rate limit of api calls (this commit added the rate limit). The rate limit of 300 per second seems low, especially during the high load times. Note that the current spamming is adding 50-100 transactions every block, which also have several evm calls. Further, any DEX operation have several getBalance call for every token that any user has.

DEX like viper shows no balance or liquidity when it is unable to fetch them from the contracts (as shown below):

deposits
mining

@LeoHChen LeoHChen added the high priority high priority issue with customer impact label Jun 8, 2021
@LeoHChen
Copy link
Contributor

LeoHChen commented Jun 8, 2021

let me check if the rate limiter had reached the upper bound in the explorer nodes.

@LeoHChen
Copy link
Contributor

LeoHChen commented Jun 8, 2021

unfortunately, the PR to add rate limit is not merged yet, #3743

so I will have to do the following to mitigate the current issue.

  1. add a customized build to check the rate limiter
  2. increase the rate limit to 1000 by now

@gupadhyaya
Copy link
Contributor Author

gupadhyaya commented Jun 8, 2021

Right now I see the explorer is insync. There are small windows where the explorer is insync and also see the DEX able to load balances and not have any issue. Any rationale for this @LeoHChen ?
Screen Shot 2021-06-08 at 10 08 35 AM

Viper mining loads fine:
Screen Shot 2021-06-08 at 10 11 10 AM

@LeoHChen
Copy link
Contributor

LeoHChen commented Jun 8, 2021

I have to restart the explorer nodes, they were out of sync mostly due to #3740

@gupadhyaya
Copy link
Contributor Author

I have to restart the explorer nodes, they were out of sync mostly due to #3740

is regularly restarting explorer nodes a temporary solution until #3740 is resolved?

@LeoHChen
Copy link
Contributor

LeoHChen commented Jun 8, 2021

nodes are out of sync very fast, need to work on some automation solution to detect and restart harmony process as a mitigation right now

@LeoHChen
Copy link
Contributor

LeoHChen commented Jun 8, 2021

The problem is still the nodes out of sync issue. I have added a solution to detect the node out-of-sync, and to restart the nodes. The cronjob will be checking/run every 15 minutes as temporary mitigation. Closing this ticket, for now, #3740 is still the root cause.

@LeoHChen LeoHChen closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority high priority issue with customer impact
Projects
None yet
Development

No branches or pull requests

4 participants