Commit Graph

564 Commits

Author SHA1 Message Date
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
Jaquee
d1a75754df
Remove infinite loop in refresh code
This reverts commit fd181b03bb.
2016-12-05 13:02:45 +01:00
Riccardo Spagni
b500a64524
Merge pull request #1399
73ac3b8e wallet2: avoid possible undefined behavior on empty string (moneromooo-monero)
2016-12-04 22:28:48 +02: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
moneromooo-monero
73ac3b8e26
wallet2: avoid possible undefined behavior on empty string 2016-12-04 14:56:06 +00: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
Riccardo Spagni
3fa1b6623a
Merge pull request #1361
1d9e223 rpc: do not include output indices for pool txes (moneromooo-monero)
e227d6e rpc: bump version after RPC changes (moneromooo-monero)
2c0173c Add a get_outs (fully text based) version of get_outs.bin (moneromooo-monero)
e05907b rpc: add output indices to gettransactions (moneromooo-monero)
2016-11-24 12:57:00 +02:00
Riccardo Spagni
a26b27f66e
Merge pull request #1358
7abfc54 wallet: fix exporting outputs and key images with txes with two pubkeys (moneromooo-monero)
2016-11-24 12:55:14 +02:00
Riccardo Spagni
570acdc686
Merge pull request #1352
d01f5c7 wallet2: fix illegal memory access removing newlines from password (moneromooo-monero)
2016-11-24 12:53:14 +02:00
Riccardo Spagni
2121f3b2f0
Merge pull request #1351
e6264a2 wallet2: fix decrypting a bit too much in authenticated mode (moneromooo-monero)
2016-11-24 12:52:54 +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
2c0173c722
Add a get_outs (fully text based) version of get_outs.bin 2016-11-22 20:00:40 +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
Dion Ahmetaj
fd181b03bb Clamp refresh from height to blockchain height. 2016-11-18 13:40:55 -05:00
moneromooo-monero
d01f5c7f1f
wallet2: fix illegal memory access removing newlines from password 2016-11-17 20:43:58 +00:00
moneromooo-monero
e6264a2c35
wallet2: fix decrypting a bit too much in authenticated mode 2016-11-17 20:31:00 +00:00
Riccardo Spagni
5df6f0be80
Merge pull request #1318
4fca34d Wallet2: calculate approximate blockchain height on offline creation (Jacob Brydolf)
2016-11-17 16:37:30 +02:00
moneromooo-monero
a0131c8be3
wallet: auto sync outputs and key images in cold signing files
When passing around unsigned and signed transactions, outputs
and key images are passed along (outputs are passed along unsigned
transactions from the hot wallet to the cold wallet, key images
are passed along with signed transations from the cold wallet
to the hot wallet), to allow more user friendly syncing between
hot and cold wallets.
2016-11-16 09:22:24 +00:00
moneromooo-monero
f8066116dd
wallet2: fill key image and pubkey maps when importing outputs 2016-11-16 09:22:18 +00:00
moneromooo-monero
5fe363cd22
wallet: cast indices to string in logs to be nice to CLANG 2016-11-16 09:22:13 +00:00
moneromooo-monero
11ae1873f8
wallet2: try all tx keys when scanning a new transaction
The vast majority of transactions will have just one tx pubkey,
but a bug with cold wallet signing caused two such keys to be
there, with the second one being the real one.
2016-11-16 09:22:05 +00:00
moneromooo-monero
072d646a45
wallet2: fill in key image map when importing key images 2016-11-15 21:20:08 +00:00
Jacob Brydolf
4fca34ddb4
Wallet2: calculate approximate blockchain height on offline creation
Wallet API: add approximateBlockChainHeight()
2016-11-13 03:36:44 +01:00
Riccardo Spagni
6a2bb62827
Merge pull request #1316
358e068 Created monero-wallet-rpc, moving functionality from monero-wallet-cli (Lee Clagett)
2016-11-11 12:48:39 +02:00
Lee Clagett
358e068e87 Created monero-wallet-rpc, moving functionality from monero-wallet-cli 2016-11-10 16:39:27 -05:00
moneromooo-monero
63772e4048
wallet: fix corner case of no recent outputs available
Also clarify related logs
2016-11-09 14:01:54 +00:00
Riccardo Spagni
144a7f090a
Merge pull request #1305
c80f4d4 wallet: fix output collision detection for view wallets (moneromooo-monero)
2016-11-09 14:08:34 +02:00
Riccardo Spagni
18fdd8116e
Merge pull request #1306
8aba0d4 wallet: encrypt outputs and key images files with the view key (moneromooo-monero)
2016-11-08 22:55:56 +02:00
Riccardo Spagni
4c44d896d3
Merge pull request #1285
a970a4e refresh speedup (luigi1111)
2016-11-08 22:34:26 +02:00
Riccardo Spagni
0fa6cbef3f
Merge pull request #1276
18f66f4 wallet: use the dynamic per kB fee (moneromooo-monero)
e6deb8a rpc: add a dynamic fee estimation RPC call (moneromooo-monero)
82dbba1 core: dynamic fee algorithm from ArticMine (moneromooo-monero)
2016-11-08 22:33:13 +02:00
moneromooo-monero
8aba0d4b4c
wallet: encrypt outputs and key images files with the view key
This key is available to both cold and hot wallet.
Authenticated encryption will guard against interception and/or
modification of the file.
2016-11-07 20:01:05 +00:00
moneromooo-monero
c80f4d416d
wallet: fix output collision detection for view wallets
View wallets do not have the spend secret key, and are thus
unable to derive key images for incoming outputs. Moreover,
a previous patch set key images to zero as a means to mark
an output as having an unknown key image, so they could be
filled in when importing key images at a later time. That
later patch caused spurious collisions. We now use public
keys to detect duplicate outputs. Public keys obtained from
the blockchain are checked to be identical to the ones
derived locally, so can't be spoofed.
2016-11-07 18:59:30 +00:00
moneromooo-monero
b5d6faada3
wallet: fix bad amounts/fees again
m_amount_out was sometimes getting initialized with the sum of
an transaction's outputs, and sometimes with the sum of outputs
that were not change. This caused confusion and bugs. We now
always set it to the sum of outputs. This reverts an earlier
fix for bad amounts as this used the other semantics. The wallet
data should be converted automatically in a percentage of cases
that I'm hesitant to estimate. In any case, restoring from seed
or keys or rebuilding the cache will get it right.
2016-11-02 23:11:30 +00:00
luigi1111
a970a4e3cf
refresh speedup
Compute derivation only once per tx, instead of once per output. Approx 33% faster while using 75% as much CPU on my machine. Note old functions in cryptonote_core (lookup_acc_outs and is_out_to_acc) are still used by tests.
2016-11-01 11:24:04 -05:00
Riccardo Spagni
6f85b20d92
Merge pull request #1283
4869db7 adding static_assert to pod functions in string tools (Lee Clagett)
2016-11-01 15:13:10 +02:00
Riccardo Spagni
d53bc2eddf
Merge pull request #1281
bb560dd wallet: new import_outputs/export_outputs commands (moneromooo-monero)
2016-11-01 15:12:03 +02:00
Lee Clagett
4869db702a adding static_assert to pod functions in string tools 2016-10-31 13:22:21 -04:00
moneromooo-monero
18f66f44ef
wallet: use the dynamic per kB fee 2016-10-31 08:38:06 +00:00
moneromooo-monero
bb560dd814
wallet: new import_outputs/export_outputs commands
The intended use is to export outputs from a hot wallet, which
can scan incoming transfers from the network, and import them
in the cold wallet, which can't. The cold wallet can then compute
key images for those outputs, which can then be exported with
export_key_images, etc.
2016-10-30 19:37:09 +00:00
moneromooo-monero
7e6d3cf441
wallet: set incoming outputs' key image to 0 on view wallets
This allows rescan_spent to know the daemon response to those
is not valid.
2016-10-30 12:14:33 +00:00
moneromooo-monero
1f9e6a46d8
wallet: print tx overview on submit_transfer too
This is on the potentially compromised wallet, but still guards
against stupid mistakes.
2016-10-30 10:49:22 +00:00
moneromooo-monero
069d688cf7
simplewallet: log transactions to submit in submit_transfer
Not as trustworthy as this is in the view wallet, the one
that's considered compromised.
2016-10-26 13:17:29 +01:00
moneromooo-monero
31abac4daf
wallet: fix pre-rct cold wallet signing not splitting change
Re-creating the transaction on the cold wallet was not splitting
the change, causing the transaction to be rejected by the network.
This worked on testnet since amounts do not have to be split.

