Commit graph

358 commits

Author SHA1 Message Date
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
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 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
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
Chris Vickio 0aefb2f60a remove std::move from return statements (pessimizing-move warning) 2017-01-15 19:23:33 +03:00
Chris Vickio 629d5b7689 change counter from bool to int (deprecated-increment-bool warning) 2017-01-15 19:23:33 +03:00
moneromooo-monero d276a16526
wallet2: use at least two rct inputs if possible
If we'd make a rct tx with just one input, we try to add
a second one to match the 2/2 ideal. This means more txes
use that template (and are thus using a larger anonymity
set), and it coalesces outputs "for free". We use the
smallest amount outputs in priority for this, so we can
"clean" the wallet at the same time.
2017-01-14 21:43:01 +00:00
Jaquee dea53962a3
fix timeout in check_connection 2017-01-14 14:45:30 +01:00
moneromooo-monero c9f13c5e54
wallet2: fix tx reroll not updating fee is going up a kB step 2017-01-13 22:28:19 +00:00
Riccardo Spagni 2806842200
Merge pull request #1562
a081b39c Move key image export/import functions to wallet2 (Jaquee)
2017-01-13 14:38:29 -05:00
Riccardo Spagni 2a2f02e375
Merge pull request #1559
db56a03f Wallet2 + API: Callbacks for unconfirmed transfers (Jaquee)
2017-01-13 14:37:12 -05:00
Riccardo Spagni faa33fc326
Merge pull request #1541
0d3918e1 Wallet api: Update trustedDaemon when daemon is changed (Jaquee)
dbb838f4 GUI cold signing (Jaquee)
afb85a02 Wallet API: functions for supporting/creating view only wallets (Jaquee)
2017-01-13 14:34:55 -05:00
Riccardo Spagni e51afeb90f
Merge pull request #1540
79b4e1f9 Cold signing: make sure short payment id isnt encrypted twice (Jaquee)
2017-01-13 14:34:26 -05:00
Jaquee a081b39c01
Move key image export/import functions to wallet2 2017-01-13 12:49:10 +01:00
Jaquee db56a03ff2
Wallet2 + API: Callbacks for unconfirmed transfers 2017-01-12 18:25:34 +01:00
Jaquee dbb838f4d0
GUI cold signing
fix conflict
2017-01-10 22:49:17 +01:00
kenshi84 f1dde1a429 wallet cli: print originating block heights of mixin keys when making transfer 2017-01-09 15:10:34 +09:00
Riccardo Spagni ba9744d400
Merge pull request #1515
ada7c7da portable serializer: tests added (kenshi84)
f390a0e2 portable serializer: make signerd/unsigned tx portable, ignore archive version checking (kenshi84)
2017-01-08 16:41:44 -08:00
Riccardo Spagni 13c5da2aa3
Merge pull request #1508
4585ada4 Wallet2: faster exit while refreshing (Jaquee)
2017-01-08 16:39:07 -08:00
Riccardo Spagni 0ce4618bea
Merge pull request #1504
5f4ac6b9 wallet2 bugfix: store watch_only flag properly with rewrite() (kenshi84)
2017-01-08 16:38:19 -08:00
Riccardo Spagni 06de09daf4
Merge pull request #1501
cebae0c5 wallet2: check the node returned the real output when requested (moneromooo-monero)
2017-01-08 16:37:11 -08:00
Riccardo Spagni 03497f0268
Merge pull request #1497
50511677 wallet2: fix large reorgs failing (moneromooo-monero)
2017-01-08 16:35:14 -08:00
Jaquee 79b4e1f997
Cold signing: make sure short payment id isnt encrypted twice 2017-01-08 21:04:53 +01:00
kenshi84 f390a0e2dc portable serializer: make signerd/unsigned tx portable, ignore archive version checking 2017-01-02 20:04:58 +09:00
Jaquee 4585ada453
Wallet2: faster exit while refreshing 2016-12-27 19:12:18 +01:00
moneromooo-monero cebae0c510
wallet2: check the node returned the real output when requested 2016-12-27 09:38:10 +00:00
kenshi84 5f4ac6b909 wallet2 bugfix: store watch_only flag properly with rewrite() 2016-12-26 18:33:24 +09:00
moneromooo-monero 505116771e
wallet2: fix large reorgs failing
If a reorg was large enough that a full 1000 block chunk
from the daemon was all known blocks, refresh would stop,
and no reorg would happen.
2016-12-24 16:04:37 +00:00
kenshi84 99580adf66 make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup 2016-12-21 23:12:15 +09:00
Riccardo Spagni 9777de1890
Merge pull request #1474
fc40b3e7 Lower connection timeout in check_connection() (Jaquee)
2016-12-20 17:47:58 +02:00
Riccardo Spagni 6847999fb8
Merge pull request #1472
2bddb8eb Refactored password prompting for wallets (Lee Clagett)
2016-12-20 17:46:58 +02:00
kenshi84 2ac8007544 also use portable serializer for boost_serialization_helper.h and net_node.inl, completely adandon boost/archive/binary_oarchive.hpp 2016-12-20 13:04:19 +09:00
Lee Clagett 2bddb8ebee Refactored password prompting for wallets 2016-12-19 20:00:43 -05:00
Jaquee fc40b3e732
Lower connection timeout in check_connection() 2016-12-19 21:19:02 +01:00
kenshi84 66e6af89ce added experimental boost::archive::portable_binary_{i|o}archive 2016-12-16 23:46:24 +09:00
anonimal 4bb0bff233
AddressBook: use unsigned type for row ID's
Fixes build warnings and may also prevent future headaches.
2016-12-14 21:37:49 +00:00
Jaquee 3b4539ee7e
addressbook updates 2016-12-12 21:50:50 +01:00
Riccardo Spagni aa7a926681
Merge pull request #1434
5df92877 GUI address book (Jaquee)
2016-12-12 22:39:38 +02:00
Jaquee 5df92877c7 GUI address book 2016-12-12 00:43:02 +01:00
moneromooo-monero c5c45ca660
wallet: bring forward use of the dynamic fee
It was 14 days after v4, it is now one day after it.

