Commit Graph

323 Commits

Author SHA1 Message Date
Jaquee
43b57804f8 wallet2: refactor is_tx_spendtime_unlocked() 2017-10-15 17:48:45 +02:00
Jaquee
f44d156cbd my/openmonero API functions 2017-10-15 17:42:29 +02:00
Jaquee
288d3c75c3 wallet2: add remove_obsolete_pool_txs() 2017-10-15 17:39:54 +02:00
Jaquee
2c6aad7ea7 wallet2: add on_pool_tx_removed callback 2017-10-15 17:35:15 +02:00
Jaquee
ff7c30aadc wallet2: light wallet member variables 2017-10-15 17:35:08 +02:00
Riccardo Spagni
d316b3d266
Merge pull request #2554
d74336d5 wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstr (stoffu)
2017-10-15 17:32:30 +02:00
Jaquee
e2a276cbb5 wallet2: add ssl option to init() 2017-10-15 17:32:13 +02:00
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
stoffu
d74336d5c9
wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstr 2017-10-07 12:45:32 +09:00
Riccardo Spagni
1c044b162c
Merge pull request #2529
bd937139 wallet2: error check for generate_key_image_helper, removed redundant wallet_generate_key_image_helper (stoffu)
2017-10-06 22:53:28 +04:00
moneromooo-monero
452d4fae39
tests: fix hashchain unit tests
and relax the not-empty safety check to stay more intuitiuve
2017-10-03 00:51:53 +01:00
stoffu
bd9371395e
wallet2: error check for generate_key_image_helper, removed redundant wallet_generate_key_image_helper 2017-10-03 08:13:00 +09:00
selsta
986d03d4b2 simplewallet: allow to set threshold before warning about tx backlog 2017-10-02 21:23:33 +02:00
moneromooo-monero
37c12119ab
wallet2: fix hash chain trimming when the inner chain becomes empty
It'd prevent further syncing. Recovery of empty hash chains is
automatic, but requires a running daemon
2017-10-02 12:52:22 +01:00
moneromooo-monero
36c3465b98
wallet2: do not keep block hashes below last checkpoint
This saves a lot of space and load/save time for wallet caches
2017-09-25 21:16:40 +01:00
moneromooo-monero
5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00
moneromooo-monero
2ec928badb
wallet2: simplify tx processing a bit 2017-09-25 18:35:51 +01:00
moneromooo-monero
740e6533a5
wallet2: factor some of the tx scanning code 2017-09-25 16:11:28 +01:00
moneromooo-monero
651baaec46
wallet: add encrypted seed functionality
This uses luigi1111's CN_Add method.
See https://xmr.llcoins.net for details.
2017-09-12 13:56:01 +01:00
Riccardo Spagni
e19b68b005
Merge pull request #2362
adce8ae4 simplewallet: new "fee" command to display fee information (moneromooo-monero)
2017-09-02 11:30:07 +02:00
Riccardo Spagni
10da3051c2
Merge pull request #2309
d58700e0 WalletAPI: only allow trusted daemon when importing key images (Jaquee)
8a9bbd26 WalletAPI: copy wallet data when creating a view only wallet (Jaquee)
d27fe32e wallet2: export/import wallet data functions (Jaquee)
225a25f3 import_key_images - allow importing without being connected to daemon (Jaquee)
2017-09-02 11:28:25 +02:00
moneromooo-monero
adce8ae466
simplewallet: new "fee" command to display fee information
including expected transaction backlog at different priorities
2017-08-29 16:28:18 +01:00
moneromooo-monero
f906d87e66
wallet: new option to check/confirm txpool backlog when sending 2017-08-26 17:16:30 +01:00
Jaquee
d27fe32e4a wallet2: export/import wallet data functions 2017-08-21 08:11:12 +02:00
Jaquee
225a25f327 import_key_images - allow importing without being connected to daemon 2017-08-18 16:11:30 +02:00
Riccardo Spagni
6f60613ffb
Merge pull request #2240
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-15 20:46:31 +02:00
Riccardo Spagni
4c24eb050b
Merge pull request #2238
ad4649ac Enable verifying wallet password with having to load wallet. (m2049r)
2017-08-15 20:46:09 +02:00
Riccardo Spagni
68ccc10b29
Merge pull request #2205
c97d1bd3 wallet: return unlock_time in get_transfers (moneromooo-monero)
2017-08-15 20:44:44 +02:00
moneromooo-monero
0c57df9770
wallet2: fix temporarily missing incoming tx when being mined
When scanning the txpool without having first updated the
blockchain, the tx would be seen as neither in the txpool
nor the chain, and removed, so it'd only reappear once the
chain is refreshed, and the tx seen in a block.
2017-08-05 12:36:03 +01:00
m2049r
ad4649ac81 Enable verifying wallet password with having to load wallet. 2017-08-03 01:45:45 +02:00
moneromooo-monero
fa23a5006d
wallet2: add a is_synced function 2017-08-02 14:44:19 +01:00
moneromooo-monero
c97d1bd3d4
wallet: return unlock_time in get_transfers
also show it in simplewallet's show_transfer
2017-08-02 10:15:27 +01:00
Robby Weinberg
71f8249a08 Prevent crash if performing certain actions before wallet is initialized 2017-06-03 19:56:51 -05:00
Nano Akron
e2529347b6 Correct spelling of 'get_upper_transaction_size_limit' 2017-05-09 16:02:57 +01:00
moneromooo-monero
6df83b3efb
wallet: add sweep_below function
It sweeps all outputs below the given threshold

