Commit Graph

47 Commits

Author SHA1 Message Date
SChernykh
93062e4341 Stratum: fixed response to HTTP GET/HEAD requests 2024-09-04 21:43:18 +02:00
SChernykh
ad49afb34b Stratum: detect HTTP and send a response 2024-08-08 18:31:17 +02:00
SChernykh
127dcc04bf Stratum: added TLS support 2024-08-05 22:39:28 +02:00
SChernykh
45dabd8ddb Merge branch 'master' into merge-mining 2024-02-24 19:11:52 +01:00
SChernykh
e82fe8cdc1 Fixed cppcheck errors 2024-02-24 10:02:50 +01:00
SChernykh
ec15417fd2 More C++17 2024-01-05 14:36:35 +01:00
SChernykh
1e1c3ad6e9 Updated copyright 2024-01-02 14:12:16 +01:00
SChernykh
390cf0257e StratumServer: fixed data races on disconnect 2023-09-08 15:19:59 +02:00
SChernykh
2c5cfb6442 Fixed data races when using uv_async_send 2023-09-04 19:33:31 +02:00
SChernykh
76c4573c39 CI: cleanup build warnings
Tests: fixed "unused const variable" warning
CMakeLists.txt: fixed deprecation warnings
2023-08-16 14:20:23 +02:00
SChernykh
c94b627808 TCPServer: use /64 prefix to ban IPv6 peers 2023-04-27 10:28:32 +02:00
SChernykh
6e258bb210 Refactored TCPServer to reduce code duplication 2023-04-19 16:37:32 +02:00
SChernykh
0ce1558f54 Fixed data races 2023-02-27 19:35:28 +01:00
SChernykh
03a3423da0 StratumServer: fixed data race 2023-02-27 18:58:56 +01:00
SChernykh
1c908c261d TCPServer: refactored memory allocation 2023-02-17 08:47:52 +01:00
SChernykh
975679ef87 Show actual worker difficulty in workers command 2023-01-27 22:09:17 +01:00
SChernykh
a574e68bb7 StratumServer: check for bans before checking shares 2023-01-25 11:36:52 +01:00
SChernykh
451778d704 Optimized RNG usage 2023-01-17 16:24:15 +01:00
SChernykh
ccc5117172 Track shares that failed to be added 2023-01-07 15:50:02 +01:00
SChernykh
b346b93285 Updated copyright 2023-01-04 13:07:55 +01:00
SChernykh
2e747beda6 Added sidechain height to SHARE FOUND log 2022-11-08 14:27:03 +01:00
SChernykh
a917a9493c Randomize extra_nonce
To guarantee that hashing blobs will be different between different p2pool nodes, even if they mine to the same wallet address and don't have transactions to shuffle within the block template.
2022-10-11 11:33:58 +02:00
SChernykh
fd6b2360aa Fix: uv_close was called from wrong thread 2022-10-07 16:02:08 +02:00
SChernykh
86156f3fec SOCKS5 proxy support 2022-09-03 22:35:38 +02:00
SChernykh
cc60ab3d63 StratumServer: added scoring system for clients
Ban clients only after a few bad shares without good shares compensating them.
2022-08-22 11:07:11 +02:00
SChernykh
990916ab62 StratumServer: added autodiff
Autodiff is enabled by default, target time is 30 seconds. It can be disabled with `--no-autodiff` command line option.
2022-05-08 19:03:00 +02:00
SChernykh
d4e362cd76 TCPServer: optimized Client struct size 2022-05-07 12:35:31 +02:00
SChernykh
1dd06cc509 Removed std::string to avoid memory allocation 2022-05-07 11:00:29 +02:00
SChernykh
0818d91f4f StratumServer: added console command workers 2022-05-06 13:19:56 +02:00
SChernykh
a2afa29052 Updated copyright 2022-03-30 14:42:26 +02:00
SChernykh
aada1bb5cc Use chrono::steady_clock for internal timestamps 2022-03-23 11:30:38 +01:00
SChernykh
c21d052d7a Refactored RNG usage across the code 2022-03-17 16:14:29 +01:00
SChernykh
cc6ce4a366 Reset stratum share counters after initial sync 2022-02-17 11:19:11 +01:00
SChernykh
9f449320b5 StartumServer: disconnect and ban inactive clients 2022-02-08 15:00:08 +01:00
WeebDataHoarder
bc341918f6 Decode custom user from stratum client, display stratum client+user on SHARE FOUND and client mainchain found message 2021-10-19 19:33:15 +02:00
SChernykh
9e90e988fa Refactored array_size to make it always constexpr 2021-10-14 16:46:49 +02:00
SChernykh
f3024d3556 StratumServer: submit Monero block as soon as possible
1-3 ms saved when a block is found
2021-10-13 18:57:21 +02:00
SChernykh
c9faa92098 StratumServer: fixed "bad share" ban logic 2021-10-04 15:51:28 +02:00
SChernykh
52e5008bf4 Refactoring
- Skip calling time(nullptr) twice
- Use getter method for m_api instead of exposing it
- Moved api_udate_*() back to private since they're not used anywhere else
2021-10-04 10:28:56 +02:00
Thomas Clarke
7742d163f7 API for stratum server statistics.
Users can pass `--stratum-api` to command line to enable a file called `local/stats` in `--data-api` directory. `local/stats` contains statistics that `StratumServer status` provides but in JSON format. It is currently setup that `local/stats` is updated each time a new job is sent to a worker.
2021-10-03 22:32:13 +01:00
SChernykh
5c92920619 Default log level 3
Also refactored default port numbers
2021-09-18 10:03:06 +02:00
SChernykh
bb8ff24db8 StratumServer: added avg effort and number of shares to status 2021-08-30 20:49:51 +02:00
SChernykh
4ac08ac10d StratumServer: print current effort in status 2021-08-30 19:45:37 +02:00
SChernykh
891ee36e53 Force update average hashrates when print_status() is called 2021-08-30 17:50:09 +02:00
SChernykh
d1e94d6e1a StartumServer: print average hashrate in status 2021-08-30 16:51:23 +02:00
SChernykh
9e438210d1 StratumServer: support custom fixed difficulty
Example (set fixed difficulty 10000)

`"user":"x+10000"` in config.json or
`-u x+10000` in command line
2021-08-28 17:23:16 +02:00
SChernykh
510b7dbb85 Add files 2021-08-22 12:20:59 +02:00