SChernykh
f9def6cb73
Added "calc_pow" RPC support
3 years ago
SChernykh
07cfb54bdc
JSONRPCRequest: fixed undefined behavior in the error handler
3 years ago
SChernykh
5dd8d11b72
TCPServer: removed unused field
3 years ago
SChernykh
e44baad73c
Update version
3 years ago
SChernykh
bb7a5b4d6d
Cleanup
3 years ago
SChernykh
64116643c2
Fixed block broadcasts
3 years ago
SChernykh
1e4c6ef5f4
Added block verification test
3 years ago
SChernykh
61edc6ed70
Reduce cache flush frequency to once per minute
3 years ago
SChernykh
dff2413cae
TCPServer: make write buffers global
...
Reduced memory usage per connection.
3 years ago
SChernykh
998c2ba72f
Fixed msys2 build crash
3 years ago
SChernykh
b56d027dd5
Include P2P peer list into miner count
3 years ago
SChernykh
eaed654012
Check for missing data from monerod on each new block
...
It helps in these cases:
- monerod was down/unavailable for a while and then restarted
- monerod was out of sync and then jumped several block heights ahead
3 years ago
SChernykh
981b161cc9
SideChain: faster processing of repeated broadcasts
3 years ago
SChernykh
f59e9171e8
SideChain: use a separate lock for m_seenBlocks
3 years ago
SChernykh
b45540ca08
TCPServer: clean up old IP bans
3 years ago
SChernykh
806e1ca0a3
SideChain: faster check for low-diff spam blocks
3 years ago
SChernykh
113e39817d
Cleanup old Monero blocks data
3 years ago
SChernykh
0869326f39
SideChain: count miners in the last 48 hours
3 years ago
SChernykh
75d62c0303
SideChain: cleanup m_seenBlocks when pruning old blocks
3 years ago
SChernykh
da4686b88f
ZMQReader: start after initial RPC calls are finished
3 years ago
SChernykh
a008eac8c6
ZMQReader: more reliable connect()
3 years ago
SChernykh
3d60ae8c32
Fix: don't start until monerod is fully synchronized
3 years ago
SChernykh
88f346414a
Fixed race condition when using --no-color
3 years ago
SChernykh
2071a24a9f
Update version
3 years ago
SChernykh
1c0da4513f
Added `--no-color` command line option
...
`--no-color` disables colors in console output
3 years ago
SChernykh
6a002cda46
Create msvc-analysis.yml
3 years ago
SChernykh
c0c210664a
Show uptime in status
3 years ago
SChernykh
6859d11445
Disable console quick-edit mode on Windows
...
Prevent user from accidentally selecting text in console and freezing all output
3 years ago
SChernykh
111324b6e0
Added console command to show connected peers
3 years ago
SChernykh
148b9dd294
Switch to faster unordered_map/set
3 years ago
SChernykh
04d18cdf1d
P2PServer: fixed m_timer leak
3 years ago
SChernykh
352ad81a0a
StratumServer: faster processing of regular shares
3 years ago
SChernykh
d26902468d
P2PServer: peer list tweaks
...
- Increase outgoing connections to 10
- Stricter handling of peer list responses
3 years ago
SChernykh
0382027d70
Fixed wrong error message
3 years ago
SChernykh
966b499e5c
ZMQReader: keep trying to connect on startup
3 years ago
SChernykh
9885f82e9e
Limit user name length to 64 characters
...
Also avoid creating temporary strings (`" user " + client->m_customUser`) when logging user name
3 years ago
WeebDataHoarder
bc341918f6
Decode custom user from stratum client, display stratum client+user on SHARE FOUND and client mainchain found message
3 years ago
SChernykh
f17c23528a
Update version
3 years ago
SChernykh
a06f4dcdcd
P2PServer: fixed ever growing memory usage
3 years ago
SChernykh
816a29c5ab
Added `--no-cache` command line parameter
3 years ago
SChernykh
285560e120
Fixed possible sidechain split during RandomX epoch change
3 years ago
SChernykh
39ba5c4131
P2PServer: check for messages that shouldn't be sent
3 years ago
SChernykh
9b86f8e81f
Peer list refactoring
...
- Remove peers that weren't seen for > 1 hour
- Better peer selection algorithm for PEER_LIST_RESPONSE
3 years ago
SChernykh
9e90e988fa
Refactored array_size to make it always constexpr
3 years ago
SChernykh
39b2167c98
Show correct max log level in usage
3 years ago
SChernykh
f3024d3556
StratumServer: submit Monero block as soon as possible
...
1-3 ms saved when a block is found
3 years ago
SChernykh
61ac90f1d5
Fixed typo
3 years ago
SChernykh
60a8538e0c
P2PServer: show an error when there are no ZMQ messages
3 years ago
SChernykh
77a3a5857c
P2PServer: show an error when there are no connections
3 years ago
SChernykh
af2a8eeb08
Tweaked warning level for lagging nodes
3 years ago
SChernykh
54d0ab3658
Move most block broadcasts to log level 6
3 years ago
SChernykh
c9faa92098
StratumServer: fixed "bad share" ban logic
3 years ago
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
3 years ago
SChernykh
a0a31b0f3b
Merge pull request #51 from Tonux599/stratumServerJson-staging
...
API for stratum server statistics.
3 years ago
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.
3 years ago
SChernykh
7d66864b01
Print P2Pool version
3 years ago
SChernykh
2a3cd13b19
P2PServer: delete old cached blocks after initial sync
...
Saves ~20 MB of memory
3 years ago
SChernykh
4bcaa41c8e
Clear crypto derivation/key cache when a block is found
3 years ago
SChernykh
4fce76576f
ZMQ reader: abort if connect to monerod failed
3 years ago
SChernykh
f05f7c4268
Fixed wrong nonce values in submit_block error log
3 years ago
SChernykh
ae8733c187
Update RandomX
3 years ago
SChernykh
5c92920619
Default log level 3
...
Also refactored default port numbers
3 years ago
SChernykh
b4ea125a8a
Hardcode default consensus ID for faster startup
3 years ago
SChernykh
8aa9e54dc4
BlockTemplate: wait for 10 seconds before including new transactions
3 years ago
SChernykh
b35b4a9f76
Crypto: added cache for faster key derivation
3 years ago
SChernykh
ba6a2c8eb2
P2PServer: relax stale block restriction
3 years ago
SChernykh
14e26f5c17
Fix: always check before closing TCP handles
3 years ago
SChernykh
4c5144b37f
Check monerod RPC version at startup
3 years ago
SChernykh
42dd58d778
P2PServer: check broadcasts for wrong height
3 years ago
SChernykh
da0f376bef
P2PServer: ban peers that don't broadcast blocks
3 years ago
SChernykh
0d439e7712
SideChain: submit blocks to monerod in more cases
3 years ago
SChernykh
b8f04ac787
Tweaked block broadcast rules
3 years ago
WeebDataHoarder
7bad1e05a4
Implemented shares/uncles position chart on status command
...
Shows progress in slices of PPNLS window. Shares move left to right as they age.
A dot "." indicates no shares, 1-9 for that number in shares, for 9+ it shows a "+".
Will not show shares or uncles lines unless you have one on window.
3 years ago
SChernykh
74096248e1
Better error handling of Monero RPC requests
3 years ago
SChernykh
36ee76d4d2
data api: fixed one block missing to calculate effort
3 years ago
SChernykh
3aa270a072
Fix for older compilers
3 years ago
SChernykh
7a97171b03
Tweaked block broadcast rules
3 years ago
SChernykh
52f195b89f
Tweaked idle peer detection
3 years ago
SChernykh
ee7a1e54f7
DNS name resolution for command line parameters
3 years ago
SChernykh
c8a2a256e7
Fixed RandomX VM initialization
3 years ago
SChernykh
57bc38d2bb
data api: added stats_mod
3 years ago
SChernykh
a332ac7d26
P2PServer: load peers from DNS
3 years ago
SChernykh
7ea1913a9d
Update log.h
3 years ago
SChernykh
73c8b1294a
P2PServer: connect to peers from the event loop thread
...
Better thread safety
3 years ago
SChernykh
ce8ec3860d
Fixed memory leak
3 years ago
SChernykh
25772abc0f
Show block share % in status
3 years ago
SChernykh
899d5a82dd
data api: check p2pool shares that come after a Monero block
3 years ago
SChernykh
7b0cc256c5
P2PServer: ban peers that disconnect without finishing handshake
3 years ago
SChernykh
d3dc4c731f
Added more tests
3 years ago
SChernykh
e264377f0e
Added more checks
3 years ago
SChernykh
a36825424b
Fixed some Coverity reports
3 years ago
SChernykh
2ecd935bc5
data api: fixed saving of p2pool.blocks
3 years ago
SChernykh
f3b6423d4c
Log difficulty for found pool shares
3 years ago
SChernykh
82a88ce0ef
data api: added block hashes to pool/blocks
3 years ago
SChernykh
884d0f180a
TCP server: log IP addresses in more places
3 years ago
SChernykh
f3ee444aed
Stratum server: log IP addresses that send bad data
3 years ago
SChernykh
dd0a35fb79
Show pool-side hashrate in status only when it's not zero
3 years ago
SChernykh
4deef2f807
Added cppcheck workflow
3 years ago
SChernykh
b31adbd5ae
Added macOS build
3 years ago
SChernykh
e527b0c660
Added Windows builds
3 years ago
SChernykh
b17723f1e4
Removed unused code
3 years ago
SChernykh
1554a44f5c
Added more integrity checks
3 years ago
SChernykh
08d2fbdbd1
Parse full 128-bit difficulty from monerod
3 years ago
SChernykh
661d596107
api: store difficulty and totalHashes for each block
3 years ago
SChernykh
2d8530798d
Unit tests for difficulty_type
3 years ago
SChernykh
b26c4616d7
Fixed wrong diff in api/network/stats
3 years ago
SChernykh
70ff4ba859
Tweaked peer list logic
3 years ago
SChernykh
bab148fbad
Added cppcheck scripts
3 years ago
SChernykh
55f8e9dc33
Added total blocks found
3 years ago
SChernykh
fbdef7d058
Count all miners that were active in last 24 hours
3 years ago
SChernykh
e1b4649c2a
Added pool blocks
3 years ago
SChernykh
73da71a2d3
Renamed next payout to block reward share
3 years ago
SChernykh
533cc202d2
Added pool stats
3 years ago
SChernykh
295cbda449
p2pool: export data to an external web-server
...
Dumps data to JSON files which can be later served by a web-server.
3 years ago
SChernykh
5d6fa03f11
Show all Monero block rewards in log
3 years ago
SChernykh
75843e9b37
P2PServer: don't broadcast stale blocks
3 years ago
SChernykh
1a83610299
P2PServer: simplified the code a bit
3 years ago
SChernykh
5f406a60a6
StratumServer: added keepalived method
3 years ago
SChernykh
5eea610f3c
Stricter wallet address checks
3 years ago
SChernykh
e44919c289
Changed pool name for the new test
3 years ago
SChernykh
780afd84a2
Added checks for tx keys
3 years ago
SChernykh
0558cdb9cc
Fixed share effort calculation
3 years ago
SChernykh
7364292ece
Fixed average effort calculation
3 years ago
SChernykh
662a7e91c8
P2PServer: always ban IPs that send bad blocks
3 years ago
SChernykh
8064865ba5
Fixed setting max log level from command line
3 years ago
SChernykh
7b197824fe
P2PServer: add peers from the command line to the peer list on startup
3 years ago
SChernykh
114f6b627b
P2PServer: don't allow multiple connections to/from the same IP
3 years ago
SChernykh
4757cdb8e2
P2PServer: added 1 second grace time for stale shares
...
Only for shares that lag 1 Monero block behind
3 years ago
SChernykh
bb8ff24db8
StratumServer: added avg effort and number of shares to status
3 years ago
SChernykh
4ac08ac10d
StratumServer: print current effort in status
3 years ago
SChernykh
891ee36e53
Force update average hashrates when print_status() is called
3 years ago
SChernykh
d1e94d6e1a
StartumServer: print average hashrate in status
3 years ago
SChernykh
a2f6e73122
JSONRPCRequest: more informative error messages
3 years ago
SChernykh
9120b86007
Fixed use of out of scope variable
3 years ago
SChernykh
bb7720968f
Tweaked log levels
3 years ago
SChernykh
dac74a8829
Update p2p_server.cpp
3 years ago
SChernykh
dd9166e91c
Update dataset at normal thread priority
3 years ago
SChernykh
456f5d356f
P2PServer: ban peers only after handshake finished and failed
3 years ago
SChernykh
541b3c653d
Enable 4-byte target format for diff up to 4 million
3 years ago
SChernykh
519b4b548d
Relax JSON parsing
...
Allow comments and trailing commas
3 years ago
SChernykh
8e29abd906
Small fixes
3 years ago
SChernykh
8a26498b66
Tweaked log levels
3 years ago
SChernykh
ff4d89868b
StratumServer: Use short target format (4 bytes) for diff <= ~2 million
3 years ago
SChernykh
4175f4c8bc
StratumServer: ban clients that send incorrect shares
3 years ago
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
3 years ago
SChernykh
46ce4ebee7
check_pow: fixed carry calculation
3 years ago
SChernykh
0be078cb09
StartumServer: moved warnings to log level 4
3 years ago
SChernykh
14bb308794
P2PServer: clear m_missingBlockRequests when there is nothing missing
3 years ago
SChernykh
f9be0de8d2
P2PServer: ask peers about unknown blocks only once
3 years ago
SChernykh
81a12158fc
P2PServer: don't add banned peers back to the peer list
3 years ago
SChernykh
8304d81961
Prepare for mainnet test
3 years ago
SChernykh
27c2aab145
Check network type at startup
...
- Make network type part of consensus ID to avoid mixing p2pool nodes from mainnet and testnet/stagenet
- Check that wallet address matches the network type of monerod
3 years ago
SChernykh
afca83d6c2
BlockCache: check block size before storing it
3 years ago
SChernykh
2761ce5af7
Fixed a leak in ZMQReader
3 years ago
SChernykh
776b1f561c
Fixed use after free on p2pool shutdown
3 years ago
SChernykh
715c0d4e14
Reduced cache size a bit
3 years ago
SChernykh
3ea71d51e5
Fixed crash on startup
3 years ago
SChernykh
f77e0434c6
Fixed TCPServer startup
3 years ago
SChernykh
3f1ee9ce4b
TCPServer fixes
...
- Proper shutdown sequence, uv_close() must be called from the event loop thread
- Moved start_listening() to child class constructor because it must be ready before it can listen on sockets
- Added simple memory leak detector for Windows. Linux users can enjoy the leak sanitizer
3 years ago
SChernykh
27e85a922b
TCPServer: fixed more leaks on shutdown
3 years ago
SChernykh
4ba32277c1
Use p2pool-api branch for Monero
3 years ago
SChernykh
37f3312e1d
Submit received p2pool blocks to monerod when possible
3 years ago
SChernykh
125815b502
Made print_status() thread-safe
3 years ago
SChernykh
63e442dffd
print_status: fixed next payout display
3 years ago
SChernykh
0009eba307
Fix RandomX startup logic
...
Ensure that both RandomX caches initialize before stratum and p2p servers start.
3 years ago
SChernykh
276cc5f0fd
Fix Mac compilation
3 years ago
SChernykh
fa3146a8f3
Reverted force close TCP connections
3 years ago
SChernykh
230d3e4780
Fixed socket leak after a failed connection
3 years ago
SChernykh
d246ee1552
Enabled block cache for Mac
3 years ago
SChernykh
46b7c3e755
TCPServer: stop reading before closing connection
3 years ago
SChernykh
662865ad70
Reduced startup spam at log levels <= 5
3 years ago
SChernykh
68a4765f95
Force close TCP connections
3 years ago
SChernykh
924fd4b7bd
TCPServer: better tracking of used sockets
3 years ago
SChernykh
a38a7be73f
p2pool: submit block from the main thread only
3 years ago
SChernykh
8f93adf7a1
Refactored signal handler
...
Call the same stop() function as regular exit command
3 years ago
SChernykh
d8efb27374
Restrict uv_default_loop() to main thread
3 years ago
SChernykh
dbf18c34a4
Fixed wrong uv loop in p2pserver::flush_cache()
3 years ago
SChernykh
fcb9e25fb1
Print background jobs in status
3 years ago
SChernykh
7ab3c22114
Give only 5 seconds for new connections to complete handshake
...
This is to detect random port scans/non-p2pool connections quickly
3 years ago
SChernykh
336349e189
Show hashrate estimate in status
3 years ago
SChernykh
8f2493edfc
Log message fixes
3 years ago
SChernykh
a27577f735
Added log level 6 to reduce spam on level 5
...
Log level 5 is still default
3 years ago
SChernykh
09aedd9f9a
Drop idle connections
...
Idle = didn't send any full messages in the last 5 minutes
3 years ago
SChernykh
cd532965e8
Code safety: BlockCache isn't supposed to be copied/moved
3 years ago
SChernykh
64885852dd
Limit max number of transactions in block template
...
Because if it's too high, it won't fit into p2p packet
3 years ago
SChernykh
6de98697a1
Only warn about lagging monerod if it's 2 or more blocks behind
3 years ago
SChernykh
02449bf9f9
Use UTC time for logging
3 years ago
SChernykh
e4be4c1a66
Fixed pruning logic
...
- Erase an element from m_blocksByHeight only if it's empty
- Remove blocks from unconnected alternative chains too when they get old enough (4xPPLNS window)
3 years ago
SChernykh
d4388bf9c0
Removed unnecessary lock
3 years ago
SChernykh
20b3886bfb
Less tolerance to lagging nodes
...
Ban nodes that are 5 or more Monero blocks behind.
3 years ago
SChernykh
a55545762b
Merge branch 'master' of https://github.com/SChernykh/p2pool
3 years ago
SChernykh
69533fd209
Store only fully verified blocks in the cache
3 years ago
SChernykh
90a977228b
Merge pull request #2 from hyc/cmds
...
Tweak command handling
3 years ago
SChernykh
4837b4c863
Added missing integrity check
3 years ago
SChernykh
15354e5a88
Update util.cpp
3 years ago
Howard Chu
0dc3baa480
Tweak command handling
...
Modularize, add help and exit commands.
Fix shutdown_tcp() and p2pool to make sure servers exit immediately
when terminating.
3 years ago
SChernykh
05d336c8e9
Update block_cache.cpp
3 years ago
SChernykh
1cf4071f9b
BlockCache (Linux version)
3 years ago
SChernykh
bf5db3db08
Update p2pool.cpp
3 years ago
SChernykh
3229909333
Update p2pool.cpp
3 years ago
SChernykh
9808685981
Update stratum_server.cpp
3 years ago
SChernykh
aba3bc50b8
Block cache WIP and other fixes
...
- Block cache is implemented only on Windows for now
- Tracking of background jobs
- More robust sidechain syncing
3 years ago
SChernykh
86b31ea821
Reduce broadcast spam after initial sync
3 years ago
SChernykh
25ef5733a7
Skip duplicates in the saved peers list
3 years ago
SChernykh
fda80e3556
Sanity check
3 years ago
SChernykh
6d3cfa2c7a
Couple more sanity checks
3 years ago
SChernykh
656f912a3e
Workaround for crashes on shutdown
3 years ago
SChernykh
c4d3f6f8b4
Fixed parse_address_list()
3 years ago
SChernykh
2f08a35ac7
Fixed logger thread start/stop logic
3 years ago
SChernykh
df52838433
Removed some noisy warning messages
3 years ago
SChernykh
39a8c68ab7
More clang fixes
3 years ago
SChernykh
4a5691e349
clang fixes
3 years ago
SChernykh
510b7dbb85
Add files
3 years ago