This is available via the existing sweep_all RPC, by setting
amount_threshold the desired amount (in atomic units)
2017-04-24 19:50:37 +01:00
Howard Chu
110b683152
Resolve #92 add ability to create wallets thru RPC
Reviewed and squashed. Open/Create is only allowed if no walletfile
was specified at startup.
2017-04-11 01:22:44 +01:00
moneromooo-monero
a50c4a4fad
wallet: option to merge destinations
With the change from the original transfer method to the new
algorithm, payments to the same destination were merged. It
seemed like a good idea, optimizing space. However, it is a
useful tool for people who want to split large outputs into
several smaller ones (ie, service providers making frequent
payments, and who do not like a large chunk of their balance
being locked for 10 blocks after each payment).

Default to off, which is a change from the previous behavior.
2017-03-25 11:44:04 +00:00
moneromooo-monero
0ad87db01f
wallet: try to save large outputs when using an unneeded second input
When a single input is enough to satisfy a transfer, the code would
previously try to add a second input, to match the "canonical" makeup
of a transaction with two inputs and two outputs. This would cause
wallets to slowly merge outputs till all the monero ends up in a
single output, which causes trouble when making two transactions
one after the other, since change is locked for 10 blocks, and an
increasing portion of the remaining balance would end up locked on
each transaction.

There are two new settings (min-output-count and min-output-value)
which can control when to stop adding such unneeded second outputs.
The idea is that small "dust" outputs will still get added, but
larger ones will not.

Enable with, eg:

set min-output-count 10
set min-output-value 30

to avoid using an unneeded second output of 30 monero or more, if
there would be less than 10 such outputs left.

This does not invalidate any other reason why such outputs would
be used (ie, when they're really needed to satisfy a transfer, or
when randomly picked in the normal course of selection). This may
be improved in the future.
2017-03-24 21:04:08 +00:00
Riccardo Spagni
7769a6e757
Merge pull request #1903
350e99ae wallet2: cache which pool txes were scanned already (moneromooo-monero)
2017-03-21 14:09:19 +02:00
moneromooo-monero
350e99ae57
wallet2: cache which pool txes were scanned already
This massively speeds up the wallet updating the pool on mainnet,
where the tx backlog is more than 500 txes.
2017-03-21 10:30:25 +00:00
moneromooo-monero
c1e9ccc794
wallet2: speed up transactions using remote nodes
Asking for a full histogram from a remote node (since it's
untrusted) is pretty slow, and spams the remote node, so
we replace it by only adding a second input if we have rct
ones, which are for all intents and purposes always mixable.
2017-03-20 08:44:28 +00:00
moneromooo-monero
3396a9f2af
Add intervening v5 fork for increased min block size
Minimum mixin 4 and enforced ringct is moved from v5 to v6.
v5 is now used for an increased minimum block size (from 60000
to 300000) to cater for larger typical/minimum transaction size.

