aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-27http_protocol_handler: limit the number of starting newlinesmoneromooo-monero3-1/+12
2018-05-26abstract_tcp_server2: timeout on RPC connectionsmoneromooo-monero2-1/+68
2018-05-26http_protocol_handler: speedup newline discardingmoneromooo-monero1-2/+5
2018-05-26console_handler: fix start_default_console use of prompt parametermoneromooo-monero1-3/+21
It had not been updated to the function type change
2018-04-19epee: Drop deprecated Boost.Thread headerJan Beich2-2/+4
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-03-15Fix typos in various filesDimitris Apostolou2-2/+2
2018-02-25Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windowsrbrunner71-1/+82
2018-02-20Merge pull request #3243Riccardo Spagni1-2/+2
2bc8c3db epee get_ns_count: cast to uint64_t before multiplying 10^9 to avoid overflow (stoffu)
2018-02-16Merge pull request #3226Riccardo Spagni4-11/+11
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-16Merge pull request #3252Riccardo Spagni1-0/+3
f689a77e Fix #602 Turn on socket keepalive (Howard Chu)
2018-02-16Merge pull request #3217Riccardo Spagni1-3/+0
fde4489e wipeable_string: call memwipe directly (moneromooo-monero)
2018-02-11Fix #602 Turn on socket keepaliveHoward Chu1-0/+3
2018-02-08epee get_ns_count: cast to uint64_t before multiplying 10^9 to avoid overflowstoffu1-2/+2
2018-02-02pass large parameters by const ref, not valuemoneromooo-monero4-11/+11
Coverity 136394 136397 136409 136526 136529 136533 175302
2018-01-31wipeable_string: call memwipe directlymoneromooo-monero1-3/+0
since the original reason for the indirect call (that memwipe was not in contrib) is now gone
2018-01-29Fix method name in invoke_http_json_rpcErik de Castro Lopo1-1/+1
Previously, the method name was printed as an exmpty string because the input string had already been moved with `std::move`.
2018-01-29Allow the number of incoming connections to be limitedErik de Castro Lopo1-33/+45
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-27Merge pull request #2969Riccardo Spagni3-12/+15
95171614 Remove is_pod trait, and replace with is_standard_layout requirement (Lee Clagett)
2018-01-27Merge pull request #3098Riccardo Spagni1-1/+1
935e39c7 levin_protocol_handler_async: erase from back of vector instead of front (stoffu)
2018-01-26Readd copyright starting datexmr-eric4-4/+4
2018-01-26Update 2018 copyrightxmr-eric8-8/+8
2018-01-26levin_protocol_handler_async: erase from back of vector instead of frontstoffu1-1/+1
2018-01-25Merge pull request #3012Riccardo Spagni1-8/+18
e4bbeff2 epee: check some error return values (moneromooo-monero)
2018-01-18Remove is_pod trait, and replace with is_standard_layout requirementLee Clagett3-12/+15
2018-01-11epee: detect strptime, use std::get_time as fallbackmoneromooo-monero1-0/+6
2018-01-10Merge pull request #2990Riccardo Spagni1-1/+0
2d17feb0 factor STL container serialization (moneromooo-monero)
2018-01-10Merge pull request #2986Riccardo Spagni1-3/+3
373d1d50 epee: use strptime instead of std::get_time, for compatibility (moneromooo-monero)
2018-01-10move memwipe to epee to avoid common<->crypto circular dependenciesmoneromooo-monero1-0/+84
2018-01-10epee: remove dependency on commonmoneromooo-monero4-7/+9
2017-12-27epee: check some error return valuesmoneromooo-monero1-8/+18
2017-12-25Merge pull request #2936Riccardo Spagni1-9/+12
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-25Merge pull request #2930Riccardo Spagni1-5/+9
7f4bb612 levin_protocol_handler_async: add missing response handler locking (moneromooo-monero)
2017-12-25Merge pull request #2929Riccardo Spagni1-0/+20
ae55bacd resumption support for updates using range requests (moneromooo-monero) fe0fae50 epee: add a get_file_size function (moneromooo-monero)
2017-12-25Merge pull request #2920Riccardo Spagni6-8/+21
bd5cce07 network_throttle: fix ineffective locking (moneromooo-monero) e0a61299 network_throttle: remove unused xxx static member (moneromooo-monero) 24f584d9 cryptonote_core: remove unused functions with off by one bugs (moneromooo-monero) b1634aa3 blockchain: don't leave dangling pointers in this (moneromooo-monero) 8e60b81c cryptonote_core: fix db leak on error (moneromooo-monero) 213e326c abstract_tcp_server2: log init_server errors as fatal (moneromooo-monero) b51dc566 use const refs in for loops for non tiny types (moneromooo-monero) f0568ca6 net_parse_helpers: fix regex error checking (moneromooo-monero) b49ddc76 check accessing an element past the end of a container (moneromooo-monero) 2305bf26 check return value for generate_key_derivation and derive_public_key (moneromooo-monero) a4240d9f catch const exceptions (moneromooo-monero) 45a1c4c0 add empty container sanity checks when using front() and back() (moneromooo-monero) 56fa6ce1 tests: fix a buffer overread in a unit test (moneromooo-monero) b4524892 rpc: guard against json parsing a non object (moneromooo-monero) c2ed8618 easylogging++: avoid buffer underflow (moneromooo-monero) 187a6ab2 epee: trap failure to parse URI from request (moneromooo-monero) 061789b5 checkpoints: trap failure to load JSON checkpoints (moneromooo-monero) ba2fefb9 checkpoints: pass std::string by const ref, not const value (moneromooo-monero) 38c8f4e0 mlog: terminate a string at last char, just in case (moneromooo-monero) d753d716 fix a few leaks by throwing objects, not newed pointers to objects (moneromooo-monero) fe568db8 p2p: use size_t for arbitrary counters instead of uint8_t (moneromooo-monero) 46d6fa35 cryptonote_protocol: sanity check chain hashes from peer (moneromooo-monero) 25584f86 cryptonote_protocol: print peer versions when unexpected (moneromooo-monero) 490a5d41 rpc: do not try to use an invalid txid in relay_tx (moneromooo-monero)
2017-12-25Merge pull request #2909Riccardo Spagni1-0/+1
dba2de61 levin_protocol_handler_async: call handler destroy function on dtor (moneromooo-monero)
2017-12-25Merge pull request #2905Riccardo Spagni1-77/+109
bd1f6029 http_client: rewrite header parsing manually for speed (moneromooo-monero) ec724eb6 tests: add levin fuzz test (moneromooo-monero) f1bdc9a4 tests: add http client fuzz test (moneromooo-monero) 0272df9e add parse_url fuzz test (moneromooo-monero) 261b0dd0 tests: add base58 fuzz test (moneromooo-monero) fd052087 fuzz_testing: allow automatically resuming an interrupted job (moneromooo-monero) c80bb0eb tests: don't init stuff we don't need in fuzz tests - faster (moneromooo-monero) 53b83a83 tests: better load-from-binary fuzz test data file (moneromooo-monero) 1a379ef6 fuzz_testing: build with ASAN (assumed to be available) (moneromooo-monero) 4cd4a431 fuzz_testing: create out directory if needed, and fix filename passing (moneromooo-monero) c27d9092 Makefile: build fuzz tests statically, starts faster (moneromooo-monero) 95aa0bf7 add load_from_binary/load_from_json fuzzers (moneromooo-monero)
2017-12-23Fix Windows builddEBRUYNE-11-0/+4
Fix no new line
2017-12-23http_client: rewrite header parsing manually for speedmoneromooo-monero1-74/+95
boost::regex is stupendously atrocious at parsing malformed data
2017-12-23tests: add http client fuzz testmoneromooo-monero1-3/+14
2017-12-22factor STL container serializationmoneromooo-monero1-1/+0
2017-12-21epee: use strptime instead of std::get_time, for compatibilitymoneromooo-monero1-3/+3
2017-12-18network_throttle: remove unused xxx static membermoneromooo-monero1-2/+0
2017-12-18abstract_tcp_server2: log init_server errors as fatalmoneromooo-monero1-1/+11
so they show up by default
2017-12-18net_parse_helpers: fix regex error checkingmoneromooo-monero1-2/+2
2017-12-18catch const exceptionsmoneromooo-monero1-1/+1
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero1-1/+1
2017-12-18epee: trap failure to parse URI from requestmoneromooo-monero1-1/+6
2017-12-17Merge pull request #2857Riccardo Spagni1-1/+1
7193b89f Scrub keys from memory just before scope end. (moneromooo-monero)
2017-12-17Merge pull request #2877Riccardo Spagni4-2/+444
43f5269f Wallets now do not depend on the daemon rpc lib (moneromooo-monero) bb89ae8b move connection_basic and network_throttle from src/p2p to epee (moneromooo-monero) 4abf25f3 cryptonote_core does not depend on p2p anymore (moneromooo-monero)
2017-12-16move connection_basic and network_throttle from src/p2p to epeemoneromooo-monero4-2/+444
These even had the epee namespace. This fixes some ugly circular dependencies.
2017-12-16move includes around to lessen overall loadmoneromooo-monero18-75/+40
2017-12-16Scrub keys from memory just before scope end.moneromooo-monero1-1/+1
Partially implements #74. Securely erases keys from memory after they are no longer needed. Might have a performance impact, which I haven't measured (perf measurements aren't generally reliable on laptops). Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod functions. Using overloads + SFINAE instead generalizes it so other types can be marked as scrubbed without adding more boilerplate.
2017-12-16Merge pull request #2866Riccardo Spagni1-5/+4
cf5f6236 Corrections in rate limiting / trottle code, especially in 'out' direction (rbrunner7)
2017-12-16Merge pull request #2860Riccardo Spagni2-3/+73
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero) 7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero) 54950829 use memwipe in a few relevant places (moneromooo-monero) 000666ff add a memwipe function (moneromooo-monero)
2017-12-15levin_protocol_handler_async: another attempt at fixing at exceptionmoneromooo-monero1-3/+12
2017-12-15Revert "epee: keep a ref to a connection we're deleting"moneromooo-monero1-8/+2
This reverts commit f2939bdce8c86b0f96921f731184c361106390c8.
2017-12-15levin_protocol_handler_async: add missing response handler lockingmoneromooo-monero1-5/+9
2017-12-15epee: add a get_file_size functionmoneromooo-monero1-0/+20
2017-12-11levin_protocol_handler_async: call handler destroy function on dtormoneromooo-monero1-0/+1
2017-12-10Merge pull request #2906Riccardo Spagni2-5/+27
27aa8ce9 net_utils_base: fix peer list parsing (moneromooo-monero) fe5ab2c4 epee: fix kv_unserialize return value when a field is not found (moneromooo-monero)
2017-12-09net_utils_base: fix peer list parsingmoneromooo-monero1-3/+25
Fields are written with their "name" as key, and that name changed.
2017-12-07epee: add do while(0) around brace statement in a macromoneromooo-monero1-1/+1
Allows use in more complex expressions
2017-12-02Merge pull request #2832Riccardo Spagni1-9/+15
287dde63 Added command descriptions (Cifrado)
2017-12-01epee: fix kv_unserialize return value when a field is not foundmoneromooo-monero1-2/+2
2017-11-28Corrections in rate limiting / trottle code, especially in 'out' directionrbrunner71-5/+4
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet that were erroneous / superfluous, which enabled the elimination of a "fudge" factor of 2.1 in connection_basic::set_rate_up_limit; also ended the multiplying of limit values and numbers of bytes transferred by 1024 before handing them over to the global throttle objects
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero2-3/+73
2017-11-26Added command descriptionsCifrado1-9/+15
2017-11-16RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflightTim L1-0/+3
2017-11-14Merge pull request #2811Riccardo Spagni1-0/+2
f80f408b epee: don't disable -Wtautological-constant-out-of-range-compare on GCC (moneromooo-monero)
2017-11-14Merge pull request #2629Riccardo Spagni1-2/+0
383ff4f6 remove "using namespace std" from headers (moneromooo-monero)
2017-11-14epee: don't disable -Wtautological-constant-out-of-range-compare on GCCmoneromooo-monero1-0/+2
It's a CLANG only option, and causes GCC to error out
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-2/+0
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-14Merge pull request #2756Riccardo Spagni6-0/+0
0bf09154 Fix file permission issue (Tim L)
2017-11-14Merge pull request #2753Riccardo Spagni2-0/+11
fa514082 RPC: get_info add rpc_connections_count (Tim L)
2017-11-14Merge pull request #2743Riccardo Spagni1-0/+1
9ff8e139 epee: disable a spurious warning for a storage function (moneromooo-monero)
2017-11-14Merge pull request #2617Riccardo Spagni4-5/+26
7dbf76d0 Fix an object lifetime bug in net load tests (moneromooo-monero)
2017-11-07RPC: get_info add rpc_connections_countTim L2-0/+11
2017-11-03Fix file permission issueTim L6-0/+0
This branch fixes a file permission issue introduced by https://github.com/monero-project/monero/commit/69c37200aa87f100f731e755bdca7a0dc6ae820a
2017-11-01Merge pull request #2663Riccardo Spagni1-1/+9
4b228dd3 cmake: epee: use var from FindOpenSSL.cmake (redfish) 29497f79 epee: use boost type for SSL error code (redfish)
2017-10-31Merge pull request #2723Riccardo Spagni6-17/+60
69c37200 RPC Add cross origin resource sharing support (Tim L)
2017-10-30RPC Add cross origin resource sharing supportTim L6-17/+60
2017-10-28epee: disable a spurious warning for a storage functionmoneromooo-monero1-0/+1
2017-10-20net_helper: fix massive slowdown after SSL supportmoneromooo-monero1-5/+5
2017-10-17epee: use boost type for SSL error coderedfish1-1/+9
Fixes compile error when building with OpenSSL v1.1: contrib/epee/include/net/net_helper.h: In member function ‘void epee::net_utils::blocked_mode_client::shutdown_ssl()’: contrib/epee/include/net/net_helper.h:579:106: error: ‘SSL_R_SHORT_READ’ was not declared in this scope if (ec.category() == boost::asio::error::get_ssl_category() && ec.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)) ^ contrib/epee/include/net/net_helper.h:579:106: note: suggested alternative: ‘SSL_F_SSL_READ’ See boost/asio/ssl/error.hpp. Boost handles differences between OpenSSL versions. cmake: fail if Boost is too old for OpenSSL v1.1
2017-10-15Merge pull request #2602Riccardo Spagni2-5/+5
bc1b9333 frob level 1 logs a bit for consistency (moneromooo-monero)
2017-10-15add string_tools::validate_hex()Jaquee1-0/+6
2017-10-15Serializer: string to integer conversion for MyMonero compatibilityJaquee1-0/+27
mymonero timestamp conversion
2017-10-15epee http_client SSL supportJaquee3-46/+111
2017-10-09Fix an object lifetime bug in net load testsmoneromooo-monero4-5/+26
The commands handler must not be destroyed before the config object, or we'll be accessing freed memory. An earlier attempt at using boost::shared_ptr to control object lifetime turned out to be very invasive, though would be a better solution in theory.
2017-10-07frob level 1 logs a bit for consistencymoneromooo-monero2-5/+5
Level 1 logs map to INFO, so setting log level to 1 should show these. Demote some stuff to DEBUG to avoid spam, though.
2017-10-07Subaddresseskenshi841-5/+41
2017-10-06Merge pull request #2541Riccardo Spagni1-0/+2
15e62581 connection_context: initialize m_callback_request_count to 0 (moneromooo-monero) 5fa199c6 copyable_atomic: add a ctor with initial value (moneromooo-monero)
2017-10-05Upgrades to epee::net_utils::network_addressLee Clagett2-71/+127
- internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class
2017-10-02Merge pull request #2512Riccardo Spagni1-0/+1
792ba4f0 Log categories can now be added to and removed from (moneromooo-monero) 48f92eb6 easylogging++: add categories getter (moneromooo-monero) f35afe62 epee: factor log level/categories setting (moneromooo-monero)
2017-10-02Merge pull request #2475Riccardo Spagni1-2/+8
f2939bdc epee: keep a ref to a connection we're deleting (moneromooo-monero)
2017-10-02Merge pull request #2467Riccardo Spagni1-0/+3
2e82b232 epee: give virtual dtor to network_address_base (moneromooo-monero)
2017-09-27copyable_atomic: add a ctor with initial valuemoneromooo-monero1-0/+2
2017-09-25serialization: add deque serializationmoneromooo-monero1-0/+36
2017-09-25Merge pull request #2456Riccardo Spagni1-1/+2
91def9a5 daemon, wallet: add --max-log-file-size option (selsta)
2017-09-25http_base: init size_t in http_request_info ctormoneromooo-monero1-1/+2
CID 161879
2017-09-22Log categories can now be added to and removed frommoneromooo-monero1-0/+1
Also, set_log without parameters now prints the log categories
2017-09-21Merge pull request #2302Riccardo Spagni2-22/+15
ef005f5e p2p: add a couple early outs when the stop signal is received (moneromooo-monero) 80d361c7 abstract_tcp_server2: improve tracking/cancelling of early connections (moneromooo-monero)
2017-09-19epee: keep a ref to a connection we're deletingmoneromooo-monero1-2/+8
close might end up dropping a ref, ending up removing the connection from m_connects, as the lock is recursive. This'd cause an out of bounds exception and kill the idle connection maker thread
2017-09-18epee: give virtual dtor to network_address_basemoneromooo-monero1-0/+3
It has virtual functions and is used as a base class
2017-09-17daemon, wallet: add --max-log-file-size optionselsta1-1/+2
2017-08-26Merge pull request #2320Riccardo Spagni2-18/+16
c656dd0e Fix refresh counter display (Howard Chu) c088d38a Simplify readline support (Howard Chu)
2017-08-25Merge pull request #2311Riccardo Spagni1-0/+12
df0cffed cryptonote_protocol: warn if we see a higher top version we expect (moneromooo-monero) 317ab21a cryptonote_protocol: less strict check on top version on connect (moneromooo-monero) cc81a371 cryptonote_protocol: update target height when syncing too (moneromooo-monero) e2ad372b cryptonote_protocol: simplify and remove unnecessary casts (moneromooo-monero) 727e67ca cryptonote_protocol: print peer top height along with its version (moneromooo-monero) b5345ef4 crypto: use malloc instead of alloca (moneromooo-monero) 80794b31 thread_group: set thread size to THREAD_STACK_SIZE (moneromooo-monero) 5524bc31 print peer id in 0 padded hex for consistency (moneromooo-monero) 8f8cc09b contrib: add sync_info to rlwrap command set (moneromooo-monero) 70b8c6d7 cryptonote_protocol: misc fixes to the new sync algorithm (moneromooo-monero)
2017-08-23print peer id in 0 padded hex for consistencymoneromooo-monero1-0/+12
2017-08-22http_client: add getters for host and portmoneromooo-monero1-0/+3
2017-08-22Simplify readline supportHoward Chu2-18/+16
And don't use std::mutex
2017-08-16abstract_tcp_server2: improve tracking/cancelling of early connectionsmoneromooo-monero2-22/+15
We don't actually need to keep them past the call to start, as this adds them to the config object list, and so they'll then be cancelled already when the stop signal arrives. This allows removing the periodic call to cleanup connections.
2017-08-16Construct on first use for completion_commandsJethro Grassie1-11/+3
2017-08-15Merge pull request #2253Riccardo Spagni1-2/+2
51ebedb8 epee: remove a couple unused locals (moneromooo-monero)
2017-08-15Merge pull request #2240Riccardo Spagni1-11/+16
b7d6ec83 simplewallet: add (out of sync) or (no daemon) markers in the prompt (moneromooo-monero) fa23a500 wallet2: add a is_synced function (moneromooo-monero) f1307bbd node_rpc_proxy: add a proxy for target height (moneromooo-monero)
2017-08-15Merge pull request #2237Riccardo Spagni2-5/+17
5d4ef719 core: speed up output index unique set calculation (moneromooo-monero) 19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero) bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
2017-08-09epee: fixup KV_SERIALIZE_OPT to work in more casesmoneromooo-monero1-1/+4
2017-08-07Merge pull request #2149Riccardo Spagni1-0/+14
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero) f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero) 90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero) 84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero) 5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07Merge pull request #2220Riccardo Spagni1-3/+0
c6ba7d11 p2p: move m_in_timedsync from connection_context to p2p_connection_context (moneromooo-monero)
2017-08-07Merge pull request #2201Riccardo Spagni1-0/+7
dc0b312f wallet_rpc_server: optionally return tx blobs on transfer calls (moneromooo-monero) 5eb79983 epee: add a KV_SERIALIZE variant for optional parameters (moneromooo-monero)
2017-08-07Merge pull request #2195Riccardo Spagni1-0/+1
599436a4 mlog: default to msgwriter logs only for log level 1 (moneromooo-monero) 58f3fc68 Make msgwriter logs go to file only (moneromooo-monero)
2017-08-07Merge pull request #2151Riccardo Spagni1-1/+1
13a8d64f epee: don't send the body of the response to a HEAD HTTP request (Guillaume LE VAILLANT)
2017-08-07Merge pull request #2153Riccardo Spagni6-9/+9
35d68b2c Fix spelling errors (Erik de Castro Lopo)
2017-08-07cryptonote_protocol_handler: sync speedupmoneromooo-monero1-0/+14
A block queue is now placed between block download and block processing. Blocks are now requested only from one peer (unless starved). Includes a new sync_info coommand.
2017-08-05epee: remove a couple unused localsmoneromooo-monero1-2/+2
2017-08-02simplewallet: add (out of sync) or (no daemon) markers in the promptmoneromooo-monero1-11/+16
Should help people who don't realize why they haven't seen their monero yet.
2017-08-01p2p: move m_in_timedsync from connection_context to p2p_connection_contextmoneromooo-monero1-3/+0
It's got no place in the base class as it's P2P specific field
2017-08-01epee: add nanosecond timer and pause/restart profiling macrosmoneromooo-monero2-5/+17
Nanosecond timer precision won't work on Windows, but we don't care since I'm using that just for profiling incremental code paths, but a Windows coder is welcome to add it if there's a way.
2017-07-24epee: add a KV_SERIALIZE variant for optional parametersmoneromooo-monero1-0/+7
2017-07-24Make msgwriter logs go to file onlymoneromooo-monero1-0/+1
This was the case for monero-wallet-cli already, but not for monerod, which was making it pretty spammy as it was duplicating intended output. Since my original intent was to ensure logs included command output for debugging, this achieves both.
2017-07-19Merge pull request #2159Riccardo Spagni2-0/+19
6955976b Add various readline related fixes (Jethro Grassie)
2017-07-19Merge pull request #2131Riccardo Spagni1-3/+3
a04faf56 abstract_tcp_server2: guard against accessing lock on a destroyed object (moneromooo-monero)
2017-07-09Add various readline related fixesJethro Grassie2-0/+19
- Add missing unbind key - Fix colored messages - Add command completion - Preserve last command input - Fix cursor position issues - Fix trailing whitespace in commands - Synchronize set_prompt
2017-07-05epee: don't send the body of the response to a HEAD HTTP requestGuillaume LE VAILLANT1-1/+1
According to the HTTP spec: "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response".
2017-07-05Fix spelling errorsErik de Castro Lopo6-9/+9
2017-07-03Merge pull request #2130Riccardo Spagni1-15/+20
a0d2c745 Fix issue #2119 SEGV (Howard Chu)
2017-07-03Merge pull request #2122Riccardo Spagni1-1/+0
a282c575 Fix #2071: remove declaration of unused variable "it" in epee (binaryFate)
2017-07-03Merge pull request #2098Riccardo Spagni1-1/+5
fdccf7e6 Add readline improvements (Jethro Grassie)
2017-07-01Fix issue #2119 SEGVHoward Chu1-15/+20
Due to bad refactoring in PR #2073. timeout_handler() doesn't work as a virtual function.
2017-06-28abstract_tcp_server2: guard against accessing lock on a destroyed objectmoneromooo-monero1-3/+3
2017-06-28Remove typeid use in network_addressmoneromooo-monero1-3/+2
Since I had to add an ID to the derived classes anyway, this can be used instead. This removes an apparently pointless warning from CLANG too.
2017-06-26Fix #2071: remove declaration of unused variable "it" in epeebinaryFate1-1/+0
2017-06-24Add readline improvementsJethro Grassie1-1/+5
Color prompt now working and no reprompting on exit command.
2017-06-24Merge pull request #2103Riccardo Spagni1-2/+2
21b939e1 readline: fix invalid memory access (moneromooo-monero) 5f8f2905 readline_buffer: add a couple const (moneromooo-monero)
2017-06-24Merge pull request #2073Riccardo Spagni2-9/+49
07c4276c Don't issue a new timedsync while one is already in progress (Howard Chu) cf3a376c Don't timeout a slow operation that's making progress (Howard Chu) 340830de Fix PR#2039 (Howard Chu)
2017-06-21readline_buffer: add a couple constmoneromooo-monero1-2/+2
2017-06-19net_utils_base: added missing template keywordkenshi841-1/+1
2017-06-18Add readline support to clijethro2-0/+81
This PR adds readline support to the daemon and monero-wallet-cli. Only GNU readline is supported (e.g. not libedit) and there are cmake checks to ensure this. There is a cmake variable, Readline_ROOT_DIR that can specify a directory to find readline, otherwise some default paths are searched. There is also a cmake option, USE_READLINE, that defaults to ON. If set to ON, if readline is not found, the build continues but without readline support. One negative side effect of using readline is that the color prompt in the wallet-cli now has no color and just uses terminal default. I know how to fix this but it's quite a big change so will tackle another time.
2017-06-15Don't issue a new timedsync while one is already in progressHoward Chu1-0/+3
A timedsync is issued every minute on a connection, but the input tineout is 2 minutes. This means a new sync request could be issued while a slow sync request was already in progress. The additional request will further clog the network on a slow connection, and cause a premature timeout.
2017-06-15Don't timeout a slow operation that's making progressHoward Chu1-9/+46
If we got at least MIN_BYTES_WANTED (default 512) during any network poll, reset the timeout to allow more time for data to arrive.
2017-05-27abstracted nework addressesmoneromooo-monero8-26/+122
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
2017-04-25Removed some unused epee functionsLee Clagett3-726/+2
2017-04-11Simplified the implementation and features of spanLee Clagett3-194/+137
2017-04-11Improvements for epee binary to hex functions:Lee Clagett3-28/+257
- Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
2017-04-10setThreadName moved in new version of easylogging++moneromooo-monero1-1/+1
2017-04-10update easylogging++ to latest upstreammoneromooo-monero1-9/+0
2017-03-18Removed boost/asio.hpp include from epee/string_tools.hLee Clagett4-31/+16
2017-03-05http_client: allow cancelling a downloadmoneromooo-monero1-2/+10
2017-03-05http_client: allow derived class to get headers at startmoneromooo-monero1-0/+11
2017-02-24Updated default RPC timeout from 5 seconds to 15 secondsLee Clagett1-4/+4
2017-02-22Merge pull request #1762Riccardo Spagni1-1/+1
dcf684c7 http_server_impl_base: set bind message to MGINFO (anonimal)
2017-02-21http_server_impl_base: set bind message to MGINFOanonimal1-1/+1
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-20http_client: add a couple constsmoneromooo-monero1-2/+2
2017-02-12Merge pull request #1717Riccardo Spagni1-5/+5
8bdc86be protocol: speed up sync by minimizing duplicate work (moneromooo-monero) 61dfa310 epee: fix some log macros not printing context nicely (moneromooo-monero)
2017-02-12epee: fix some log macros not printing context nicelymoneromooo-monero1-5/+5
2017-02-12Fixup choice of easylogging++ vs libunwind stack trace codemoneromooo-monero1-2/+3
2017-02-11Merge pull request #1693Riccardo Spagni1-0/+2
5d00659e disable ELPP_STACKTRACE_ON_CRASH for android (MoroccanMalinois)
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett6-45/+85
2017-02-06disable ELPP_STACKTRACE_ON_CRASH for androidMoroccanMalinois1-0/+2
2017-02-04Use easylogging++'s stack trace facility where possiblemoneromooo-monero1-1/+2
This avoids using libunwind, which often causes trouble.
2017-01-25Updates to epee HTTP client codeLee Clagett4-200/+80
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-20removing some unsed epee filesmoneroexamples1-132/+0
2017-01-16Change logging to easylogging++moneromooo-monero30-1466/+283
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-15Merge pull request #1561Riccardo Spagni1-1/+1
d561f4ad enable clang checks that were disabled (Chris Vickio) 0aefb2f6 remove std::move from return statements (pessimizing-move warning) (Chris Vickio) 629d5b76 change counter from bool to int (deprecated-increment-bool warning) (Chris Vickio) fb76d439 add extra braces around subobjects (missing-braces warning) (Chris Vickio) 3b6d5f25 make struct/class declarations consistent (mismatched-tags warning) (Chris Vickio) fcf66925 remove unused fields from network_throttle (unused-private-field warning) (Chris Vickio) 296f8c16 inline unused function (for unused-function warning) (Chris Vickio)
2017-01-14inline unused function (for unused-function warning)Chris Vickio1-1/+1
2017-01-11Added (not yet enabled) HTTP client authenticationLee Clagett3-22/+101
2017-01-08Merge pull request #1514Riccardo Spagni1-3/+10
fa0ee42c Workarounds for gcc 4.8 (Lee Clagett)
2017-01-05Build wallet with Android NDKMoroccanMalinois1-1/+1
2016-12-30Workarounds for gcc 4.8Lee Clagett1-3/+10
2016-12-13Adding HTTP Digest Auth (but not yet enabled)Lee Clagett4-6/+103
2016-12-04Merge pull request #1403Riccardo Spagni1-1/+1
60633cf6 Spelling in errors (taushet)
2016-12-04Merge pull request #1385Riccardo Spagni1-0/+30
5783dd8c tests: add unit tests for uri parsing (moneromooo-monero) 82ba2108 wallet: add API and RPC to create/parse monero: URIs (moneromooo-monero) d9001b43 epee: add functions to convert from URL format (ie, %XX values) (moneromooo-monero)
2016-12-04Spelling in errorstaushet1-1/+1
2016-11-28epee: add functions to convert from URL format (ie, %XX values)moneromooo-monero1-0/+30
2016-11-28epee: signal cond var before unlockingmoneromooo-monero1-1/+1
This is more canonical, and avoids some helgrind spam
2016-11-24Merge pull request #1372Riccardo Spagni1-3/+3
17b6bd6 Fix DNS failures in offline mode preventing daemon startup (moneromooo-monero)
2016-11-23Fix DNS failures in offline mode preventing daemon startupmoneromooo-monero1-3/+3
2016-11-17epee: blind attempt to fix exit hang on windowsmoneromooo-monero1-0/+14
Thanks to duckduckgo and the internet. This might even compile.
2016-11-12levin: fix wrong value passed as return code to remote callmoneromooo-monero1-1/+1
When receiving an answer packet, the command code was passed to the callback instead of the error code. This was hiding the "command not found" failure from the peer, and in turn causing the code to attempt to deserialize a non existent reply string.
2016-10-31adding static_assert to pod functions in string toolsLee Clagett1-0/+4
2016-10-27Unkonown -> unknownNanoAkron1-1/+1
2016-10-03Removed all code related to fast_exitNanoAkron2-14/+1
2016-09-18epee: optionally restrict HTTP service to a configurable user agentmoneromooo-monero5-12/+31
This is intended to catch traffic coming from a web browser, so we avoid issues with a web page sending a transfer RPC to the wallet. Requiring a particular user agent can act as a simple password scheme, while we wait for 0MQ and proper authentication to be merged.
2016-09-01epee: do not try network resolution if loopback workedmoneromooo-monero1-1/+1
Fixes the wallet being unable to connect to the daemon when there is no NIC.
2016-07-06Merge pull request #884Riccardo Spagni1-4/+9
c2ad9ca allow peers without port (moneromooo-monero)
2016-07-03allow peers without portmoneromooo-monero1-4/+9
The default port is then used
2016-06-22contrib: epee: add missing noexcept spec to class declredfish1-1/+1
The noexcept specs were added to make GCC 6.1.1 happy (#846), but this one was missing (because GCC did not complain about it on Linux, but does complain on OSX).
2016-06-19Merge pull request #862Riccardo Spagni1-1/+3
5dc09f2 wallet_rpc_server: fix some string values being returned between <> (moneromooo-monero) f8213c0 Require 64/16 characters for payment ids (moneromooo-monero)
2016-06-19Require 64/16 characters for payment idsmoneromooo-monero1-1/+3
The default behavior for hex string parsing would allow the last digit to be made from a single hexadecimal character, which is correct, but we typically do not want that as it gets confusing and easy to not spot wrong input size.
2016-05-18contrib: epee: add exception spec to throwing destructorsredfish3-3/+3
The destructors get a noexcept(true) spec by default, but these destructors in fact throw exceptions. An alternative fix might be to not throw (most if not all of these throws are non-essential error-reporting/logging).