Closed cipig closed 1 day ago
after digging further i think i found the problem if i set the balance loop to 300s instead of 30s here https://github.com/KomodoPlatform/komodo-wallet-desktop/blob/dev/src/core/atomicdex/services/mm2/mm2.service.cpp#L313 the app runs without problems
it is related to balance requests that are passed to PLG20 RPC nodes, so to replicate enable many PLG20 tokens and let the app run
we do too many requests to PLG20 RPC nodes anyway and we can be throttled or denied access completely i have seen this on a mm2 CLI node running on the same IP as the ADEX Desktop app if i restart the app i get 100 errors like this on CLI console
20 21:31:25, coins::eth:4523] ERROR Error request MethodCall(MethodCall { jsonrpc: Some(V2), method: "eth_gasPrice", params: Array([]), id: Num(1339093) }) failed: Transport("Server 'HttpTransportNode { uri: https://polygon-rpc.com/, gui_auth: false }' response !200: 429 Too Many Requests, {\"jsonrpc\":\"2.0\",\"id\":null,\"error\":\"You're using more requests than are allowed in the free RPC service. Create a Premium RPC API to continue at https://www.ankr.com/rpc/pricing/#premiumBlock\"}"); on eth_gasPrice request
429 Too Many Requests
those errors don't show up otherwise as can be seen here in the output from my market maker script:
================================================================== Wed 20 Sep 2023 08:22:21 PM UTC
================================================================== Wed 20 Sep 2023 08:39:47 PM UTC
================================================================== Wed 20 Sep 2023 08:53:35 PM UTC
================================================================== Wed 20 Sep 2023 09:07:04 PM UTC
================================================================== Wed 20 Sep 2023 09:18:36 PM UTC
================================================================== Wed 20 Sep 2023 09:27:46 PM UTC
=== my_balance for BAL-PLG20 error
=== my_balance for LDO-PLG20 error
=== my_balance for AAVE-PLG20 error
=== my_balance for TUSD-PLG20 error
=== my_balance for MATIC error
=== my_balance for TEL-PLG20 error
=== my_balance for JJPY-PLG20 error
=== my_balance for XSGD-PLG20 error
=== my_balance for FXS-PLG20 error
=== my_balance for JSGD-PLG20 error
=== my_balance for WBTC-PLG20 error
================================================================== Wed 20 Sep 2023 09:36:59 PM UTC
================================================================== Wed 20 Sep 2023 09:46:32 PM UTC
================================================================== Wed 20 Sep 2023 09:56:44 PM UTC
================================================================== Wed 20 Sep 2023 10:11:52 PM UTC
no errors for hours, then a lot of them during ADEX Desktop restart 09:30 PM no other of my CLI nodes (running on different IPs) are showing this errors during that time
i also have lots of BEP20 tokens in ADEX Desktop, but those don't show errors/make problems because i run the RPC nodes for BEP20 myself, without throttling or timeouts or anything
to solve the problem on enable, we need to use v2 erc activation enable_eth_with_tokens
with param \"get_balances\":false
and to solve this problem, we need to reduce balance requests to EVM RPC nodes
If there are timeouts interacting with electrums or other external sources, it can happen that GUI can not interact with mm2 any more, Only thing that helps then is to kill the app and restart everything.
This is an example of such a timeout:
When there is a general problem with internet (eg loosing connection completely for couple minutes), it can happen too.