Commit graph

158 commits

Author SHA1 Message Date
Riccardo Spagni 04591af7fd Merge pull request #2153
35d68b2c Fix spelling errors (Erik de Castro Lopo)
2017-08-07 14:49:15 +02:00
Erik de Castro Lopo 35d68b2c6d Fix spelling errors 2017-07-05 17:53:16 +10:00
Howard Chu 464afd4d2d
Ensure DNSResolver destructor runs on exit
Plugs a noisy but benign memory leak
2017-06-28 22:21:06 +01:00
jethro e1f3dfccc8 Add readline support to cli
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-18 10:08:37 -04:00
Gentian 4b932ff314 changed crypto to cncrypto so it generated libcncrypto
fix a cmakelist
2017-05-23 07:45:40 -04:00
Riccardo Spagni f33a696ec7
Merge pull request #1883
d0238313 use const references in catch blocks (moneromooo-monero)
2017-03-18 20:30:19 +02:00
moneromooo-monero d023831327
use const references in catch blocks 2017-03-18 12:56:07 +00:00
stoffu 250c4cb3e0
wallet-rpc: enable openalias 2017-03-17 10:42:10 +09:00
moneromooo-monero 749ebacebd
download: check available disk space before downloading
We don't check *while* the download happens, so it might
still be that we don't have enough space later
2017-03-05 16:59:32 +00:00
moneromooo-monero f36c5f1e08
download: give download threads distinct names 2017-03-05 16:59:29 +00:00
moneromooo-monero 63f0e074eb
download: async API 2017-03-05 16:58:48 +00:00
moneromooo-monero 583a7b5c74
core: protect precomputed block hashes with SHA256 2017-02-23 23:18:10 +00:00
moneromooo-monero ada0e23a84
updates: fix user/auto url split 2017-02-22 13:04:07 +00:00
moneromooo-monero 5901331669
updates: remove testnet case
It need not be any different
2017-02-22 11:20:44 +00:00
moneromooo-monero 822577eb42
updates: we now have a user URL, and an automatic one
So the user can use https, while the automatic does not have to
2017-02-22 11:20:40 +00:00
moneromooo-monero 6a5dfb88d2
updates: add all update servers 2017-02-22 11:20:24 +00:00
moneromooo-monero 72d40f13a4
updates: use HTTP, not HTTPS
The files are hashed and the hashes signed
2017-02-22 09:08:35 +00:00
Riccardo Spagni 1a4298685a
Merge pull request #1766
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)
2017-02-22 09:36:11 +02:00
moneromooo-monero 45101550f2
updates: use updates host, not downloads, for HTTP 2017-02-21 22:21:59 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni 2bdad8d695
Merge pull request #1760
efdd783c add openssl to readme (Riccardo Spagni)
058eed36 cmakify openssl (Riccardo Spagni)
2017-02-21 17:23:10 +02:00
Riccardo Spagni 058eed369b
cmakify openssl 2017-02-21 17:11:12 +02:00
anonimal 5c3badb749
dns_utils: fix infinite recursion when distributing empty dns_urls
load_txt_records_from_dns attempts to distribute `a = 0, b = -1` where
(b = dns_urls.size() - 1) and IntType is signed integer. This results in
an infinite recursion which leads to SIGSEGV.
2017-02-21 14:38:22 +00:00
moneromooo-monero a5a0a3c894
core: updates can now be downloaded (and SHA256 hash checked) 2017-02-20 22:58:37 +00:00
moneromooo-monero 216f062eb8
util: add a SHA256 function 2017-02-20 22:58:33 +00:00
moneromooo-monero f640512c53
Optionally query moneropulse DNS records to check for updates
It just checks and prints a message if there is a new version
for now.
2017-02-20 22:58:16 +00:00
moneromooo-monero 969ad710ba
dns_utils: fix first checked DNS entry being ignored 2017-02-20 22:58:08 +00:00
moneromooo-monero 08c3f38031
util: add a vercmp function to compare version numbers
It is simple, supports simple x.y.z type numeric versions,
and does not attempt any kind of validation
2017-02-20 22:58:04 +00:00
moneromooo-monero e8a7525ceb
dns_utils: factor TXT record loading code from checkpoint code 2017-02-20 22:57:57 +00:00
moneromooo-monero 422ecc98e4
Fixup choice of easylogging++ vs libunwind stack trace code 2017-02-12 13:59:21 +00:00
Riccardo Spagni eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Riccardo Spagni d30b64f457
Merge pull request #1674
92978b2c common: fix link error on at least one platform (no clue which one) (moneromooo-monero)
2017-02-08 12:51:11 +02:00
Lee Clagett ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
moneromooo-monero 92978b2c0f
common: fix link error on at least one platform (no clue which one)
Bug and fix reported by tdprime
2017-02-05 10:55:55 +00:00
moneromooo-monero cd34fc655d
Use easylogging++'s stack trace facility where possible
This avoids using libunwind, which often causes trouble.
2017-02-04 12:33:03 +00:00
Riccardo Spagni 10b625079b
Merge pull request #1645
9bd9906e Factor is_address_local code into a tools function (moneromooo-monero)
2017-02-02 21:27:45 +02:00
Riccardo Spagni 5fb3f97a55
Merge pull request #1629
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)
2017-02-02 19:32:01 +02:00
Riccardo Spagni ca2e2c2453 Merge pull request #1627
55a8e982 moved get_account_address_from_str_or_url from libcommon to libcryptonote_core (kenshi84)
2017-02-02 18:24:08 +02:00
moneromooo-monero 9bd9906e8f
Factor is_address_local code into a tools function 2017-01-28 14:57:47 +00:00
Lee Clagett c02e1cb943 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
2017-01-25 15:39:32 -05:00
kenshi84 55a8e982c0 moved get_account_address_from_str_or_url from libcommon to libcryptonote_core 2017-01-24 20:31:03 +09:00
Miguel Herranz 629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01:00
moneromooo-monero a854cec3ba
Make stack trace show up in log file with default settings 2017-01-21 20:28:18 +00:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
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-16 00:25:46 +00:00
Riccardo Spagni 006bb0e957
Merge pull request #1538
aff28178 Remove db-auto-remove-logs (Miguel Herranz)
1229c685 Remove berkeley from db_type initialization (Miguel Herranz)
e3090558 Show available types for db-type command (Miguel Herranz)
046ab33d Remove berkeley from blockchain_db_types (Miguel Herranz)
2017-01-13 14:33:59 -05:00
Miguel Herranz aff28178e6 Remove db-auto-remove-logs 2017-01-10 11:49:45 +01:00
Miguel Herranz e309055819 Show available types for db-type command 2017-01-10 11:44:01 +01:00
Riccardo Spagni 2a996f492f
Merge pull request #1510
80abc3bc Build wallet with Android NDK (MoroccanMalinois)
2017-01-08 16:40:02 -08:00
MoroccanMalinois 80abc3bc4a Build wallet with Android NDK 2017-01-05 01:11:05 +00:00