Commit Graph

352 Commits

Author SHA1 Message Date
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
83ab3151e8
wallet2_api: zero amounts are now allowed with rct 2016-08-28 21:29:41 +01:00
moneromooo-monero
096ac06521
wallet2_api: update on_money_{received,spent} prototypes for rct changes 2016-08-28 21:29:40 +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
9308b4e8b9
Merge pull request #978
99dd572 libwallet_api: tests: checking for result while opening wallet (Ilya Kitaev)
bcf7b67 libwallet_api: Wallet::amountFromString fixed (Ilya Kitaev)
32bc7b4 libwallet_api: helper method to return maximumAllowedAmount (Ilya Kitaev)
cbe534d libwallet_api: tests: removed logged passwords (Ilya Kitaev)
b1a5a93 libwallet_api: do not store wallet on close if status is not ok (Ilya Kitaev)
2016-08-26 10:32:00 +02:00
Ilya Kitaev
bcf7b67cd6 libwallet_api: Wallet::amountFromString fixed 2016-08-23 13:47:21 +03:00
Ilya Kitaev
32bc7b41c0 libwallet_api: helper method to return maximumAllowedAmount 2016-08-23 12:35:45 +03: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
Ilya Kitaev
b1a5a937ff libwallet_api: do not store wallet on close if status is not ok 2016-08-22 22:47:59 +03: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
Riccardo Spagni
b34506da81
Merge pull request #928
ebf97d7 wallet: new {ex,im}port_key_images commands and RPC calls (moneromooo-monero)
2016-07-26 08:55:25 +02: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
redfish
8bed9a42f7 cmake: wallet: libunbound is not always static
It is not clear why libunbound was added to this in the first place,
since it wasn't here before and #915 doesn't seem to introduce any
new dependency on it.

Tested build with STATIC=OFF (with and without libunbound-dev libunbound8
installed) and STATIC=ON, on Ubuntu Trusty, Debian Jessie, and Arch
Linux. For static builds, beware of #926 and #907.

If this hack was introduced to make it build on some other system
(Windows? OS X?), then it will have to be dealt with, but not this way.
2016-07-23 15:04:15 -04:00
Riccardo Spagni
07f974a499
Merge pull request #916
b89b963 wallet: add unconfirmed incoming txes from the txpool (moneromooo-monero)
2016-07-23 09:19:39 +02:00
Riccardo Spagni
b582764bd6
Merge pull request #915
d7597c5 refreshing wallet even if error happened (Ilya Kitaev)
6d32a3d wallet_api: async init, Wallet::connected status, log level (Ilya Kitaev)
193d251 libwallet_api cmake: conditionally creating libwallet_merged2 only for STATIC build (Ilya Kitaev)
10c06dd wallet_api: segfault on refresh fixed (Ilya Kitaev)
9d2cb4f WalletListener functionality (Ilya Kitaev)
d27b883 hack to successfull linking for MSYS2 (Ilya Kitaev)
083380c Transaction fee multiplier aka priority integraged (Ilya Kitaev)
00ed12b Wallet::paymentIdValid (Ilya Kitaev)
2016-07-23 09:17:21 +02: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
38e5156392
Merge pull request #914
87b1153 wallet2_api: use uint64_t for amounts (moneromooo-monero)
2016-07-20 14:29:33 +02: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
Riccardo Spagni
07f1d4e04d
Merge pull request #899
a95a2cb wallet_rpc_server: add payment id from integrated addresses to extra (moneromooo-monero)
2016-07-20 13:52:54 +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
Ilya Kitaev
d7597c5961 refreshing wallet even if error happened 2016-07-18 23:03:09 +03:00
Ilya Kitaev
6d32a3d16b wallet_api: async init, Wallet::connected status, log level 2016-07-18 23:03:09 +03:00
Ilya Kitaev
193d251360 libwallet_api cmake: conditionally creating libwallet_merged2 only for
STATIC build
2016-07-18 23:03:09 +03:00
Ilya Kitaev
10c06ddac7 wallet_api: segfault on refresh fixed 2016-07-18 23:03:09 +03:00
Ilya Kitaev
9d2cb4f36c WalletListener functionality 2016-07-18 23:02:47 +03:00
Ilya Kitaev
d27b883b2d hack to successfull linking for MSYS2 2016-07-18 23:02:47 +03:00
Ilya Kitaev
083380cb8f Transaction fee multiplier aka priority integraged 2016-07-18 23:02:18 +03:00
Ilya Kitaev
00ed12bd6c Wallet::paymentIdValid 2016-07-18 23:02:18 +03:00
moneromooo-monero
87b1153f37
wallet2_api: use uint64_t for amounts 2016-07-17 09:33:31 +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