Also add selected_transfers, which can now be saved since they're
size_t rather than iterators. This allows the view wallet to
properly set the sent outputs as spent and update balance.

Bump transfer file version numbers to match.
2016-10-25 21:44:31 +01:00
Riccardo Spagni
4e98d2958c
Merge pull request #1246
372f338 wallet: sanity check on selected transfer indices in signed ptx (moneromooo-monero)
2016-10-23 19:09:18 +02:00
Riccardo Spagni
09f62ed33e
Merge pull request #1225
04da979 Always confirm transfers defaults to ON/YES (NanoAkron)
2016-10-22 22:16:39 +02:00
Riccardo Spagni
f800390ccc
Merge pull request #1224
8231997 simplewallet: fix sweep_all misreporting sweeped amount for rct outputs (moneromooo-monero)
985f61a wallet: force 0 mixin transactions to use pre-rct txes (moneromooo-monero)
2016-10-22 22:15:50 +02:00
Riccardo Spagni
7c5431624e
Merge pull request #1223
0950be9 wallet: speed up output selection, and fix bug with relatedness calculation (moneromooo-monero)
0eba133 wallet: fix mixup between mixin 2 and 4 before/after v5 (moneromooo-monero)
2016-10-22 22:15:16 +02:00
Riccardo Spagni
9feb358e46
Merge pull request #1220
e76dcdd wallet: improve error messages when not enough money for transfer (moneromooo-monero)
2016-10-22 22:12:17 +02:00
moneromooo-monero
372f338682
wallet: sanity check on selected transfer indices in signed ptx 2016-10-22 18:07:26 +01:00
NanoAkron
04da979f46
Always confirm transfers defaults to ON/YES 2016-10-15 20:38:07 +01:00
moneromooo-monero
8231997b66
simplewallet: fix sweep_all misreporting sweeped amount for rct outputs
RingCT outputs will be 0 in the vin, so we need to get the actual
amount from elsewhere.
2016-10-15 19:18:52 +01:00
moneromooo-monero
985f61a4ec
wallet: force 0 mixin transactions to use pre-rct txes
rct transactions does not support 0 mixin, and those are
now typically dust sweep transactions, for which a lower
fee is a must.
2016-10-15 18:42:04 +01:00
moneromooo-monero
88faec75fe
wallet: select part of the fake outs from recent outputs
25% of the outputs are selected from the last 5 days (if possible),
in order to avoid the common case of sending recently received
outputs again. 25% and 5 days are subject to review later, since
it's just a wallet level change.
2016-10-15 18:17:16 +01:00
moneromooo-monero
0950be9e34
wallet: speed up output selection, and fix bug with relatedness calculation 2016-10-15 16:32:08 +01:00
moneromooo-monero
0eba1335be
wallet: fix mixup between mixin 2 and 4 before/after v5 2016-10-15 16:07:18 +01:00
moneromooo-monero
e76dcdd810
wallet: improve error messages when not enough money for transfer 2016-10-15 14:31:40 +01:00
Riccardo Spagni
0589209eb4 Merge pull request #1191
9f31e2d wallet: do not announce pool txes as money spent/received (yet) (moneromooo-monero)
2016-10-09 14:29:16 +02:00
moneromooo-monero
9f31e2d8c0
wallet: do not announce pool txes as money spent/received (yet) 2016-10-07 19:52:05 +01:00
moneromooo-monero
4e6d70808d
wallet: better implementation of sweep_unmixable
This was still using the old transaction creation algorithm,
coupled with a deterministic output selection scheme, which
made it ill suited to the job, since it'd loop indefinitely
in case the fee increased between the test tx and adding the
fee.
2016-10-04 17:44:56 +01:00
Riccardo Spagni
2723cd12e1
Merge pull request #1173
65ea836 wallet2_api: added Wallet::daemonBlockChainTargetHeight() libwallet_api: Wallet::blockChainTargetHeight (Jacob Brydolf)
2016-10-04 12:15:02 +02:00
Riccardo Spagni
bfdac4b5ff
Merge pull request #1160
80b4da3 wallet: wallet option to confirm transfers with no payment id (moneromooo-monero)
2016-10-04 12:11:32 +02:00
Riccardo Spagni
60e527f1c2
Merge pull request #1125
7b09e9f wallet: update min mixin for sweep_unmixable on v4 (moneromooo-monero)
2016-10-04 12:06:04 +02:00
Riccardo Spagni
2ef81914b5
Merge pull request #1140
bba6af9 wallet: cold wallet transaction signing (moneromooo-monero)
9872dcb wallet: fix log confusion between bytes and kilobytes (moneromooo-monero)
d9b0bf9 cryptonote_core: make extra field removal more generic (moneromooo-monero)
98f19d4 serialization: add support for serializing std::pair and std::list (moneromooo-monero)
2016-10-04 11:27:38 +02:00
Jacob Brydolf
65ea8364f8 wallet2_api: added Wallet::daemonBlockChainTargetHeight()
libwallet_api: Wallet::blockChainTargetHeight

Signed-off-by: Jacob Brydolf <jacob@brydolf.net>
2016-10-03 20:47:41 +02:00
moneromooo-monero
80b4da3330
wallet: wallet option to confirm transfers with no payment id
set confirm-missing-payment-id 0|1

Defaults to true.
2016-10-01 17:03:53 +01:00
Ilya Kitaev
2dacb193d0 wallet2: wallet2::get_daemon_blockchain_height() clean error message on
success
2016-09-28 00:39:06 +03:00
moneromooo-monero
bba6af9064
wallet: cold wallet transaction signing
This change adds the ability to create a new unsigned transaction
from a watch only wallet, and save it to a file. This file can
then be moved to another computer/VM where a cold wallet may load
it, sign it, and save it. That cold wallet does not need to have
a blockchain nor daemon. The signed transaction file can then be
moved back to the watch only wallet, which can load it and send
it to the daemon.

Two new simplewallet commands to use it:
sign_transfer (on the cold wallet)
submit_transfer (on the watch only wallet)

