SChernykh
6b4640c413
Fixes for Termux
2 years ago
SChernykh
b2f86a5f6b
Ban peers with stuck or lagging monerod
2 years ago
SChernykh
7522111bb7
Fixed data races
2 years ago
SChernykh
7b5b910f3f
Undefined behaviour fixes
2 years ago
SChernykh
93cd9a659a
Code cleanup
2 years ago
SChernykh
094209f311
P2PServer: optimized update_peer_connections()
2 years ago
SChernykh
1b3c1eb850
P2PServer: increased peer timeout to 15 minutes
2 years ago
SChernykh
a2afa29052
Updated copyright
2 years ago
SChernykh
028a5d0c88
Fixed memory leak after loading block cache
2 years ago
SChernykh
0c2b7d6010
More time handling fixes
2 years ago
SChernykh
f4bcdc7fe9
Use steady_clock to time peer list requests
2 years ago
SChernykh
aada1bb5cc
Use chrono::steady_clock for internal timestamps
2 years ago
SChernykh
c21d052d7a
Refactored RNG usage across the code
2 years ago
SChernykh
7ab21c6afd
TCPServer: reduced memory usage
2 years ago
SChernykh
2209e0cc70
P2PServer: relaxed peer list request restriction
2 years ago
SChernykh
9a09d15bea
P2PServer: use high_resolution_clock for ping time
2 years ago
SChernykh
f082488e4b
TCPServer: use steady_clock for bans
2 years ago
SChernykh
752e2381d6
P2PServer: added more protocol checks
2 years ago
SChernykh
d4a1b14820
Use monerod peers to find p2pool nodes
2 years ago
SChernykh
89bcceb986
Added p2pool mini seed nodes and default port
2 years ago
SChernykh
2b01350add
Added `outpeers` and `inpeers` console commands
2 years ago
SChernykh
f1b6212c82
P2PServer: add connection limits
...
#87 Added `--out-peers` and `--in-peers` command line options.
2 years ago
SChernykh
61edc6ed70
Reduce cache flush frequency to once per minute
3 years ago
SChernykh
c0c210664a
Show uptime in status
3 years ago
SChernykh
111324b6e0
Added console command to show connected peers
3 years ago
SChernykh
04d18cdf1d
P2PServer: fixed m_timer leak
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
a06f4dcdcd
P2PServer: fixed ever growing memory usage
3 years ago
SChernykh
816a29c5ab
Added `--no-cache` command line parameter
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
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
2a3cd13b19
P2PServer: delete old cached blocks after initial sync
...
Saves ~20 MB of memory
3 years ago
SChernykh
5c92920619
Default log level 3
...
Also refactored default port numbers
3 years ago
SChernykh
ba6a2c8eb2
P2PServer: relax stale block restriction
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
b8f04ac787
Tweaked block broadcast rules
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
a332ac7d26
P2PServer: load peers from DNS
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
7b0cc256c5
P2PServer: ban peers that disconnect without finishing handshake
3 years ago
SChernykh
884d0f180a
TCP server: log IP addresses in more places
3 years ago
SChernykh
b31adbd5ae
Added macOS build
3 years ago
SChernykh
70ff4ba859
Tweaked peer list logic
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
780afd84a2
Added checks for tx keys
3 years ago
SChernykh
662a7e91c8
P2PServer: always ban IPs that send bad blocks
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
dac74a8829
Update p2p_server.cpp
3 years ago
SChernykh
456f5d356f
P2PServer: ban peers only after handshake finished and failed
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
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
dbf18c34a4
Fixed wrong uv loop in p2pserver::flush_cache()
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
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
6de98697a1
Only warn about lagging monerod if it's 2 or more blocks behind
3 years ago
SChernykh
20b3886bfb
Less tolerance to lagging nodes
...
Ban nodes that are 5 or more Monero blocks behind.
3 years ago
SChernykh
69533fd209
Store only fully verified blocks in the cache
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
25ef5733a7
Skip duplicates in the saved peers list
3 years ago
SChernykh
fda80e3556
Sanity check
3 years ago
SChernykh
df52838433
Removed some noisy warning messages
3 years ago
SChernykh
510b7dbb85
Add files
3 years ago