regolith-labs / ore-cli

Command line interface for ORE cryptocurrency mining.
1.46k stars 656 forks source link

After GATEWAY_RETRIES reached, program never recovers #148

Open dkilcy opened 4 weeks ago

dkilcy commented 4 weeks ago

In send_and_confirm.rs

            // Retry
            std::thread::sleep(Duration::from_millis(GATEWAY_DELAY));
            if attempts > GATEWAY_RETRIES {
                log_error(&progress_bar, "Max retries", true);
                return Err(ClientError {
                    request: None,
                    kind: ClientErrorKind::Custom("Max retries".into()),
                });
            }

The error is returned however the program never recovers. Have to hit ctrl-c to end it.

...
  ERROR HTTP status server error (503 Service Unavailable) for url (https://ny.mainnet.block-engine.jito.wtf/api/v1/transactions)
  ERROR HTTP status server error (503 Service Unavailable) for url (https://ny.mainnet.block-engine.jito.wtf/api/v1/transactions)
  ERROR Max retries
^C
solmain@server8:~/ore$ 
dkilcy commented 3 weeks ago

it appears the counter for the gateway retries does not reset after a successful retry. Once the program reaches the max GATEWAY_DELAY during its run, it stops.