The transfer command used on a watch only wallet now writes an
unsigned transaction set in a file called 'unsigned_monero_tx'
instead of submitting the tx to the daemon as a normal wallet does.
The signed tx file is called 'signed_monero_tx'.
2016-09-27 07:46:39 +01:00
moneromooo-monero
9872dcbbe3
wallet: fix log confusion between bytes and kilobytes 2016-09-26 23:12:43 +01:00
Ilya Kitaev
cda4cb969a formatting: 2-spaces indentation 2016-09-26 23:46:07 +03:00
Ilya Kitaev
545a48f098 formatting: 2-spaces indentation 2016-09-26 23:29:53 +03:00
Ilya Kitaev
7b4a85b309 wallet2_api: added Wallet::daemonBlockChainHeight() 2016-09-26 23:19:25 +03:00
moneromooo-monero
7b09e9ff77
wallet: update min mixin for sweep_unmixable on v4 2016-09-24 14:48:34 +01:00
Riccardo Spagni
6b744c349f
Merge pull request #1098
1dd5b0b wallet: keep change dest separate from other dests (moneromooo-monero)
2016-09-18 17:42:32 +02:00
moneromooo-monero
1dd5b0b7df
wallet: keep change dest separate from other dests
This fixes misreporting of amount/fee in rct txes, as the rct
tx construction code was lumping all dests (whether change or
not) in the same dests vector, while the pre-rct code was
keeping it separate.
2016-09-18 12:04:23 +01:00
moneromooo-monero
5f5d7279b6
wallet: fix empty tx in corner case sending nothing 2016-09-18 10:44:32 +01:00
moneromooo-monero
9c7b0cb28e
wallet: change priority/fee to ArticMine's recommendation
We keep 1, 2, 3 multipliers till the fee decrase from 0.01/kB
to 0.002/kB, where we start using 1, 20, 166 multipliers.
This ensures the higher multiplier will compensate for the
block reward penalty when pushing past 100% of the past median.

The fee-multiplier wallet setting is now rename to priority,
since it keeps its [0..3] range, but maps to different multiplier
values.
2016-09-16 11:50:52 +01:00
Riccardo Spagni
7c899ec33a
Merge pull request #1074
cd01bae Decrease minimum fee from 0.01/kB to 0.002/kB (moneromooo-monero)
2016-09-15 15:23:49 +02:00
moneromooo-monero
cd01bae735
Decrease minimum fee from 0.01/kB to 0.002/kB
The wallet will start using that fee about two weeks after hard
fork 3, when most people will likely have updated their daemons.
2016-09-15 09:28:33 +01:00
moneromooo-monero
70b78bb2c8
wallet: fix misdetection of duplicates 2016-09-14 20:23:28 +01:00
luigi1111
34bb78956f
Re-add s to rangesigs
Whoops.
2016-09-01 13:53:53 -05:00
luigi1111
dbf017a5f7
Fix some rct tx size calculations
Some variance is still expected
2016-09-01 13:14:31 -05:00
Riccardo Spagni
27c8713f56
Merge pull request #1027
85dc0ce wallet: sanity check on histogram response (moneromooo-monero)
2016-09-01 11:31:58 +02:00
moneromooo-monero
85dc0ce3a5
wallet: sanity check on histogram response 2016-09-01 09:04:45 +01:00
moneromooo-monero
3112e24aa7
wallet: interpret 0 fee multiplier as default for sweep_all too 2016-08-30 13:19:20 +01:00
moneromooo-monero
73b9b4ba34
wallet: fix not finding enough rct fake outputs
If picking coinbase outputs, those are locked for a longer time
than other outputs, so we ask for more of those
2016-08-29 20:51:21 +01:00
moneromooo-monero
fbd7c359ee
wallet: fix some "may be used uninitialized" warnings
The compiler can't always work out the _found booleans are
set iff the value is initialized.
2016-08-28 21:30:44 +01:00
moneromooo-monero
4a41dd4068
wallet: do not generate 0 change 2016-08-28 21:30:42 +01:00
moneromooo-monero
45349b6f7c
wallet: do not ask for duplicate histograms 2016-08-28 21:30:36 +01:00
moneromooo-monero
b951bc8780
wallet: transfer_selected_rct now also selects fake outs 2016-08-28 21:30:34 +01:00
moneromooo-monero
c3b3260ae5
New "Halfway RingCT" outputs for coinbase transactions
When RingCT is enabled, outputs from coinbase transactions
are created as a single output, and stored as RingCT output,
with a fake mask. Their amount is not hidden on the blockchain
itself, but they are then able to be used as fake inputs in
a RingCT ring. Since the output amounts are hidden, their
"dustiness" is not an obstacle anymore to mixing, and this
makes the coinbase transactions a lot smaller, as well as
helping the TXO set to grow more slowly.

Also add a new "Null" type of rct signature, which decreases
the size required when no signatures are to be stored, as
in a coinbase tx.
2016-08-28 21:30:26 +01:00
moneromooo-monero
d4b62a1e29
rct amount key modified as per luigi1111's recommendations
This allows the key to be not the same for two outputs sent to
the same address (eg, if you pay yourself, and also get change
back). Also remove the key amounts lists and return parameters
since we don't actually generate random ones, so we don't need
to save them as we can recalculate them when needed if we have
the correct keys.
2016-08-28 21:30:19 +01:00
moneromooo-monero
3ab2ab3e76
rct: change the simple flag to a type
for future expansion
2016-08-28 21:30:14 +01:00
moneromooo-monero
a47ceee83b
wallet: do not store signatures in the wallet cache
Saves some substantial space.
Also avoid calculating tx hashes we don't need.
2016-08-28 21:30:10 +01:00
moneromooo-monero
2c9d9519f1
wallet2: factor m_spent changes
Makes it easier to track what is going on.
2016-08-28 21:30:04 +01:00
moneromooo-monero
230fca2d56
wallet: use the prefered rct case only when enough rct outs exist 2016-08-28 21:29:55 +01:00
moneromooo-monero
c27194a444
wallet: do not try to use rct txes a few blocks before the fork 2016-08-28 21:29:53 +01:00
moneromooo-monero
37bdf6ebe3
change fork settings to allow pre-rct txes for one more fork cycle 2016-08-28 21:29:50 +01:00
moneromooo-monero
9b70856ccb
rct: make the amount key derivable by a third party with the tx key
Scheme design from luigi1114.
2016-08-28 21:29:46 +01:00
moneromooo-monero
cf33e1a52a
rct: do not serialize public keys in outPk
They can be reconstructed from vout
2016-08-28 21:29:43 +01:00
moneromooo-monero
3cb2edec66
rpc: send global indices along with blocks/transacions on refresh
This plugs a privacy leak, where the wallet tells the daemon
which transactions contain outputs for the wallet by asking
for additional information for that particular transaction.

