Commit graph

188 commits

Author SHA1 Message Date
luigi1111
d8c03191ca
Merge pull request #4933
3cf85f0 Changed RECIEVED to RECEIVED in log messages. (normoes)
2018-12-31 15:33:18 -06:00
moneromooo-monero
9c923bad9b
epee: fix network packet header field endianness 2018-12-04 15:14:32 +00:00
Riccardo Spagni
c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
Norman Moeschter
3cf85f0e83
Changed RECIEVED to RECEIVED in log messages. 2018-12-04 07:27:08 +01:00
Riccardo Spagni
299accd81f
Merge pull request #4819
7c298f5d No longer use a list for registering self references in the abstract tcp server (Martijn Otto)
2018-11-26 20:26:28 +02:00
Riccardo Spagni
a3d0c7c55c
Merge pull request #4807
b620443b epee: log HTTP/RPC calls at info level (moneromooo-monero)
2018-11-16 11:17:18 +02:00
Martijn Otto
bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
Martijn Otto
7c298f5d14
No longer use a list for registering self references in the abstract tcp
server

Updated assert message

Use a local variable that won't destruct at the end of the if-branch

Updated comment
2018-11-07 11:21:52 +01:00
Riccardo Spagni
dd973179ad
Merge pull request #3970
3381b651 abstract_tcp_server2: fix busy calling of idle IO service (moneromooo-monero)
2018-11-06 14:49:32 +02:00
moneromooo-monero
b620443b08
epee: log HTTP/RPC calls at info level
It's useful info to have when investigating logs
2018-11-05 16:14:06 +00:00
Riccardo Spagni
5ccd3d32b4
Merge pull request #4489
00901e9c epee: initialize a few data members where it seems to be appropriate (moneromooo-monero)
144a6c32 abstract_tcp_server2: move m_period to subclass (moneromooo-monero)
758d7684 connection_basic: remove unused floating time start time (moneromooo-monero)
e5108a29 Catch more exceptions in dtors (moneromooo-monero)
2018-10-15 13:37:18 +02:00
moneromooo-monero
e736964a0c
Remove epee header dependency on cryptonote_core 2018-10-12 17:16:44 +00:00
moneromooo-monero
00901e9c93
epee: initialize a few data members where it seems to be appropriate 2018-10-02 17:28:50 +00:00
moneromooo-monero
144a6c32c9
abstract_tcp_server2: move m_period to subclass
This is where it is actually used, and initialized
2018-10-02 17:28:48 +00:00
moneromooo-monero
758d768486
connection_basic: remove unused floating time start time 2018-10-02 17:28:46 +00:00
Riccardo Spagni
effcbf2060
Merge pull request #4459
bcf3f6af fuzz_tests: catch unhandled exceptions (moneromooo-monero)
3ebd05d4 miner: restore stream flags after changing them (moneromooo-monero)
a093092e levin_protocol_handler_async: do not propagate exception through dtor (moneromooo-monero)
1eebb82b net_helper: do not propagate exceptions through dtor (moneromooo-monero)
fb6a3630 miner: do not propagate exceptions through dtor (moneromooo-monero)
2e2139ff epee: do not propagate exception through dtor (moneromooo-monero)
0749a8bd db_lmdb: do not propagate exceptions in dtor (moneromooo-monero)
1b0afeeb wallet_rpc_server: exit cleanly on unhandled exceptions (moneromooo-monero)
418a9936 unit_tests: catch unhandled exceptions (moneromooo-monero)
ea7f9543 threadpool: do not propagate exceptions through the dtor (moneromooo-monero)
6e855422 gen_multisig: nice exit on unhandled exception (moneromooo-monero)
53df2deb db_lmdb: catch error in mdb_stat calls during migration (moneromooo-monero)
e67016dd blockchain_blackball: catch failure to commit db transaction (moneromooo-monero)
661439f4 mlog: don't remove old logs if we failed to rename the current file (moneromooo-monero)
5fdcda50 easylogging++: test for NULL before dereference (moneromooo-monero)
7ece1550 performance_test: fix bad last argument calling add_arg (moneromooo-monero)
a085da32 unit_tests: add check for page size > 0 before dividing (moneromooo-monero)
d8b1ec8b unit_tests: use std::shared_ptr to shut coverity up about leaks (moneromooo-monero)
02563bf4 simplewallet: top level exception catcher to print nicer messages (moneromooo-monero)
c57a65b2 blockchain_blackball: fix shift range for 32 bit archs (moneromooo-monero)
2018-09-29 22:20:38 +02:00
moneromooo-monero
4469b0c41e
abstract_tcp_server2: fix binding to the wrong IP 2018-09-09 10:48:21 +00:00
moneromooo-monero
8eab6147f4
epee: use the socket::bind variant which does not throw
When this throws in a loop, stack trace generation can take
a significant amount of CPU
2018-08-27 17:02:07 +00:00
luigi1111
0415863747
Merge pull request #4177
e7c0fcd epee: set jsonrpc to '2.0' in parse error return data (moneromooo-monero)
2018-08-15 17:42:09 -05:00
luigi1111
3b409a3b8a
Merge pull request #4130
979105b abstract_tcp_server2: fix race on shutdown (moneromooo-monero)
2018-08-15 17:13:35 -05:00
luigi1111
dd966c8a3a
Merge pull request #4090
42f3b7c http_protocol_handler: catch invalid numbers when parsing (moneromooo-monero)
0a4a7da http_protocol_handler: fix HTTP/x.y parsing (moneromooo-monero)
2018-08-15 17:08:10 -05:00
moneromooo-monero
e7c0fcd8f3
epee: set jsonrpc to "2.0" in parse error return data 2018-07-25 23:00:19 +01:00
moneromooo-monero
979105b298
abstract_tcp_server2: fix race on shutdown 2018-07-15 19:08:49 +01:00
moneromooo-monero
0a4a7da35c
http_protocol_handler: fix HTTP/x.y parsing
It was accepting any character for the dot (yeah, massive big I know)
2018-07-03 23:16:48 +01:00
moneromooo-monero
42f3b7cbca
http_protocol_handler: catch invalid numbers when parsing 2018-07-03 23:16:44 +01:00
Riccardo Spagni
c58758a016
Merge pull request #4080
dead780f abstract_tcp_server2: fix use after free (moneromooo-monero)
2018-07-03 15:24:01 +02:00
Riccardo Spagni
318fb23d7a
Merge pull request #3997
1a526ed5 abstract_tcp_server2: restart async accept on error (moneromooo-monero)
2018-07-03 15:16:04 +02:00
moneromooo-monero
dead780f8a
abstract_tcp_server2: fix use after free 2018-06-29 15:40:48 +01:00
luigi1111
8fad35f8e2
Merge pull request #3962
55c7fb8 epee: adaptive connection timeout system (moneromooo-monero)
2018-06-25 15:12:37 -05:00
luigi1111
c678413a89
Merge pull request #3902
f8dd433 epee: fix detection of 172.16.0.0/172.31.255.255 local IP range (moneromooo-monero)
5db9e3c unit_tests: add tests for local IP range detection (moneromooo-monero)
2018-06-20 14:22:44 -05:00
moneromooo-monero
1a526ed571
abstract_tcp_server2: restart async accept on error 2018-06-18 23:34:01 +01:00
jcktm
b43b9a1304 wallet-rpc: added IPs to error logging in simple_http_connection_handler 2018-06-13 15:41:51 +10:00
moneromooo-monero
55c7fb87a9
epee: adaptive connection timeout system
a connection's timeout is halved for every extra connection
from the same host.