luigi1111's suggestion
2016-12-10 15:39:26 +00:00
Riccardo Spagni 2d0fbaf35b
Merge pull request #1422
9b00d80f wallet2: pass by const ref where possible (moneromooo-monero)
2016-12-10 14:49:34 +02:00
Riccardo Spagni 930aceb242
Merge pull request #1419
f4a3ce15 Fix sending outputs from a tx with more than one pubkey (moneromooo-monero)
2016-12-10 14:48:56 +02:00
moneromooo-monero 9b00d80f85
wallet2: pass by const ref where possible
Reported by kenshi84
2016-12-10 11:43:44 +00:00
moneromooo-monero f4a3ce15c1
Fix sending outputs from a tx with more than one pubkey
A bug in cold signing caused a spurious pubkey to be included
in transactions, so we need to ensure we use the correct one
when sending outputs from one of those.
2016-12-09 18:21:21 +00:00
Riccardo Spagni 8e1a8c6adc
Merge pull request #1415
6c44f5c6 wallet: send 0 change to a random address where necessary with rct (moneromooo-monero)
2016-12-08 23:44:40 +02:00
moneromooo-monero 6c44f5c6eb
wallet: send 0 change to a random address where necessary with rct
If a rct transaction would cause no change to be generated, a zero
change output is added, and sent to a randomly generated address.
This ensures that no transaction will be sent with just one output,
which could cause the receiver to be able to determine which of the
inputs in the sent rings is the real one.
This is very rare, since it requires the sum of outputs to be equal
to the sum of outputs plus the fee, which is now a function of the
last few blocks.
2016-12-07 21:05:50 +00:00