duino-coin icon indicating copy to clipboard operation
duino-coin copied to clipboard

Limit connection requests on failure in ESP boards

Open ddrmax opened this issue 5 years ago • 4 comments

Describe the bug In 2.7.3 with the new IP, when calling the getPool url, the ESP spams requests at high speed (like 20 requests /s), When forcing a pool ( forcing the return string in the url get), the. Same problem exits if the pools doesn't responds in like 100ms, as it spams the pool to get new work.

To Reproduce Steps to reproduce the behavior:

  1. Program the ESP with the latest commits
  2. Connect to serial monitor
  3. Enjoy the never-ending scrolling screen

Expected behavior When the ESP can't connect to either the getPool url or the pool, force a sleep of at least 5 seconds as a cool down, and have at least a bigger HTTP request timeout (for example 1s)

Screenshots/photos No screenshots or photos to help explain your problem. Can do one test with with a screen shot later

System (please complete the following information)

  • OS: Arduino 1.8.16 portable with latest ESP sdk
  • Software ESP 8266 / ESP 32 2.7.3 (zip from master created 1 day ago, with new IP) ( commit c87324a )
  • Version 2.7.3, lastet commit à the time of posting ( commit c87324a )

Additional context Add any other context about the problem here.

ddrmax avatar Oct 04 '21 10:10 ddrmax

I don't know if you read their latest news center but currently the duino-coin server is under attack:

Server is under a DDoS attack since two days.

My guess is that someone is very jealous. We're doing what we can but it's not an easy topic.
It's not the last and probably not the first time something similar happens, usually it's the best to wait it out.
In the meantime we will try to setup a proxy to the main server through a vps that has a DDoS protection.
If you want, join our Discord to be up-to-date or suggest something.

Source: https://wallet.duinocoin.com/

blackmennewstyle avatar Oct 04 '21 10:10 blackmennewstyle

I don't know if you read their latest news center but currently the duino-coin server is under attack:

Server is under a DDoS attack since two days.

My guess is that someone is very jealous. We're doing what we can but it's not an easy topic.
It's not the last and probably not the first time something similar happens, usually it's the best to wait it out.
In the meantime we will try to setup a proxy to the main server through a vps that has a DDoS protection.
If you want, join our Discord to be up-to-date or suggest something.

Source: https://wallet.duinocoin.com/

The thing I say is that when a slow down occurs (due to a ddos or a server update), this could amplify the DDOS or nearly create a DDOS by itself). Another point is that the HTTPS is broken, if I emulate the response (json string from my own server (oracle instance), in http, all is OK, but in https (let's encrypt for a domain where the server is), by contacting either via the domain or IP, the ESP returns an error with non error code. One way to make it work is by using a proxy (squid) that transform the https into http

ddrmax avatar Oct 04 '21 11:10 ddrmax

Hello @ddrmax thanks to report it... You said in the previous message that these requests could be increasing the impact or even generating the DDoS attack, but this is not a problem, because as can be seen in commit https://github.com/revoxhere/duino-coin/commit/c87324a432583ec9963ade55492133a60e3c643b (which you mentioned) the ip address of the getPool function was changed to the ip of one of our pools with DDoS protection... That way the ESPs don't affect the functioning of the main server... and as said by the other user, our main server is being attacked by someone very malicious, it's not the miners who are causing this Common DDoS protection solutions do not fully work on our main server, as the attack is focusing on our sockets, which are very difficult to implement protection systems, unlike functions like getPool that are just a simple endpoint and can be protected easily

gsrbr avatar Oct 04 '21 16:10 gsrbr

commit c87324a (which you mentioned) the ip address of the getPool function was changed to the ip of one of our pools with DDoS protection... _

it doesn't work for me

gravedigger21 avatar Oct 06 '21 06:10 gravedigger21