Also keep track of when we don't need to use a connection
anymore, so we can close it and free the resource for another
connection.

Also use the longer timeout for non routable local addresses.
2018-06-10 19:39:38 +01:00
moneromooo-monero
3381b6517e
abstract_tcp_server2: fix busy calling of idle IO service
This would make monerod use 100% CPU when running with torsocks
without Tor running
2018-06-09 12:38:29 +01:00
moneromooo-monero
f8dd433110
epee: fix detection of 172.16.0.0/172.31.255.255 local IP range 2018-06-01 21:47:21 +01:00
moneromooo-monero
dfd36bbebb
http_protocol_handler: limit the number of starting newlines 2018-05-27 09:43:54 +01:00
moneromooo-monero
4d15864728
abstract_tcp_server2: timeout on RPC connections 2018-05-26 20:18:36 +01:00
moneromooo-monero
885a117ddb
http_protocol_handler: speedup newline discarding 2018-05-26 20:18:33 +01:00
Jan Beich
53a1962da1 epee: Drop deprecated Boost.Thread header
In file included from src/cryptonote_basic/hardfork.cpp:33:
In file included from src/blockchain_db/blockchain_db.h:42:
In file included from src/cryptonote_basic/hardfork.h:31:
contrib/epee/include/syncobj.h:37:10: fatal error: 'boost/thread/v2/thread.hpp' file not found
#include <boost/thread/v2/thread.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/rpc/daemon_handler.cpp:29:
In file included from src/rpc/daemon_handler.h:36:
In file included from src/p2p/net_node.h:41:
In file included from contrib/epee/include/net/levin_server_cp2.h:32:
In file included from contrib/epee/include/net/abstract_tcp_server2.h:324:
contrib/epee/include/net/abstract_tcp_server2.inl:44:10: fatal error: 'boost/thread/v2/thread.hpp' file not found
#include <boost/thread/v2/thread.hpp> // TODO
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