As a nice bonus, this actually makes refresh slightly faster.
2016-08-28 21:29:38 +01:00
moneromooo-monero
84c82cd775
wallet: better tx input selection
We try to avoid related inputs, when possible
2016-08-28 21:29:32 +01:00
moneromooo-monero
07d353dfc6
wallet: handle 0 change properly
With RCT, we allow 0 size outputs, to try and encourage txes
with two inputs and two outputs. Consolidation would then
have two non zero inputs, one zero output, and one larger
output.
2016-08-28 21:29:27 +01:00
moneromooo-monero
e81a2b2cfa
port get_tx_key/check_tx_key to rct 2016-08-28 21:29:24 +01:00
moneromooo-monero
a4d4d6194b
integrate simple rct api 2016-08-28 21:29:20 +01:00
moneromooo-monero
37c895e5e3
wallet: rct specific output selection
Before the normal selection, we attempt to find either one or two
suitable outputs to use as inputs to the rct tx. The intent is that
most rct txes will have one or two inputs, and we want all to look
the same if possible.
When two outputs are needed, we try to find a pair which are not
related (ie, by being from the same or similar block height).
2016-08-28 21:29:11 +01:00
moneromooo-monero
1181c57967
wallet: make sweep_all work with rct txes too 2016-08-28 21:29:09 +01:00
moneromooo-monero
1017a75460
wallet: factor transfer_rct code with transfer code
The "transfer" simplewallet command is renamed to "transfer_original".
"transfer_new" is renamed "transfer", "transfer_rct" is removed,
and the new "transfer" now selects rct or non rct transactions
based on the current block height.
2016-08-28 21:29:05 +01:00
moneromooo-monero
20e50ec7f7
ringct: do not serialize what can be reconstructed
The mixRing (output keys and commitments) and II fields (key images)
can be reconstructed from vin data.
This saves some modest amount of space in the tx.
2016-08-28 21:28:55 +01:00
moneromooo-monero
acbe06d8e9
wallet: update spent status when an accepted tx disappears 2016-08-28 21:28:49 +01:00
moneromooo-monero
089df4af83
wallet: reset output spent status on blockchain reorg
If the blockchain gets reorganized, all outputs spent in the part
of the blockchain that's blown away need to be reset to unspent
(they may end up spent again on the blocks that replace the blocks
that are removed, however).
2016-08-28 21:28:47 +01:00
moneromooo-monero
dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
Riccardo Spagni
79cdedb90c
Merge pull request #970
25f529a wallet: store key images after importing them (moneromooo-monero)
2016-08-22 22:55:24 +02:00
moneromooo-monero
25f529aa67
wallet: store key images after importing them
It avoids rescan_spent resetting spent status, for example.
2016-08-17 08:37:56 +01:00
moneromooo-monero
9cca53ac29
wallet: fix build on Mac and Windows (missing include)
Reported by RaskaRuby, tested by iDunk5400.
2016-08-17 08:08:49 +01:00
Riccardo Spagni
0faf572db8
Merge pull request #948
11dc091 Fake outs set is now decided by the wallet (moneromooo-monero)
1593553 new unlocked parameter to output_histogram (moneromooo-monero)
2016-08-11 22:43:14 +02:00
moneromooo-monero
11dc091464
Fake outs set is now decided by the wallet
This plugs a privacy leak from the wallet to the daemon,
as the daemon could previously see what input is included
as a transaction input, which the daemon hadn't previously
supplied. Now, the wallet requests a particular set of
outputs, including the real one.

This can result in transactions that can't be accepted if
the wallet happens to select too many outputs with non standard
unlock times. The daemon could know this and select another
output, but the wallet is blind to it. It's currently very
unlikely since I don't think anything uses non default
unlock times. The wallet requests more outputs than necessary
so it can use spares if any of the returns outputs are still
locked. If there are not enough spares to reach the desired
mixin, the transaction will fail.
2016-08-11 14:35:27 +01:00
moneromooo-monero
663fc32809
wallet2: if importing key images fails, print failure index 2016-08-04 08:19:29 +01:00
moneromooo-monero
1593553e03
new unlocked parameter to output_histogram
This constrains the number of instances of any amount
to the unlocked ones (as defined by the default unlock time
setting: outputs with non default unlock time are not
considered, so may be counted as unlocked even if they are
not actually unlocked).
2016-08-01 22:16:00 +01:00
moneromooo-monero
ebf97d76f0
wallet: new {ex,im}port_key_images commands and RPC calls
They are used to export a signed set of key images from a wallet
with a private spend key, so an auditor with the matching view key
may see which of those are spent, and which are not.
2016-07-24 09:23:30 +01:00
moneromooo-monero
b89b96394a
wallet: add unconfirmed incoming txes from the txpool
Shown in show_transfers simplewallet command, and get_transfers
RPC command, if req.pool is true.
2016-07-20 19:14:44 +01:00
Riccardo Spagni
fc3e135b83
Merge pull request #902
014f3a0 Add a daemon RPC version, and make simplewallet check it (moneromooo-monero)
2016-07-20 13:55:59 +02:00
moneromooo-monero
89d9f382a0
wallet: add command and RPC to sign/verify data
Signing is done using the spend key, since the view key may
be shared. This could be extended later, to let the user choose
which key (even a per tx key).
simplewallet's sign/verify API uses a file. The RPC uses a
string (simplewallet can't easily do strings since commands
receive a tokenized set of arguments).
2016-07-19 20:39:03 +01:00
moneromooo-monero
014f3a0d39
Add a daemon RPC version, and make simplewallet check it
If the version is different, simplewallet will refuse to use that
daemon, unless --allow-mismatched-daemon-version is used.
2016-07-10 16:49:40 +01:00
Riccardo Spagni
3923cbddaf
Merge pull request #878
945c272 wallet: add a fee multiplier (moneromooo-monero)
2016-07-06 18:14:34 +02:00
Ilya Kitaev
ab61ba0c9b Merge branch 'master' of https://github.com/mbg033/bitmonero 2016-06-23 16:23:09 +03:00
Ilya Kitaev
8df820b301 - testnet option added to api; 2016-06-23 15:49:07 +03:00
Ilya Kitaev
94eaeb50b2 wallet2::store() implemented within wallet2::store_to 2016-06-23 15:40:48 +03:00
moneromooo-monero
945c272f6c
wallet: add a fee multiplier
Fee can now be multiplied by 2 or 3, if users want to give
priority to their transactions. There are only three levels
to avoid too much fingerprinting. Default is 1 (minimum fee).
The default multiplier can be set by "set fee-multiplier X".
2016-06-22 22:21:30 +01:00
Ilya Kitaev
bc4584c1ff Merge remote-tracking branch 'upstream/master' 2016-05-27 11:33:08 +03:00
Riccardo Spagni
ae205020f6
Merge pull request #827
f1e70d1 Only log 1/N skipped blocks (Howard Chu)
cebb97c Move refresh height to keys file from cache file (Howard Chu)
590c439 Make fast_refresh interruptible (Howard Chu)
687855d Set refresh height earlier (Howard Chu)
2fb00c0 Fix 19fe8ae3ef (Howard Chu)
2016-05-17 19:04:41 +02:00
Ilya Kitaev
2d799097ca Merge remote-tracking branch 'upstream/master' 2016-05-12 15:14:30 +03:00
Howard Chu
f1e70d15ca Only log 1/N skipped blocks 2016-04-29 16:50:51 +01:00
Howard Chu
cebb97c913 Move refresh height to keys file from cache file 2016-04-29 15:33:28 +01:00
Howard Chu
590c43988c Make fast_refresh interruptible 2016-04-29 15:33:28 +01:00
moneromooo-monero
513a658c87
add a --max-concurrency flag
It sets the max number of threads to use for a parallel job.
This is different that the number of total threads, since monero
binaries typically start a lot of them.
2016-04-28 20:33:59 +01:00
moneromooo-monero
7baed9bd89
wallet: allow attaching notes to txids 2016-04-26 19:07:33 +01:00
moneromooo-monero
ce6f8a6324
wallet: add GMT timestamps to transfers/payments 2016-04-26 19:07:25 +01:00
Riccardo Spagni
714dcc2866
Merge pull request #815
b0850a9 wallet: add a new sweep_all command and RPC command (moneromooo-monero)
2016-04-26 18:08:09 +02:00
Riccardo Spagni
7098ad6804
Merge pull request #814
68cbe15 	modified:   src/wallet/wallet2.cpp 	modified:   src/wallet/wallet2.h (awfulcrawler)
4b325bd 	modified:   src/simplewallet/simplewallet.cpp 	modified:   src/wallet/wallet2.cpp 	modified:   src/wallet/wallet2.h (awfulcrawler)
2016-04-26 18:04:00 +02:00
Ilya Kitaev
dce5374660 Merge remote-tracking branch 'upstream/master' into develop 2016-04-26 11:08:40 +03:00
moneromooo-monero
b0850a9bea
wallet: add a new sweep_all command and RPC command
This sends all outputs in a wallet to a given address, alleviating
the difficulty people have had trying to send all monero but
being left with some small amount left.
2016-04-19 21:20:27 +01:00
awfulcrawler
68cbe1579e modified: src/wallet/wallet2.cpp
modified:   src/wallet/wallet2.h

