Commit graph

2315 commits

Author SHA1 Message Date
Riccardo Spagni
ee45b7a6db
Merge pull request #1605
7c3f79cb core: early out in handle_incoming_tx if already in pool or blockchain (moneromooo-monero)
6cc7d261 ringct: reorder a bit to check quicker tests first (moneromooo-monero)
2017-01-22 11:42:15 -05:00
Riccardo Spagni
e12f073f65
Merge pull request #1604
a854cec3 Make stack trace show up in log file with default settings (moneromooo-monero)
2017-01-22 11:41:38 -05:00
moneromooo-monero
7c3f79cb9f
core: early out in handle_incoming_tx if already in pool or blockchain 2017-01-21 20:30:10 +00:00
moneromooo-monero
6cc7d26140
ringct: reorder a bit to check quicker tests first 2017-01-21 20:29:22 +00:00
moneromooo-monero
a854cec3ba
Make stack trace show up in log file with default settings 2017-01-21 20:28:18 +00:00
Miguel Herranz
1c4d65c011 Rename method to get_random_gray_peer 2017-01-21 13:04:49 +01:00
Miguel Herranz
03a54ee0c9 Fix logging that broke after rebasing 2017-01-21 11:22:04 +01:00
Miguel Herranz
6bdd3a59b5 Use set_peer_just_seen to keep last_seen updated 2017-01-21 10:11:32 +01:00
Miguel Herranz
82dbeedd1b Add gray peer list housekeeping system
A random peer from the gray peer list is selected and a connection is
made to check if the peer is alive.

If the connection and handshake are successful the peer is promoted to
the white peer list, in case of failure the peer is evicted from the
gray peer list.

The connection is closed after the check in either case.
2017-01-21 10:09:38 +01:00
Riccardo Spagni
39aaea8e62
Merge pull request #1599
17246d05 wallet: print exception message on get_random_outs_error (moneromooo-monero)
2017-01-20 21:00:01 -05:00
Riccardo Spagni
3db3a6ee1a
Merge pull request #1593
cbcdf8ad Honor depth in get_peerlist_head method (Miguel Herranz)
2017-01-20 20:59:09 -05:00
Riccardo Spagni
4bcd284c76
Merge pull request #1592
78d560a9 simplewallet: use MAKE_CORE_RPC_VERSION(1,4) instead of 0x10004 (kenshi84)
2017-01-20 20:58:55 -05:00
Riccardo Spagni
d5fbba45e8
Merge pull request #1589
87c658f8 wallet2_api: add API to set log categories (moneromooo-monero)
2017-01-20 20:58:39 -05:00
Riccardo Spagni
8698dd36f2
Merge pull request #1587
843769f8 Tweak some msg loglevels (Howard Chu)
2017-01-20 20:56:47 -05:00
Riccardo Spagni
d10425025a
Merge pull request #1572
0e0e6c5f Reduce to one connection per IP (Miguel Herranz)
3f269e98 Limit incoming connections from the same IP (Miguel Herranz)
2017-01-20 20:54:04 -05:00
moneromooo-monero
17246d051d
wallet: print exception message on get_random_outs_error 2017-01-20 18:01:13 +00:00
Miguel Herranz
cbcdf8ad35 Honor depth in get_peerlist_head method
The method returned depth + 2 because:

- push_back was executed before the condition.
- > instead of >= causing one more iteration.
2017-01-18 21:41:52 +01:00
kenshi84
78d560a933 simplewallet: use MAKE_CORE_RPC_VERSION(1,4) instead of 0x10004 2017-01-18 16:11:18 +09:00
moneromooo-monero
87c658f83b
wallet2_api: add API to set log categories 2017-01-16 21:14:44 +00:00
Howard Chu
843769f88f
Tweak some msg loglevels 2017-01-16 20:42:59 +00:00
Miguel Herranz
0e0e6c5f39 Reduce to one connection per IP 2017-01-16 18:16:32 +01:00
Riccardo Spagni
71ac698b78
Merge pull request #1585
a480bf6b fixups in logging init calls, and add missing net context in a log (moneromooo-monero)
2017-01-16 08:41:33 -05:00
Riccardo Spagni
deb6728bc3
Merge pull request #1584
990e08f0 Fix PR#1506, off by one in chain height (Howard Chu)
2017-01-16 08:41:15 -05:00
moneromooo-monero
a480bf6b14
fixups in logging init calls, and add missing net context in a log 2017-01-16 10:45:59 +00:00
Howard Chu
990e08f090
Fix PR#1506, off by one in chain height 2017-01-16 10:00:06 +00:00
moneromooo-monero
693c190881
wallet: add a node RPC cache layer for simple RPC calls
Mostly getinfo and get_hard_fork_info, which are called
pretty often. This speeds up transfers as a bonus.
2017-01-16 08:59:15 +00:00
moneromooo-monero
d86ae2bec6
wallet2: reuse fake outs when adjusting fee on transfer
This avoids indirectly leaking the real output to the daemon,
and is faster.

