White-Whale-Defi-Platform / white-whale-bots

A single-chain and multi-dex arbitrage bot the utilizing White Whale flash loans and Skip Protocol.
https://whitewhale.money
MIT License
83 stars 32 forks source link

tendermint-rpc Bad status on response: 500 #48

Closed Roalkege closed 1 year ago

Roalkege commented 1 year ago

If you want to report a security issue, please follow our security policy: https://github.com/White-Whale-Defi-Platform/migaloo-core/blob/main/SECURITY.md


Steps to Reproduce

  1. See Log
  2. npm start and wait around 350-600 Blocks
  3. tendermint-rpc Bad status response: 500

Expected results: App waits x seconds and tries again.

Actual results: App is crashing. (Log)


Additional context

Add any other context about the problem here, code snippets, json responses and so on.

Logs ``` /home/dietpi/white-whale-bots/node_modules/@cosmjs/tendermint-rpc/build/rpcclients/http.js:10 throw new Error(`Bad status on response: ${res.status}`); ^ Error: Bad status on response: 500 at filterBadStatus (/home/dietpi/white-whale-bots/node_modules/@cosmjs/tendermint-rpc/build/rpcclients/http.js:10:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v19.6.0 ```
zJuuu commented 1 year ago

This is most likely a error from the rpc and no issue with the bot. What rpc do you use?

Roalkege commented 1 year ago

I use https://juno-rpc.reece.sh. You are right I think the bug label is not the correct, it should be improvement.

I think its a unplanned behavior when the bots crashes with a 500 response. Why not just wait 30 secs and try it again.

SirTLB commented 1 year ago

@zJuuu @kaimen-sano I think we should just catch this one, wait a bit and retry. Maybe we can also use something like the rpc switcher we want in #28