Removed working comments
2016-04-18 20:20:31 +12:00
awfulcrawler
4b325bdb66 modified: src/simplewallet/simplewallet.cpp
modified:   src/wallet/wallet2.cpp
	modified:   src/wallet/wallet2.h

Update to fix unconfirmed balance and give a slightly more verbose and informative confirmation message for transfers
2016-04-18 14:57:47 +12:00
Howard Chu
b7140daea2 Add GET_HASHES_FAST rpc, use it in wallet
When m_refresh_from_block_height has been set, only hashes will be
retrieved up to that height, instead of full blocks. The same will
be done for "refresh <height>" when the specified height is beyond
the current local blockchain.
2016-04-17 15:25:46 +01:00
Riccardo Spagni
8f78f1407e
Merge pull request #784
087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
2016-04-14 16:25:53 +09:00
Riccardo Spagni
6bfb8799c3
Merge pull request #783
48d0747 wallet: better output selection for transfer/transfer_new (moneromooo-monero)
2016-04-14 16:25:38 +09:00
moneromooo-monero
5c9dd23b1c
rpc: add a do_not_relay boolean to tx submission
Just to make it easier
2016-04-05 20:15:54 +01:00
moneromooo-monero
087373eccf
Fix potential race with parallel processing of txes/signatures/blocks 2016-04-02 14:20:51 +01:00
moneromooo-monero
48d0747d00
wallet: better output selection for transfer/transfer_new
This now requests the set of outputs that can be mixed first,
to avoid trying non dust but unmixable outputs, which we know
will fail.
2016-04-02 14:17:02 +01:00
Riccardo Spagni
4ac6bdbb3f
Merge pull request #769
b4eada9 wallet: make load_keys check types when loading JSON (moneromooo-monero)
3e55725 wallet: make the JSON reading type safe (moneromooo-monero)
f8d05f3 common: new json_util.h (moneromooo-monero)
2016-04-02 12:02:49 +09:00
Riccardo Spagni
a38ad63f8f
Merge pull request #767
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-04-02 12:02:07 +09:00
Ilya Kitaev
df6026182a Merge remote-tracking branch 'upstream/master' 2016-03-31 12:01:19 +03:00
moneromooo-monero
878ab5d896
wallet: fix --generate-from-keys saving as watch only 2016-03-28 16:46:37 +01:00
moneromooo-monero
b4eada907c
wallet: make load_keys check types when loading JSON 2016-03-27 23:39:34 +01:00
moneromooo-monero
24b3e9007a
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying
the reason to the user.

Do just that in simplewallet, which should help a lot in
determining why users fail to send.

Also make it so a tx which is accepted but not relayed is
seen as a success rather than a failure.
2016-03-27 12:37:18 +01:00
moneromooo-monero
25672d3f10
wallet: pass std::function by const ref, not value
Because we can.
2016-03-26 23:32:45 +00:00
moneromooo-monero
0be6e08dd0
wallet: do not leak owned amounts to the daemon unless --trusted-daemon
This will be slower, though more private.

New trusted_daemon parameter to the matching RPC call, false by default.
2016-03-26 23:29:29 +00:00
moneromooo-monero
12146daeed
wallet: change sweep_dust to sweep_unmixable
With the change in mixin rules for v2, the "annoying" outputs are
slightly changed. There is high correlation between dust and
unmixable, but no equivalence.
2016-03-26 21:15:47 +00:00
moneromooo-monero
f9a2fd2ff5
wallet: handle rare case where fee adjustment can bump to the next kB
It resulted in a tx being sent with too low a fee, and thus rejected.
2016-03-26 11:51:58 +00:00
moneromooo-monero
f26651ab8a
wallet: factor fee calculation 2016-03-26 11:44:43 +00:00
Ilya Kitaev
8790904cf9 - testnet option added to api; 2016-03-25 17:06:30 +03:00
moneromooo-monero
a2e378b91b
wallet: add a --generate-from-json flag
It takes a filename containing JSON data to generate a wallet.
The following fields are valid:

  version: integer, should be 1
  filename: string, path/filename for the newly created wallet
  scan_from_height: 64 bit unsigned integer, optional
  password: string, optional
  viewkey: string, hex representation
  spendkey: string, hex representation
  seed: string, optional, list of words separated by spaces

Either seed or private keys should be given. If using private
keys, the spend key may be omitted (the wallet will not be
able to spend, but will see incoming transactions).

If scan_from_height is given, blocks below this height will not
be checked for transactions as an optimization.
2016-03-25 00:56:11 +00:00
Ilya Kitaev
2cce32995b wallet2::store() implemented within wallet2::store_to 2016-03-21 16:17:03 +03:00
moneromooo-monero
f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero
fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
Ilya Kitaev
62606f11f5 Wallet::store_to(path, password) implemented; 2016-03-16 14:29:06 +03:00
Ilya Kitaev
5a4f099540 Wallet::setPassword() method for wallet2_api 2016-03-16 14:29:06 +03:00
Howard Chu
b937a2c915 Use boost::thread instead of std::thread
and all other associated IPC
2016-03-11 15:09:50 +00:00
moneromooo-monero
4513b4cd2b
simplewallet: add a new --restore-from-keys option
It is similar in use to --restore-from-view-key, but also expects
a spend private key.

Requested by luigi1112, and useful to restore MyMonero wallets.
2016-02-22 22:10:55 +00:00
moneromooo-monero
8f09b71b9b
wallet: clear missing data on rescan_bc 2016-02-15 20:51:30 +00:00
moneromooo-monero
c7b96b91ed
wallet: check a key image isn't already present when adding one
If it is, it points to reuse of a tx key, which isn't meant to happen.
If it does, a key image collision means that only one of those
outputs is spendable, so the wallet selects the larger amount,
unless that output was spent already.

This causes a discrepancy betewen reported received inputs and
payment total.