contrib/epee/include/math_helper.h: In member function 'bool epee::math_helper::average<val, default_base>::set_base()':
contrib/epee/include/syncobj.h:227:56: error: 'sleep_for' is not a member of 'boost::this_thread'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^
contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^~~~~~~~~
contrib/epee/include/syncobj.h:227:56: note: suggested alternative: 'sleep'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^
contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^~~~~~~~~
2018-04-19 09:15:09 +00:00
Dimitris Apostolou
57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
Riccardo Spagni
f4a6bc79d9
Merge pull request #3226
e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero)
2e3e90ac pass large parameters by const ref, not value (moneromooo-monero)
61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero)
9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero)
8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero)
9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero)
24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero)
f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero)
c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero)
fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero)
03887f11 keccak: fix sanity check bounds test (moneromooo-monero)
ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero)
bece67f9 miner: restore std::cout precision after modification (moneromooo-monero)
1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
2018-02-16 14:26:58 +01:00
Riccardo Spagni
64fabf2eb7
Merge pull request #3252
f689a77e Fix #602 Turn on socket keepalive (Howard Chu)
2018-02-16 14:24:30 +01:00
Howard Chu
f689a77e56
Fix #602 Turn on socket keepalive 2018-02-11 23:32:37 +00:00
moneromooo-monero
2e3e90acbe
pass large parameters by const ref, not value
Coverity 136394 136397 136409 136526 136529 136533 175302
2018-02-02 19:36:09 +00:00
Erik de Castro Lopo
32c0f908cd Allow the number of incoming connections to be limited
It was already possible to limit outgoing connections. One might want
to do this on home network connections with high bandwidth but low
usage caps.
2018-01-29 11:14:02 +11:00
Riccardo Spagni
baaeefdecc
Merge pull request #3098
935e39c7 levin_protocol_handler_async: erase from back of vector instead of front (stoffu)
2018-01-27 17:23:53 -08:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
stoffu
935e39c7f3
levin_protocol_handler_async: erase from back of vector instead of front 2018-01-26 10:58:07 +09:00
moneromooo-monero
40ab12a773
epee: remove dependency on common 2018-01-10 01:57:51 +00:00
Riccardo Spagni
6ca30ae666
Merge pull request #2936
cb9aa23c levin_protocol_handler_async: another attempt at fixing at exception (moneromooo-monero)
64d23ce3 Revert "epee: keep a ref to a connection we're deleting" (moneromooo-monero)
2017-12-25 21:21:17 +02:00