Commit Graph

522 Commits

Author SHA1 Message Date
landergate
180a848cbe wallet2: Missing underflow check on low heights
Lack of it results in `m_refresh_from_block_height` being < 0 (18446744...) on low heights, which blocks `process_new_blockchain_entry` and never process coins on heights less than blocks_per_month.
Follow-up to #2258
2017-09-27 14:17:48 +03: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
fee15ef1a9
wallet2: catch failure to parse address
CID 175297
2017-09-25 15:48:48 +01:00
moneromooo-monero
ed4a33502d
wallet2: catch failure to save keys file
CID 161848
2017-09-25 15:48:30 +01:00
Riccardo Spagni
ce37967dd2
Merge pull request #2386
a15e8583 wallet2: guard against daemon sending txes in the wrong order (moneromooo-monero)
8fe5f609 rpc: order transactions in the order they were requested (moneromooo-monero)
2017-09-25 16:40:54 +02:00
Riccardo Spagni
ec0e144e90
Merge pull request #2377
b5cbdce8 wallet2: correctly handle in/out payments for view-only wallet (stoffu)
2017-09-25 16:40:16 +02:00
Riccardo Spagni
c6306e75e7
Merge pull request #2257
651baaec wallet: add encrypted seed functionality (moneromooo-monero)
2017-09-25 16:37:17 +02:00
stoffu
b5cbdce8a6
wallet2: correctly handle in/out payments for view-only wallet 2017-09-21 07:46:19 +09:00
Riccardo Spagni
a6403846ef
Merge pull request #2441
fee3c3ed Update wallet2.cpp for misspelling (Matthew Campassi)
2017-09-20 21:41:33 +02:00
moneromooo-monero
d5a9edf27a
wallet2: fix exception on split txes 2017-09-20 10:35:15 +01:00
moneromooo-monero
5c5b0fd048
wallet2: print unused indices on a single line
Decreases log spam massively on large wallets
2017-09-20 10:34:45 +01:00
Howard Chu
510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
Matthew Campassi
fee3c3ed1e Update wallet2.cpp for misspelling
Misspelling in wallet2.cpp
2017-09-12 16:11:45 -05: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
moneromooo-monero
a15e858302
wallet2: guard against daemon sending txes in the wrong order 2017-09-11 16:48:28 +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
2560948f69
Merge pull request #2342
2e338ca5 wallet2: account for huge testnet reorgs for estimating height (moneromooo-monero)
2017-09-02 11:29:53 +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
moneromooo-monero
2e338ca574
wallet2: account for huge testnet reorgs for estimating height 2017-08-25 11:03:51 +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
9721b37bd5
Merge pull request #2258
74597bd1 wallet2: improve refresh height determination (moneromooo-monero)
2017-08-15 20:49:56 +02:00
Riccardo Spagni
085ef96768
Merge pull request #2252
9707998a wallet2: clear some missing containers in clear() (moneromooo-monero)
2017-08-15 20:48:31 +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
d64b9c1c9e
Merge pull request #2233
67ce4910 wallet2: store testnet bool in keys file (Jaquee)
2017-08-15 20:45:19 +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
61770ec2da
change mixin to ring size in user visible places 2017-08-07 21:12:27 +01:00
Riccardo Spagni
24dd5e87af
Merge pull request #2203
0c57df97 wallet2: fix temporarily missing incoming tx when being mined (moneromooo-monero)
2017-08-07 15:09:17 +02:00
moneromooo-monero
74597bd15a
wallet2: improve refresh height determination
As reported by jaquee, the calculation could underflow for very
low heights.
Additionally, we now use the target height too.
2017-08-06 16:56:51 +01:00
moneromooo-monero
9707998a08
wallet2: clear some missing containers in clear() 2017-08-05 18:09:31 +01:00
Jaquee
67ce4910bc wallet2: store testnet bool in keys file 2017-08-05 17:23:47 +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
Erik de Castro Lopo
35d68b2c6d Fix spelling errors 2017-07-05 17:53:16 +10:00
moneromooo-monero
3b599d2b7e
wallet2: get current height from the daemon on creation
Use current time to estimate current height only if the daemon
cannot be queried.
2017-06-26 08:11:14 +01:00
moneromooo-monero
d3bb72fff1
wallet2: fix infinite loop on future refresh height
If the refresh height is in the future, the current code will
loop till the actual height reaches this. Fix it by bailing out
if we receive only three hashes, which is what we set in the
call parameters.
2017-06-26 06:58:37 +01:00
moneromooo-monero
32754784db
wallet: fix refresh_from_height setting on new wallet
The previous patch was based on a wrong premise (that the
daemon height was 0 because the daemon calling code wasn't
yet initialized). In fact, current height approximation
was not setup for testnet. Fix this.
2017-06-26 06:58:31 +01:00
Robby Weinberg
71f8249a08 Prevent crash if performing certain actions before wallet is initialized 2017-06-03 19:56:51 -05:00
Riccardo Spagni
ea286d1a14
Merge pull request #2058
6bcd3b2d fix get_upper_transaction rename (schnerchi)
2017-06-01 19:42:37 +02:00
schnerchi
6bcd3b2df1 fix get_upper_transaction rename 2017-05-31 12:26:42 +02:00
Riccardo Spagni
cd13bcb4d2
Merge pull request #2036
89b2f306 tests: fix invalid key image test (moneromooo-monero)
a374a522 wallet2: check key image validity domain in import_key_images (moneromooo-monero)
2017-05-30 21:23:05 +02:00
Riccardo Spagni
d621f9e558
Merge pull request #2022
e2529347 Correct spelling of 'get_upper_transaction_size_limit' (Nano Akron)
3029d0ef Remove the 1.25x multiplier in max transaction size in just the wallet (Nano Akron)
2017-05-30 21:19:00 +02:00
Riccardo Spagni
024860b49d
Merge pull request #2020
6cb1ad1f wallet fix: ensure iterator to be valid (stoffu)
2017-05-30 21:14:24 +02:00
moneromooo-monero
a374a522df
wallet2: check key image validity domain in import_key_images 2017-05-18 09:19:48 +01:00
Nano Akron
e2529347b6 Correct spelling of 'get_upper_transaction_size_limit' 2017-05-09 16:02:57 +01:00
Nano Akron
3029d0efb3 Remove the 1.25x multiplier in max transaction size in just the wallet 2017-05-09 16:01:11 +01:00
stoffu
6cb1ad1fa2
wallet fix: ensure iterator to be valid 2017-05-09 11:54:21 +09:00
moneromooo-monero
391c918d87
wallet2: fix sweep_unmixable assuming wrong minimum mixin at v5
The bump to minimum mixin 4 was moved from v5 to v6
2017-05-07 18:27:25 +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
Riccardo Spagni
9a9fb0483f
Merge pull request #1996
a6d5bb75 wallet2: refer to triangular distribution for recent zone in comment (moneromooo-monero)
ac1aba90 wallet2: bias fake outs more towards recent outputs (moneromooo-monero)
2017-04-24 10:55:24 +02:00
Riccardo Spagni
999b0f399d
Merge pull request #1989
7f4beaa4 wallet2: fix removal of wrong txes from unconfirmed_payments (moneromooo-monero)
2017-04-24 10:50:54 +02:00
Riccardo Spagni
ae1d816768
Merge pull request #1976
a7d78dda wallet2: fix --generate-from-json in RPC mode (moneromooo-monero)
2017-04-24 10:48:56 +02:00
Riccardo Spagni
29a77c9b19
Merge pull request #1961
89d70756 wallet2: fix spurious output splitting when not merging destinations (moneromooo-monero)
2017-04-24 10:43:39 +02:00
Riccardo Spagni
0a6da8929d
Merge pull request #1959
10e137be wallet2: mention escaping/quoting --password in help string (moneromooo-monero)
2017-04-24 10:43:13 +02:00
moneromooo-monero
a6d5bb75fe
wallet2: refer to triangular distribution for recent zone in comment
It was wrongly refering to equiprobable distribution, which I think
I'd originally done, but forgot to update the comment after changing
to triangular