The fee algorithm is also changed to decrease the base per kB
fee, and add a cheap tier for those transactions which we do
not care if they get delayed (or even included in a block).
2017-03-15 08:32:51 +00:00
Riccardo Spagni
5bcb25f3f8
Merge pull request #1846
4b48565c wallet: add password command (moneromooo-monero)
2017-03-06 15:14:59 +00:00
moneromooo-monero
4b48565c9e
wallet: add password command
Also tweak wallet2 password code to verify password without
saying it's a new wallet, because it's assuming things.
2017-03-05 14:53:46 +00:00
moneromooo-monero
223fe5bbe2
wallet: fix get_tranfers with multiple incoming txes with same pid 2017-03-04 21:47:53 +00:00
Riccardo Spagni
d35d626181
Merge pull request #1826
2c468dd4 allow user I/O in millinero, micronero, nanonero, piconero (moneromooo-monero)
2017-03-03 14:31:04 +02:00
moneromooo-monero
2c468dd429
allow user I/O in millinero, micronero, nanonero, piconero 2017-03-02 19:02:41 +00:00
moneromooo-monero
7a44f38a7f
Add support for the wallet to refresh pruned blocks 2017-02-27 22:29:00 +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
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
Riccardo Spagni
9296960081
Merge pull request #1686
bceaf4b7 wallet2: fix transactions not considering rct inputs (moneromooo-monero)
2017-02-11 00:22:17 +02:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
moneromooo-monero
bceaf4b788
wallet2: fix transactions not considering rct inputs
I broke this very recently in 2bf029be17
and didn't notice in time
2017-02-06 20:20:22 +00: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
Riccardo Spagni
31cf4e7362
Merge pull request #1640
f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
2017-02-04 17:18:38 +02:00
kenshi84
f97526e641 simplewallet: option to always ask password for any crytical operations 2017-02-03 09:38:12 +09: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
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
Miguel Herranz
629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01: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
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
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
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
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
Riccardo Spagni
36b84ded95
Merge pull request #1526
5eed5b05 Wallet API: functions for supporting/creating view only wallets (Jaquee)
2017-01-13 14:32: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
Jaquee
afb85a028f
Wallet API: functions for supporting/creating view only wallets 2017-01-10 22:49:11 +01:00
Jaquee
5eed5b056b
Wallet API: functions for supporting/creating view only wallets 2017-01-10 22:34:46 +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
Jaquee
79b4e1f997
Cold signing: make sure short payment id isnt encrypted twice 2017-01-08 21:04:53 +01:00
kenshi84
ada7c7da8f portable serializer: tests added 2017-01-03 09:14:48 +09:00
kenshi84
f390a0e2dc portable serializer: make signerd/unsigned tx portable, ignore archive version checking 2017-01-02 20:04:58 +09: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
6847999fb8
Merge pull request #1472
2bddb8eb Refactored password prompting for wallets (Lee Clagett)
2016-12-20 17:46:58 +02:00
Lee Clagett
2bddb8ebee Refactored password prompting for wallets 2016-12-19 20:00:43 -05: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
Jaquee
5df92877c7 GUI address book 2016-12-12 00:43:02 +01: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
f2ea2afb77
Merge pull request #1398
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04 22:28:22 +02:00
Riccardo Spagni
977dd9b76c
Merge pull request #1385
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-04 22:19:06 +02:00
Riccardo Spagni
3d533d1037
Merge pull request #1380
657a70e0 wallet: add a getter for the filename path (moneromooo-monero)
2016-12-04 22:02:40 +02:00
Pierre Boyer
f4772bae81 Fix a few minor typos 2016-12-04 14:13:54 +01:00
moneromooo-monero
82ba2108e9
wallet: add API and RPC to create/parse monero: URIs 2016-11-28 17:54:22 +00:00
moneromooo-monero
657a70e004
wallet: add a getter for the filename path 2016-11-26 14:19:57 +00:00
moneromooo-monero
d6086f5b4e
Improve daemon RPC version handling
Daemon RPC version is now composed of a major and minor number,
so that incompatible changes bump the major version, while
compatible changes can still bump the minor version without
causing clients to unnecessarily complain.
2016-11-26 12:56:44 +00:00
Riccardo Spagni
2497a2d547
Merge pull request #1369
6d76072 simplewallet: remove double confirmation when submitting signed tx (moneromooo-monero)
92dea04 wallet2: fix wrong change being recorded for cold signed txes (moneromooo-monero)
2016-11-24 13:00:32 +02:00
moneromooo-monero
92dea04929
wallet2: fix wrong change being recorded for cold signed txes 2016-11-23 20:27:22 +00:00
moneromooo-monero
7abfc5474c
wallet: fix exporting outputs and key images with txes with two pubkeys
This also needs to make sure to pick the correct one, in the case
where cold signing caused to tx keys to be included.
2016-11-19 09:36:40 +00:00