Since tx keys are 256 bits, this should never happen except if
done on purpose, or if a sender uses a bad PRNG.
2016-02-05 16:24:23 +00:00
Riccardo Spagni
616df496e9 Revert "Merge pull request #632"
This reverts commit 58f890652e, reversing
changes made to 39d73d2a27.
2016-01-31 15:49:11 +02:00
Riccardo Spagni
569316aea3
Merge pull request #634
7fc6fa3 wallet: forbid dust altogether in output selection where appropriate (moneromooo-monero)
5e1a739 blockchain: log number of outputs available for a new tx (moneromooo-monero)
2016-01-31 15:21:45 +02:00
Riccardo Spagni
8d976a0683
Merge pull request #633
80882ac wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31 15:21:13 +02:00
Riccardo Spagni
58f890652e
Merge pull request #632
2cf8b32 wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31 15:20:47 +02:00
moneromooo-monero
7fc6fa3fa2
wallet: forbid dust altogether in output selection where appropriate 2016-01-31 11:03:09 +00:00
moneromooo-monero
80882ac6dd
wallet: guard against exception in process_blocks
If an exception occurs, the thread needs to be joined, or it
will be deleted while still live, and terminate the process.
2016-01-30 23:52:43 +00:00
moneromooo-monero
2cf8b32229
wallet: guard against exception in process_blocks
If an exception occurs, the thread needs to be joined, or it
will be deleted while still live, and terminate the process.
2016-01-30 23:34:23 +00:00
moneromooo-monero
b11539fda7
wallet: detect and handle failed outgoing transfers
When a transaction is not found in the pool anymore, it is marked
as failed, and displayed as such in show_transfers.
2016-01-29 19:44:48 +00:00
moneromooo-monero
3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
moneromooo-monero
15d9ac8abd
wallet2: update spent comparison now that we have two spent states 2016-01-24 19:55:18 +00:00
moneromooo-monero
67bbb56a6c
wallet2: decide at runtime which upper tx size to use
The value will be different depending on whether we've reached
the first hard fork, which allows a larger size, or not.

