Commit graph

363 commits

Author SHA1 Message Date
moneromooo-monero adca903589
wallet_rpc_server: return payment id in make_integrated_address RPC
It is useful, especially when requesting a random one
2016-08-29 12:18:22 +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 1303cda646
wallet: always use new algorithm for RPC transfers
This ensures we get rct transactions when appropriate
2016-08-28 21:30:03 +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 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