Reported by smooth on IRC
2017-04-22 11:22:39 +01:00
moneromooo-monero
ac1aba90f8
wallet2: bias fake outs more towards recent outputs
Two recent papers quantified the real usage bias for the
real output in a ring being the true one, and shows that
the current biasing is much too weak.

While we wait for a better solution, we increase the ratio
of recent-to-total fake outputs, as well as decrease the
time window for recent outputs, so that half the fake outs
are selected within the last 1.8 day. Value plucked from
figure 10, page 11 of An Empirical Analysis of Linkability
in the Monero Blockchain, 2017, Miller et al.

This is also arbitrary, of course, but serves as a stopgap
till a better selection algorithm is chosen.
2017-04-22 10:29:03 +01:00
moneromooo-monero
7f4beaa44a
wallet2: fix removal of wrong txes from unconfirmed_payments
unconfirmed_payments changed from having the txid as key to
the payment id, and this was not changed to match.
2017-04-17 19:37:13 +01:00
moneromooo-monero
a7d78dda77
wallet2: fix --generate-from-json in RPC mode
The daemon address was initialized too late
2017-04-14 22:12:20 +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
89d707566a
wallet2: fix spurious output splitting when not merging destinations 2017-04-08 11:13:28 +01:00
moneromooo-monero
10e137be3a
wallet2: mention escaping/quoting --password in help string 2017-04-06 21:24:55 +01:00
moneromooo-monero
0ee018b407
wallet2: do not go over the target tx size if many destinations
If using a large input and many destinations, the code would
generate as many outputs as it could using that input, even if
it would bring the resulting tx above the max tx size.
2017-04-02 11:13:15 +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
moneromooo-monero
558cfc31ca
core, wallet: faster tx pool scanning
Includes a new RPC to get tx pool hashes fast.
2017-03-23 09:25:22 +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
Riccardo Spagni
9d157b519d
Merge pull request #1899
c1e9ccc7 wallet2: speed up transactions using remote nodes (moneromooo-monero)
2017-03-21 14:08:36 +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
5b7c6ced80
wallet2: start using new fee priorities at v5, not 14 days laer
Waiting would mean the fee used is 1x base, but the base will
have suddenly dropped
2017-03-20 18:34:56 +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
3fa5975520
wallet2: call is_key_image_spent in blocks in rescan_spent
This is a potentially long lasting daemon RPC call
2017-03-18 12:47:07 +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
c7dd0b1535
Revert "wallet: fix insertion of pool transactions"
This reverts commit d47dac9a88.