This will still happen for more complex cases, especially
when cancelling a tx and "re-rolling" it.
2017-01-16 08:59:08 +00:00
moneromooo-monero
64da0983d5
core: don't try to deserialize an empty extra to remove a field 2017-01-16 08:59:02 +00:00
Riccardo Spagni
ab69d5b367
Merge pull request #1569
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-15 20:32:57 -05:00
kenshi84
16b8b66adc specify restore height by YYYY-MM-DD format 2017-01-16 10:00:28 +09: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
e459d8604d
Merge pull request #1578
ce866d1c macro to define core RPC version for avoiding future mistake (kenshi84)
2017-01-15 19:13:45 -05:00
Riccardo Spagni
422a36ca2a
Merge pull request #1581
6da9335a blockchain_import: fix build after tx_pool::add_tx changes (moneromooo-monero)
2017-01-15 19:13:28 -05:00
Riccardo Spagni
ec323d8c3f
Merge pull request #1561
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-15 19:01:08 -05:00
kenshi84
ce866d1cc6 macro to define core RPC version for avoiding future mistake 2017-01-16 07:55:43 +09:00
moneromooo-monero
6da9335a9e
blockchain_import: fix build after tx_pool::add_tx changes 2017-01-15 21:52:56 +00:00
Riccardo Spagni
b2e1568335
Merge pull request #1579
f5f4109f mnemonics: fix language detection with checksum word (moneromooo-monero)
2017-01-15 14:58:09 -05:00
Riccardo Spagni
99ffc49740
Merge pull request #1577
feb499aa core: check block version for alt chains too (moneromooo-monero)
2017-01-15 14:57:30 -05:00
Riccardo Spagni
1207d8ad0d
Merge pull request #1576
ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
2017-01-15 14:56:39 -05:00
Riccardo Spagni
9cda94d0aa
Merge pull request #1574
d276a165 wallet2: use at least two rct inputs if possible (moneromooo-monero)
2017-01-15 14:55:40 -05:00
Riccardo Spagni
f00797a1f2
Merge pull request #1573
dea53962 fix timeout in check_connection (Jaquee)
2017-01-15 14:55:12 -05:00
Riccardo Spagni
10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
Riccardo Spagni
91083a43be
Merge pull request #1568
5b5017e2 rpc: add a command to get info about the current blockchain (moneromooo-monero)
2017-01-15 14:48:09 -05:00
Riccardo Spagni
31de98793f
Merge pull request #1567
c9f13c5e wallet2: fix tx reroll not updating fee is going up a kB step (moneromooo-monero)
2017-01-15 14:47:44 -05:00
Riccardo Spagni
51baab2112
Merge pull request #1565
50b230d1 core: ensure block size limit is set from the start (moneromooo-monero)
2017-01-15 14:47:17 -05:00
Riccardo Spagni
865f5bef34
Merge pull request #1564
1d317981 Wallet API: add key image import/export functions (Jaquee)
2017-01-15 14:46:52 -05:00
Riccardo Spagni
8bd2c2e551
Merge pull request #1563
36ba311c Prioritize older transactions in the mempool (Miguel Herranz)
2017-01-15 14:46:33 -05:00
Riccardo Spagni
935f50471c
Merge pull request #1560
46550c0b Wallet API: add rescanSpent() (Jaquee)
2017-01-15 14:44:49 -05:00
Riccardo Spagni
c23bd75df6
Merge pull request #1552
4a017674 Wallet API: support integrated addresses in address book. (Jaquee)
2017-01-15 14:44:28 -05:00
Riccardo Spagni
65e33b1bc5
Merge pull request #1506
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu)
eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu)
c903c554 Don't cache block height, always get from DB (Howard Chu)
eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu)
0693cff9 Use batch transactions when syncing (Howard Chu)
2017-01-15 14:43:12 -05:00