This fixes transactions being rejected by the daemon on mainnet
where the first hard fork is not yet active.
2016-01-10 11:56:13 +00:00
moneromooo-monero
a44d94d390
rpc: is_key_image_spent now checks the tx pool too 2016-01-05 22:16:24 +00:00
Riccardo Spagni
ac7d27d4f9
Merge pull request #584
5c67c48 wallet: don't forget to close the file after storing cache (moneromooo-monero)
2015-12-31 12:43:15 +02:00
moneromooo-monero
5c67c486e8
wallet: don't forget to close the file after storing cache
Also add some flags to open, as epee's save_string_to_file does,
to truncate file, etc.
2015-12-31 10:34:17 +00:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero
bc8a52efd8
wallet: add a rescan_bc command and rescan_blockchain RPC
Blockchain hashes and key images are flushed, and blocks are
pulled anew from the daemon.
The console command is shortened to match bc_height.
This should make it a lot easier on users who are currently
told to remove this particular cache file but keep the keys
one, etc, etc.
2015-12-30 15:06:03 +00:00
moneromooo-monero
92ef6b54fe
wallet: protect against exceptions in the block pull thread
This can happen when the daemon exits, which would also cause
the wallet to crash via unhandled exception
2015-12-30 12:43:15 +00:00
Riccardo Spagni
32a26332f8
no longer need to pass the size to rapidjson 2015-12-30 12:25:29 +02:00
moneromooo-monero
61befc2293
wallet: store cache to file without unnecessary memory buffer 2015-12-29 15:46:37 +00:00
Riccardo Spagni
47ca455ea8
fixed missing parenthesis 2015-12-24 18:11:11 +02:00
Lex Kalinkin
a004130a04 fix for 'failed to generate new wallet: failed to save file' error during wallet generation 2015-12-24 16:12:42 +02:00
moneromooo-monero
8ea7af1ba3
Allow the wallet to access hard fork information
And make it change behavior slightly when close/after first hard fork
2015-12-19 14:52:30 +00:00
Riccardo Spagni
5d33b43d8d
Merge pull request #544
01e92eb replace std::auto_ptr with std::unique_ptr (moneromooo-monero)
2015-12-18 12:18:00 +02:00
moneromooo-monero
01e92ebdb0
replace std::auto_ptr with std::unique_ptr
The former is obsolete
2015-12-17 22:47:13 +00:00
moneromooo-monero
9b4f8b4b7e
wallet: save to a temporary file, then rename
This should avoid most of wallet cache corruption cases
2015-12-17 22:32:54 +00:00
moneromooo-monero
c6cfe0f26d
wallet: make the wallet refresh type a wallet setting
instead of a command line setting. It makes sense that is is
a long lived setting.
2015-12-05 21:44:25 +00:00
moneromooo-monero
fef2493617
wallet: default auto-refresh to true for old wallets 2015-12-05 21:10:12 +00:00
moneromooo-monero
41029d6d74
wallet2: default auto-refresh to true for preexisting wallets 2015-11-30 11:08:15 +00:00
moneromooo-monero
d68a63e404
wallet: cancellable refresh
^C while in manual refresh will cancel the refresh, since that's
often an annoying thing to have to wait for. Also, a manual refresh
command will interrupt any running background refresh and take
over, rather than wait for the background refresh to be done, and
look to be hanging.
2015-11-29 23:24:56 +00:00
Riccardo Spagni
5275db0786
Merge pull request #509
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
2015-11-30 00:23:58 +02:00
Riccardo Spagni
bc1bc4adb2
Merge pull request #507
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
2015-11-30 00:19:47 +02:00
moneromooo-monero
3030e3ecff
wallet2: remove confirmed transactions from detached blocks 2015-11-29 12:07:54 +00:00
moneromooo-monero
9ee48e9071
wallet2: speed up wallet refresh for large miners 2015-11-28 21:15:07 +00:00
moneromooo-monero
62e49a5f02
wallet: optional automatic refresh from the daemon
The daemon will be polled every 90 seconds for new blocks.
It is enabled by default, and can be turned on/off with
set auto-refresh 1 and set auto-refresh 0 in the wallet.
2015-11-28 12:41:06 +00:00
moneromooo-monero
490590306e
wallet2: parallelize pulling blocks and processing them on refresh
This needed locking the use of m_http_client, to avoid collisions
in I/O.
2015-11-27 17:25:15 +00:00
moneromooo-monero
d0eaf1d4e1
wallet2: maintain the short chain manually when refreshing 2015-11-27 00:35:41 +00:00
moneromooo-monero
a4e9506069
wallet2: split pull blocks between pulling and processing 2015-11-27 00:03:43 +00:00
moneromooo-monero
9b945f5211
wallet: make the refresh optimizations selectable via command line
Take the opportunity to add a no-coinbase case too, for even faster
sync when an address is known to never have mined to.
2015-11-22 19:03:10 +00:00
moneromooo-monero
d2c031332e
wallet: speedup refresh from daemon
Assume the whole of a coinbase goes to the same address (so that
if the first output isn't for us, none of it is), and only look
for payment id when we received something in the transaction.
2015-11-22 18:07:19 +00:00
moneromooo-monero
ea707c779c
wallet2: minor cleanup
- use std::vector::std::deque to not leak when exceptions happen
- use std::unique_ptr instead of the deprecated std::auto_ptr
2015-11-22 18:07:14 +00:00
moneromooo-monero
55a2da7475
wallet2: speedup refresh a bit
Use the NoodleDoodle threading technique to speedup a couple
code blocks on the main path when refreshing blocks without
any transactions for us.
2015-11-22 18:07:07 +00:00
moneromooo-monero
9156ba3a3c
wallet: rename store-tx-keys to store-tx-info
With backward compatibility
2015-11-22 12:26:27 +00:00
moneromooo-monero
b3d4d41e29
wallet: improve show_transfers
More information is now saved and displayed
2015-11-22 12:13:59 +00:00
moneromooo-monero
725ae4e710
wallet: use incoming blocks to keep track of payments too 2015-11-21 23:22:15 +00:00
moneromooo-monero
3f611bc3dc
wallet: track outgoing payments and add a show_transfers command
It's a user friendly display of incoming and outgoing transfers,
listed by height, within an optional height range.
2015-11-15 21:59:40 +00:00
moneromooo-monero
c7dc6ef8e8
simplewallet: add a set default-mixin command
The default default mixin is 4. It can now be changed per wallet.
2015-10-30 21:16:51 +00:00
moneromooo-monero
5f8baba26e
wallet2: fix CLANG compile error 2015-10-30 14:35:55 +00:00
moneromooo-monero
6df4e67cd2
Fix a possibly-unused warning, and rationalize types 2015-10-27 09:05:07 +00:00
moneromooo-monero
ecbb732faa
Fix leak on real output when using a very recent output
The wallet and the daemon applied different height considerations
when selecting outputs to use. This can leak information on which
input in a ring signature is the real one.

Found and originally fixed by smooth on Aeon.
2015-10-25 16:34:57 +00:00
moneromooo-monero
5ea2f936ae
wallet2: really include non canonical outputs in dust sweep 2015-10-14 00:58:08 +01:00
moneromooo-monero
ac90d488e7
from hard fork 2, all outputs must be decomposed
The wallet decomposes fully as of now too.
2015-10-11 13:02:55 +01:00
moneromooo-monero
d91eb8c7b4
wallet: only return tx keys via RPC if requested
To get the tx keys returned via RPC, set the "get_tx_key" or
"get_tx_keys" request field to true (defaults to false).
2015-08-24 17:36:44 +01:00
Riccardo Spagni
c24a7e8fc0
Merge pull request #381
f197599 wallet: encrypt the cache file (moneromooo-monero)
98c76a3 chacha8: add a key generation variant that take a pointer and size (moneromooo-monero)
2015-08-24 19:20:36 +02:00
moneromooo-monero
f19759992c
wallet: encrypt the cache file
It contains private data, such as a record of transactions.
The key is derived from the view and spend secret keys.

The encryption currently is one shot, so may require a lot of
memory for large wallet caches.
2015-08-22 21:04:50 +01:00
moneromooo-monero
6c995710d8
make tx keys available to the user
They are also stored in the cache file, to be retrieved using
a new get_tx_key command.
2015-08-19 21:11:48 +01:00
moneromooo-monero
aa5bc351d4
wallet: new rescan_spent command to update outputs' spent status
This obsoletes the need for a lengthy blockchain rescan when
a transaction doesn't end up in the chain after being accepted
by the daemon, or any other reason why the wallet's idea of
spent and unspent outputs gets out of sync from the blockchain's.
2015-08-11 15:55:08 +01:00
moneromooo-monero
a2d7a5fb49
encrypted payment ids are now 64 bit, instead of 256 bit
Pros:
 - smaller on the blockchain
 - shorter integrated addresses

Cons:
 - less sparseness
 - less ability to embed actual information

The boolean argument to encrypt payment ids is now gone from the
RPC calls, since the decision is made based on the length of the
payment id passed.
2015-08-09 10:13:51 +01:00
moneromooo-monero
e40cfc4e29
Encrypted payment IDs
A payment ID may be encrypted using the tx secret key and the
receiver's public view key. The receiver can decrypt it with
the tx public key and the receiver's secret view key.

Using integrated addresses now cause the payment IDs to be
encrypted. Payment IDs used manually are not encrypted by default,
but can be encrypted using the new 'encrypt_payment_id' field
in the transfer and transfer_split RPC calls. It is not possible
to use an encrypted payment ID by specifying a manual simplewallet
transfer/transfer_new command, though this is just a limitation
due to input parsing.
2015-08-09 10:13:41 +01:00
moneromooo-monero
1e23b7a11d
wallet: set watch-only flag to false when creating a new wallet 2015-08-04 09:34:10 +01:00
moneromooo-monero
988fe1f843
wallet: new transaction construction algorithm
It should avoid a lot of the issues sending more than half the
wallet's contents due to change.

Actual output selection is still random. Changing this would
improve the matching of transaction amounts to output sizes,
but may have non obvious effects on blockchain analysis.

Mapped to the new transfer_new command in simplewallet, and
transfer uses the existing algorithm.

To use in RPC, add "new_algorithm: true" in the transfer_split
JSON command. It is not used in the transfer command.
2015-07-22 19:24:30 +01:00
moneromooo-monero
8fe180ab80
wallet: add boolean to always confirm transactions with the user
This can be useful if you want to be given a veto over the tx fee,
or if you want to see what a tx fee would be without actually sending.
2015-07-18 22:11:53 +01:00
Riccardo Spagni
4790db9d04
Merge pull request #324
dc4dbc1 simplewallet: allow creating a wallet from a public address and view secret key (moneromooo-monero)
6a0f61d account: allow creating an account from a public address and view secret key (moneromooo-monero)
e05a58a wallet2: fix write_watch_only_wallet comment description (moneromooo-monero)
4bf6f0d simplewallet: forbid seed commands for watch only wallets (moneromooo-monero)
2015-06-20 22:40:47 +02:00
moneromooo-monero
dc4dbc1ceb
simplewallet: allow creating a wallet from a public address and view secret key
The needed information is supplied via a triple:

--generate-from-view-key address:viewkey:filename
2015-06-20 17:33:14 +01:00
moneromooo-monero
e05a58aead
wallet2: fix write_watch_only_wallet comment description 2015-06-20 12:30:31 +01:00
moneromooo-monero
2952ffd80f
wallet2: use the same exponential splitting for normal txes 2015-06-17 22:00:04 +01:00
moneromooo-monero
7c8d3be656
wallet2: try to split dust sweep txs exponentially
This ensures even massive wallets full of dust can sweep.
2015-06-17 21:31:16 +01:00
moneromooo-monero
c882af63c1
wallet: add watch only wallet support
The new save_watch_only saves a copy of the keys file without the
spend key. It can then be given away to be used as a normal keys
file, but with no spend ability.
2015-05-31 15:34:55 +01:00
moneromooo-monero
3204f0d536
wallet: add a sweep_dust command
Sends all the dust to your own wallet. May fail (if the fee required
is more than the dust total). May end up paying most of the dust in fees.
Unlocked dust total is now also displayed in "balance".
2015-05-30 21:47:56 +01:00
moneromooo-monero
09324764c0
wallet: add consts where appropriate
because const is always appropriate
2015-05-27 19:16:22 +01:00
warptangent
fee8424938
Allow name@domain.tld for OpenAlias lookups
Based on tewinget's update.
Make OpenAlias address format independent of existing DNS functions.

Add tests.

Test:

make debug-test
cd build/debug/tests/unit_tests
# test that regular DNS functions work, including IPv4 lookups.
# also test function that converts OpenAlias address format
make && ./unit_tests --gtest_filter=DNSResolver*
# test that OpenAlias addresses like donate@getmonero.org work from
# wallet tools
make && ./unit_tests --gtest_filter=AddressFromURL.Success
2015-05-19 02:56:04 -07:00
moneromooo-monero
87839cd484
Allow get_bulk_payments to return all payments regardless of payment ID
by giving an empty list of payment IDs.
2015-01-11 12:04:05 +00:00
Riccardo Spagni
f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Riccardo Spagni
f4675dc05d
Merge pull request #203
583cf0a Document existing function (warptangent)
95eb944 Repeat prompt for wallet path if invalid (warptangent)
2014-12-13 13:52:30 +02:00
Riccardo Spagni
c3ec723882
Merge pull request #202
d7aafd5 wallet2::rewrite update to not require bin file (warptangent)
2014-12-13 13:52:03 +02:00
Riccardo Spagni
c1bf8fb94b
Merge pull request #201
9b7e0a0 wallet2::load correctly initialize m_blockchain for wallet loaded without bin file (warptangent)
2014-12-13 13:51:42 +02:00
warptangent
95eb944ead
Repeat prompt for wallet path if invalid
simplewallet run without a wallet path argument should prompt again if
an invalid path was entered.

Validity here currently means the string isn't empty.
2014-12-11 02:52:48 -08:00
warptangent
d7aafd555a
wallet2::rewrite update to not require bin file
Allow pre-JSON wallet format to load without depending on existing bin
file.

Don't write bin file while inside keys rewrite, so bin file write
behavior here matches that of regular wallet load.
2014-12-10 02:56:54 -08:00
warptangent
9b7e0a06b5
wallet2::load correctly initialize m_blockchain for wallet loaded without bin file
Fix for simplewallet loading a wallet with a keys file but no bin file.

  - this situation previously required a user to restart simplewallet
    before it would refresh its blockchain from the server.
2014-12-10 02:42:15 -08:00
warptangent
26b87dfdc2
Add wallet2::verify_password method
Allows wallet password to be verified without changing wallet state.
2014-12-08 21:57:03 -08:00
warptangent
f9822c483e wallet JSON update for non-deterministic wallet data
wallet2::store_keys() and wallet2::load_keys() should only use the JSON
attribute "seed_language" when applicable. That is only for
deterministic wallets.

 - store_keys()  don't add JSON attribute "seed_language" if
   seed_language is empty

 - load_keys()  don't call set_seed_language if JSON attribute
   "seed_language" not present
2014-12-06 03:15:18 -08:00
warptangent
1beedb9dd4 Extract check for deterministic keys to wallet2::is_deterministic()
It's cleaner for wallet2.cpp and it also allows deterministic check by
simplewallet.cpp.
2014-12-06 02:05:50 -08:00
warptangent
3dd19c4cd4 prompt for seed language and error handling
- "seed" simplewallet command was only displaying seed if wallet was newly generated
2014-12-01 14:36:24 -08:00
Riccardo Spagni
4cd15cdde5
Merge pull request #1
f1eaf88 Prints seed after wallet upgrade. Removed iostream include. (Oran Juice)
70971be Doxygen comments (Oran Juice)
031ca23 Rewrites to old wallet file correctly (Oran Juice)
1f833dc Doxygen comments in (Oran Juice)
0bd88ff Writes seed language while generating wallet. Wallet open fix. (Oran Juice)
09a659e Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility (Oran Juice)
2014-12-01 20:15:06 +02:00
iamsmooth
cc74b43651 Remove DEFAULT_FEE, add temporary acceptance of too-small per-kb fee >= 0.1, denominations based on DEFAULT_DUST_THRESHOLD, document fee arg to create_transactions as unused, se DEFAULT_DUST_THRESHOLD for wallet dust collection instead of calcualted tx fee 2014-11-09 10:53:29 +00:00
Thomas Winget
d2287d3108 per kb fees not passing correct fee to transfer() 2014-11-06 22:09:23 -07:00
Thomas Winget
dc67b12ea9 Should now properly do per-kb fee
I'm an idiot.
2014-11-06 22:09:14 -07:00
Thomas Winget
557e27fd21 per kb fees 2014-11-06 22:09:07 -07:00
Oran Juice
f1eaf88ba6
Prints seed after wallet upgrade. Removed iostream include. 2014-10-19 14:39:45 +05:30
Oran Juice
70971be96b
Doxygen comments 2014-10-19 01:08:21 +05:30
Oran Juice
031ca23ce9
Rewrites to old wallet file correctly 2014-10-19 01:00:18 +05:30
Oran Juice
1f833dcf77
Doxygen comments in 2014-10-18 23:11:05 +05:30
Oran Juice
0bd88ff256
Writes seed language while generating wallet. Wallet open fix. 2014-10-18 23:01:43 +05:30
Oran Juice
09a659edb5
Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility 2014-10-18 02:21:37 +05:30
Riccardo Spagni
434095d1f7
fixed conflict in CMakeLists 2014-10-05 11:40:25 +02:00
Oran Juice
4517bac7f3
Restructured language sources to be singletons 2014-10-02 21:43:28 +05:30
Thomas Winget
0e1449135d updated DNSResolver/things that use it for DNSSEC
Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is
preparation for including DNSSEC validation.  The function in
src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters
updated accordingly.
2014-09-30 16:21:37 -04:00
Oran Juice
4f693d715c
Merge with origin/master 2014-09-28 15:52:05 +05:30
Thomas Winget
c14c7e1683 change to allow (at least a bit) for multiple TXT records 2014-09-23 22:58:28 +02:00
Thomas Winget
a5757a628f Monero addres from DNS TXT record implemented, tests pass
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23 22:58:21 +02:00
Oran Juice
6be139b511
Moved mnemonics code to src/mnemonics 2014-09-23 17:04:04 +05:30
Zachary Michaels
d03308734b
Separate testnet address prefix 2014-09-15 15:54:59 +02:00
Zachary Michaels
96eed84aad Pass tx and nonce to genesis block constructor 2014-09-15 15:53:50 +02:00
Zachary Michaels
658b6690a3
Separate rpc port for testnet 2014-09-15 15:53:46 +02:00
Zachary Michaels
fb4146fa34 Reorganize testnet constants 2014-09-15 15:53:10 +02:00
Zachary Michaels
07470fd400
Add testnet flag
Source: cryptonotefoundation
2014-09-15 15:53:01 +02:00
iamsmooth
6b77e8358c Change wallet to not try to extract tx public key when tx has no outputs (fixes 202612 tx format messages and is otherwise correct) 2014-09-13 04:25:33 +00:00
Jakob Lind
2ba77629ad refactoring. get seed code in wallet2 2014-08-03 16:58:21 +02:00
Jakob Lind
29c675acc0 #36 make it compile and work properly 2014-08-01 11:29:55 +02:00
Jakob Lind
e4273f2415 #36 simplewallet refresh include optional height param
height param is used optionally in refresh command 

TODO: This should also be the default behaviour 
when generating a new wallet.
2014-08-01 10:17:50 +02:00
fluffypony
6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
Zachary Michaels
12596ad566 Add get_bulk_payments rpc call 2014-07-22 12:16:15 -04:00
Thomas Winget
d433a696e5 wallet RPC converted to use new transaction semantics
wallet RPC now uses wallet2::create_transactions and wallet2::commit_tx instead
of wallet2::transfer.  This made it possible to add the RPC call /transfer_split, which
will split transactions automatically if they are too large.  The old call to
/transfer will return an error stating to use /transfer_split if multiple
transactions are needed to fulfill the request.
2014-06-30 07:16:50 -04:00
Thomas Winget
2e048a4679 final changes to get transaction splitting building. needs testing. 2014-06-30 07:16:50 -04:00
Thomas Winget
fc1180bc6c Added comments to wallet functions 2014-06-30 07:16:50 -04:00
Thomas Winget
55721da1fd Revert "Do not fall over when refreshing balance fails" 2014-06-30 06:45:20 -04:00
Matthew Little
b87577f444 Do not fall over when refreshing balance fails 2014-06-29 18:04:29 -06:00
Thomas Winget
da37b6f15b allow two-random-numbers wallet generation (but not as default) 2014-06-12 19:05:52 -04:00
Thomas Winget
d22e458c6c builds, but doesn't link. other than that, electrum-style recovery implemented (but not tested\!) 2014-06-12 19:05:51 -04:00