Callers actually expect the key to be payment id, so this
needs a lot more changes (like storing payment ids in the
structure, and possibly also to other existing structures
which do the same thing).
2017-03-04 12:41:19 +00:00
Jaquee
1cf2f5a5c2 use txid in wallet2::process_new_transaction() 2017-03-03 15:48:32 +01: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
Riccardo Spagni
2f9ecd4fba
Merge pull request #1823
d47dac9a wallet: fix insertion of pool transactions (moneromooo-monero)
2017-03-03 14:30:24 +02:00
moneromooo-monero
2c468dd429
allow user I/O in millinero, micronero, nanonero, piconero 2017-03-02 19:02:41 +00:00
moneromooo-monero
d47dac9a88
wallet: fix insertion of pool transactions
They were inserted using payment id as key, not txid
2017-02-28 21:19:24 +00:00
moneromooo-monero
7a44f38a7f
Add support for the wallet to refresh pruned blocks 2017-02-27 22:29:00 +00:00
moneromooo-monero
b5c74e4041
wallet: invalidate node proxy cache when reconnecting 2017-02-27 17:46:55 +00:00
Riccardo Spagni
3435038a4d
add rpc timeouts to calls that might timeout 2017-02-24 19:17:22 +02:00
Jaquee
e4dbea976e
wallet2: fix wrong status on daemon shutdown/startup 2017-02-23 12:41:21 +01: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
d596722dfa
Merge pull request #1749
5a3b1e98 wallet2: fix failure to send (relatedness check in wrong case) (moneromooo-monero)
2017-02-21 11:15:40 +02:00
moneromooo-monero
5a3b1e983c
wallet2: fix failure to send (relatedness check in wrong case)
A relatedness check was meant to be done in the case of adding
an extra output if just one was enough. This was mistakenly
added to the "preferred output" case.
2017-02-19 09:31:54 +00:00
moneromooo-monero
83ec209f42
simplewallet: validate hex input size 2017-02-14 19:45:46 +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
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