Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
4b228dd3 cmake: epee: use var from FindOpenSSL.cmake (redfish)
29497f79 epee: use boost type for SSL error code (redfish)
|
|
69c37200 RPC Add cross origin resource sharing support (Tim L)
|
|
|
|
|
|
This fixes linking when path to openssl
is defined manually:
cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0;/usr/lib/openssl-1.0' ...
This is useful for building with OpenSSL v1.0
when default system installation is v1.1.
The linking error is undefined SSL_load_error_strings symbol.
This is due to -L /usr/lib/openssl-1.0 not making it onto
the linkline (so -lssl pulls in the default system openssl).
|
|
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
|
|
|
|
bc1b9333 frob level 1 logs a bit for consistency (moneromooo-monero)
|
|
|
|
mymonero timestamp conversion
|
|
|
|
Level 1 logs map to INFO, so setting log level to 1 should
show these. Demote some stuff to DEBUG to avoid spam, though.
|
|
|
|
15e62581 connection_context: initialize m_callback_request_count to 0 (moneromooo-monero)
5fa199c6 copyable_atomic: add a ctor with initial value (moneromooo-monero)
|
|
- 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
|
|
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)
|
|
f2939bdc epee: keep a ref to a connection we're deleting (moneromooo-monero)
|
|
2e82b232 epee: give virtual dtor to network_address_base (moneromooo-monero)
|
|
|
|
|
|
91def9a5 daemon, wallet: add --max-log-file-size option (selsta)
|
|
CID 161879
|
|
Also, set_log without parameters now prints the log categories
|
|
|
|
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)
|
|
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
|
|
It has virtual functions and is used as a base class
|
|
|
|
c656dd0e Fix refresh counter display (Howard Chu)
c088d38a Simplify readline support (Howard Chu)
|
|
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)
|
|
|
|
|
|
And don't use std::mutex
|
|
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.
|
|
|
|
Also added and moved two free's hoping to fix leaks.
|
|
cb2d5110 Tweak net logs so we get more info on why networking can't start (moneromooo-monero)
|
|
This should prevent "silent" failures to start
|
|
51ebedb8 epee: remove a couple unused locals (moneromooo-monero)
|
|
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)
|
|
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)
|
|
|
|
335fc8ab mlog: fix crash accessing stale data when rotating logs (moneromooo-monero)
|
|
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)
|
|
c6ba7d11 p2p: move m_in_timedsync from connection_context to p2p_connection_context (moneromooo-monero)
|
|
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)
|
|
d75cff1a Fix readline prompt when command does not output (Jethro Grassie)
|
|
599436a4 mlog: default to msgwriter logs only for log level 1 (moneromooo-monero)
58f3fc68 Make msgwriter logs go to file only (moneromooo-monero)
|
|
13a8d64f epee: don't send the body of the response to a HEAD HTTP request (Guillaume LE VAILLANT)
|
|
35d68b2c Fix spelling errors (Erik de Castro Lopo)
|
|
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.
|
|
|
|
Should help people who don't realize why they haven't seen their
monero yet.
|
|
It's got no place in the base class as it's P2P specific field
|
|
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.
|
|
|
|
|
|
There might be privacy issues doing it by default
|
|
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.
|
|
|
|
6955976b Add various readline related fixes (Jethro Grassie)
|
|
6a23cd07 Add notification on stop (Jethro Grassie)
|
|
a02d7458 mlog: make MONERO_LOGS env var understand N,logs type spec (moneromooo-monero)
|
|
97069380 mlog: add msgwriter:INFO to log 0 and 1 defaults (moneromooo-monero)
|
|
a04faf56 abstract_tcp_server2: guard against accessing lock on a destroyed object (moneromooo-monero)
|
|
|
|
- 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
|
|
|
|
This ensures command output gets logged by default
|
|
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".
|
|
|
|
a0d2c745 Fix issue #2119 SEGV (Howard Chu)
|
|
a282c575 Fix #2071: remove declaration of unused variable "it" in epee (binaryFate)
|
|
76043b17 monero-wallet-cli: hang on exit in readline code (#2117) (moneromooo-monero)
a73a42a6 monero-wallet-cli: hang on exit in readline code (#2117) (moneromooo-monero)
be9d4f04 Fix multiline wallet cli output with readline (Jethro Grassie)
|
|
fdccf7e6 Add readline improvements (Jethro Grassie)
|
|
Due to bad refactoring in PR #2073.
timeout_handler() doesn't work as a virtual function.
|
|
readline_buffer: move a local to local scope
Also limit the select fd limit to what we use
Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
|
|
readline_buffer: fix start/stop threads being starved by process
process could run for quite some time re-acquiring the process
lock, leaving start/stop starving. Yielding after unlock in
process is much better but doesn't seem to be enough to reliably
yield, so we sleep for a millisecond, which should be transparent
for user input anyway.
Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
|
|
|
|
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.
|
|
|
|
monero-wallet-cli commands which have multine output sometimes causes
issues with the readline support. This patch fixes show_transfers,
payments and incoming_transfers.
|
|
Color prompt now working and no reprompting on exit command.
|
|
8261ba69 readline_buffer: fix busy wait (moneromooo-monero)
|
|
21b939e1 readline: fix invalid memory access (moneromooo-monero)
5f8f2905 readline_buffer: add a couple const (moneromooo-monero)
|
|
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)
|
|
It'd eat up a core constantly, due to spending its time jumping
back and forth between userland and kernel. We now wait for up
to a millisecond in kernel, which will be transparent to the user
and drop to idle most of the time.
|
|
m_cout_buf was not initialized
|
|
|
|
|
|
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.
|
|
072102cf abstracted nework addresses (moneromooo-monero)
|
|
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.
|
|
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.
|
|
Missed a crypto -> cncrypto rename
|
|
Missed a crypto -> cncrypto rename
|
|
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.
|
|
|
|
|
|
|
|
- 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`
|
|
62efe5f6 mlog: direct log category changes to file only (moneromooo-monero)
|
|
|
|
|
|
Because some people just won't even try to read what is written
and freak out because the word FATAL is in here, despite the
context making it clear it's not an error.
|
|
|
|
0effe196 Revert "Increase the log level for the info about log levels" (moneromooo-monero)
|
|
We want to know which log categories are active.
This reverts commit 4f7bce6d20c72a1384289f7c35b7fe0ee796ed41.
|
|
|
|
|
|
|
|
b7f85a30 mlog: default net.cn to FATAL (moneromooo-monero)
|
|
Errors in this layer depend on how peers behave, and thus errors
are expected
|
|
|
|
|
|
dcf684c7 http_server_impl_base: set bind message to MGINFO (anonimal)
|
|
72deb484 updated fallback nodes (Riccardo Spagni)
33329f5b update version to 0.10.2 (Riccardo Spagni)
04a50a7e update checkpoints.dat (Riccardo Spagni)
c3599fa7 update copyright year, fix occasional lack of newline at line end (Riccardo Spagni)
|
|
|
|
|
|
|
|
|
|
|
|
8bdc86be protocol: speed up sync by minimizing duplicate work (moneromooo-monero)
61dfa310 epee: fix some log macros not printing context nicely (moneromooo-monero)
|
|
422ecc98 Fixup choice of easylogging++ vs libunwind stack trace code (moneromooo-monero)
|
|
|
|
|
|
Makes it more likely to show up
|
|
|
|
5d00659e disable ELPP_STACKTRACE_ON_CRASH for android (MoroccanMalinois)
|
|
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
|
|
|
|
|
|
|
|
c3d7a198 mlog: probable fix for gmtime_r not being available on windows (moneromooo-monero)
|
|
cd34fc65 Use easylogging++'s stack trace facility where possible (moneromooo-monero)
|
|
|
|
This avoids using libunwind, which often causes trouble.
|
|
|
|
c02e1cb9 Updates to epee HTTP client code - 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 (Lee Clagett)
|
|
|
|
- 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
|
|
eg, 2,foo:ERROR,bar:INFO
|
|
13dd102e mlog: fix default level/category mapping (moneromooo-monero)
|
|
a854cec3 Make stack trace show up in log file with default settings (moneromooo-monero)
|
|
4d6976fb undelete epee tests.cpp (moneroexamples)
0fd2508b removing some unsed epee files (moneroexamples)
|
|
It was not matching the LOG_PRINT_Lx mapping for 2/3/4
|
|
|
|
|
|
|
|
using the MONERO_LOG_FORMAT environment variable.
Default is:
%datetime{%Y-%M-%d %H:%m:%s.%g}\t%thread\t%level\t%logger\t%loc\t%msg
Field list in easylogging++ documentation.
Don't forget to escape as needed.
|
|
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.
|
|
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)
|
|
|
|
|
|
fa0ee42c Workarounds for gcc 4.8 (Lee Clagett)
|
|
|
|
|
|
|
|
60633cf6 Spelling in errors (taushet)
|
|
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)
|
|
|
|
|
|
This is more canonical, and avoids some helgrind spam
|
|
17b6bd6 Fix DNS failures in offline mode preventing daemon startup (moneromooo-monero)
|
|
|
|
Thanks to duckduckgo and the internet.
This might even compile.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
Fixes the wallet being unable to connect to the daemon
when there is no NIC.
|
|
c2ad9ca allow peers without port (moneromooo-monero)
|
|
The default port is then used
|
|
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).
|
|
5dc09f2 wallet_rpc_server: fix some string values being returned between <> (moneromooo-monero)
f8213c0 Require 64/16 characters for payment ids (moneromooo-monero)
|
|
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.
|
|
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).
|
|
1c0bffb Restrict also 'get_connections' and 'getbans' APIs. (osensei)
9f8bc49 Don't allow 'flush_txpool' and 'setbans' JSON_RPC methods when running in restricted mode. (osensei)
|
|
restricted mode.
|
|
They're not fatal, though indicate something wrong
|
|
When the send queue limit is reached, it is likely to not drain
any time soon. If we call close on the connection, it will stay
alive, waiting for the queue to drain before actually closing,
and will hit that check again and again. Since the queue size
limit is the reason we're closing in the first place, we call
shutdown directly.
|
|
If we reach the send queue size limit, we need to release the lock,
or we will deadlock and it will never drain.
If we reach that limit, it's likely there's another problem in the
first place though, so it will probably not drain in practice either,
unless some kind of transient network timeout.
|
|
aaaf9e2 Fix get_tick_count() on Windows (Howard Chu)
|
|
GetTickCount used in 52056dcfc480a126e06afaf209b1772b6aa77fb3
only has ~10-16ms resolution. Use higher rez timer to get 1ms rez.
|
|
This is equivalent to line buffering, as C++ seems to lack
a setvbuf equivalent which alows line buffering.
|
|
|
|
|
|
Ain't nobody got time for link/cmake skullduggery.
This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
|
|
2b4cab3 epee: fix potential hang on exit (moneromooo-monero)
|
|
Also close sockets on failure, just in case
|
|
Useful for debugging users' logs
|
|
|
|
66c2fc7 Need to link boost::chrono in more places now (Howard Chu)
b937a2c Use boost::thread instead of std::thread (Howard Chu)
|
|
|
|
and all other associated IPC
|
|
This avoids the need to define that variable in every program
which uses epee.
|
|
Use boost::unordered_map instead.
|
|
Use boost...
|