aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-11-13Wallet2: calculate approximate blockchain height on offline creationJacob Brydolf1-0/+28
Wallet API: add approximateBlockChainHeight()
2016-11-11Merge pull request #1316Riccardo Spagni1-1/+343
358e068 Created monero-wallet-rpc, moving functionality from monero-wallet-cli (Lee Clagett)
2016-11-10Created monero-wallet-rpc, moving functionality from monero-wallet-cliLee Clagett1-1/+343
2016-11-09wallet: fix corner case of no recent outputs availablemoneromooo-monero1-6/+9
Also clarify related logs
2016-11-09Merge pull request #1305Riccardo Spagni1-18/+24
c80f4d4 wallet: fix output collision detection for view wallets (moneromooo-monero)
2016-11-08Merge pull request #1306Riccardo Spagni1-0/+55
8aba0d4 wallet: encrypt outputs and key images files with the view key (moneromooo-monero)
2016-11-08Merge pull request #1285Riccardo Spagni1-16/+13
a970a4e refresh speedup (luigi1111)
2016-11-08Merge pull request #1276Riccardo Spagni1-4/+40
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-07wallet: encrypt outputs and key images files with the view keymoneromooo-monero1-0/+55
This key is available to both cold and hot wallet. Authenticated encryption will guard against interception and/or modification of the file.
2016-11-07wallet: fix output collision detection for view walletsmoneromooo-monero1-18/+24
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-02wallet: fix bad amounts/fees againmoneromooo-monero1-0/+12
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-01refresh speedupluigi11111-16/+13
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-01Merge pull request #1283Riccardo Spagni1-2/+2
4869db7 adding static_assert to pod functions in string tools (Lee Clagett)
2016-11-01Merge pull request #1281Riccardo Spagni1-1/+49
bb560dd wallet: new import_outputs/export_outputs commands (moneromooo-monero)
2016-10-31adding static_assert to pod functions in string toolsLee Clagett1-2/+2
2016-10-31wallet: use the dynamic per kB feemoneromooo-monero1-4/+40
2016-10-30wallet: new import_outputs/export_outputs commandsmoneromooo-monero1-1/+49
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-30wallet: set incoming outputs' key image to 0 on view walletsmoneromooo-monero1-4/+18
This allows rescan_spent to know the daemon response to those is not valid.
2016-10-30wallet: print tx overview on submit_transfer toomoneromooo-monero1-1/+7
This is on the potentially compromised wallet, but still guards against stupid mistakes.
2016-10-26simplewallet: log transactions to submit in submit_transfermoneromooo-monero1-1/+2
Not as trustworthy as this is in the view wallet, the one that's considered compromised.
2016-10-25wallet: fix pre-rct cold wallet signing not splitting changemoneromooo-monero1-14/+13
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-23Merge pull request #1246Riccardo Spagni1-0/+7
372f338 wallet: sanity check on selected transfer indices in signed ptx (moneromooo-monero)
2016-10-22Merge pull request #1225Riccardo Spagni1-6/+5
04da979 Always confirm transfers defaults to ON/YES (NanoAkron)
2016-10-22Merge pull request #1224Riccardo Spagni1-1/+7
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-22Merge pull request #1223Riccardo Spagni1-5/+7
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-22Merge pull request #1220Riccardo Spagni1-2/+8
e76dcdd wallet: improve error messages when not enough money for transfer (moneromooo-monero)
2016-10-22wallet: sanity check on selected transfer indices in signed ptxmoneromooo-monero1-0/+7
2016-10-15Always confirm transfers defaults to ON/YESNanoAkron1-6/+5
2016-10-15simplewallet: fix sweep_all misreporting sweeped amount for rct outputsmoneromooo-monero1-0/+6
RingCT outputs will be 0 in the vin, so we need to get the actual amount from elsewhere.
2016-10-15wallet: force 0 mixin transactions to use pre-rct txesmoneromooo-monero1-1/+1
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-15wallet: select part of the fake outs from recent outputsmoneromooo-monero1-8/+40
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-15wallet: speed up output selection, and fix bug with relatedness calculationmoneromooo-monero1-3/+5
2016-10-15wallet: fix mixup between mixin 2 and 4 before/after v5moneromooo-monero1-2/+2
2016-10-15wallet: improve error messages when not enough money for transfermoneromooo-monero1-2/+8
2016-10-09Merge pull request #1191Riccardo Spagni1-4/+7
9f31e2d wallet: do not announce pool txes as money spent/received (yet) (moneromooo-monero)
2016-10-07wallet: do not announce pool txes as money spent/received (yet)moneromooo-monero1-4/+7
2016-10-04wallet: better implementation of sweep_unmixablemoneromooo-monero1-220/+30
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-04Merge pull request #1173Riccardo Spagni1-0/+32
65ea836 wallet2_api: added Wallet::daemonBlockChainTargetHeight() libwallet_api: Wallet::blockChainTargetHeight (Jacob Brydolf)
2016-10-04Merge pull request #1160Riccardo Spagni1-0/+6
80b4da3 wallet: wallet option to confirm transfers with no payment id (moneromooo-monero)
2016-10-04Merge pull request #1125Riccardo Spagni1-2/+4
7b09e9f wallet: update min mixin for sweep_unmixable on v4 (moneromooo-monero)
2016-10-04Merge pull request #1140Riccardo Spagni1-80/+253
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-03wallet2_api: added Wallet::daemonBlockChainTargetHeight()Jacob Brydolf1-0/+32
libwallet_api: Wallet::blockChainTargetHeight Signed-off-by: Jacob Brydolf <jacob@brydolf.net>
2016-10-01wallet: wallet option to confirm transfers with no payment idmoneromooo-monero1-0/+6
set confirm-missing-payment-id 0|1 Defaults to true.
2016-09-28wallet2: wallet2::get_daemon_blockchain_height() clean error message onIlya Kitaev1-0/+4
success
2016-09-27wallet: cold wallet transaction signingmoneromooo-monero1-78/+251
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-26wallet: fix log confusion between bytes and kilobytesmoneromooo-monero1-2/+2
2016-09-26formatting: 2-spaces indentationIlya Kitaev1-20/+20
2016-09-26formatting: 2-spaces indentationIlya Kitaev1-1/+1
2016-09-26wallet2_api: added Wallet::daemonBlockChainHeight()Ilya Kitaev1-1/+29
2016-09-24wallet: update min mixin for sweep_unmixable on v4moneromooo-monero1-2/+4
2016-09-18Merge pull request #1098Riccardo Spagni1-2/+4
1dd5b0b wallet: keep change dest separate from other dests (moneromooo-monero)
2016-09-18wallet: keep change dest separate from other destsmoneromooo-monero1-2/+4
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-18wallet: fix empty tx in corner case sending nothingmoneromooo-monero1-0/+6
2016-09-16wallet: change priority/fee to ArticMine's recommendationmoneromooo-monero1-24/+45
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-15Merge pull request #1074Riccardo Spagni1-13/+18
cd01bae Decrease minimum fee from 0.01/kB to 0.002/kB (moneromooo-monero)
2016-09-15Decrease minimum fee from 0.01/kB to 0.002/kBmoneromooo-monero1-13/+18
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-14wallet: fix misdetection of duplicatesmoneromooo-monero1-11/+3
2016-09-01Re-add s to rangesigsluigi11111-2/+2
Whoops.
2016-09-01Fix some rct tx size calculationsluigi11111-9/+6
Some variance is still expected
2016-09-01Merge pull request #1027Riccardo Spagni1-0/+2
85dc0ce wallet: sanity check on histogram response (moneromooo-monero)
2016-09-01wallet: sanity check on histogram responsemoneromooo-monero1-0/+2
2016-08-30wallet: interpret 0 fee multiplier as default for sweep_all toomoneromooo-monero1-1/+3
2016-08-29wallet: fix not finding enough rct fake outputsmoneromooo-monero1-3/+8
If picking coinbase outputs, those are locked for a longer time than other outputs, so we ask for more of those
2016-08-28wallet: fix some "may be used uninitialized" warningsmoneromooo-monero1-16/+15
The compiler can't always work out the _found booleans are set iff the value is initialized.
2016-08-28wallet: do not generate 0 changemoneromooo-monero1-3/+6
2016-08-28wallet: do not ask for duplicate histogramsmoneromooo-monero1-0/+3
2016-08-28wallet: transfer_selected_rct now also selects fake outsmoneromooo-monero1-171/+88
2016-08-28New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero1-0/+17
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-28rct amount key modified as per luigi1111's recommendationsmoneromooo-monero1-20/+19
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-28rct: change the simple flag to a typemoneromooo-monero1-2/+8
for future expansion
2016-08-28wallet: do not store signatures in the wallet cachemoneromooo-monero1-18/+39
Saves some substantial space. Also avoid calculating tx hashes we don't need.
2016-08-28wallet2: factor m_spent changesmoneromooo-monero1-26/+29
Makes it easier to track what is going on.
2016-08-28wallet: use the prefered rct case only when enough rct outs existmoneromooo-monero1-1/+25
2016-08-28wallet: do not try to use rct txes a few blocks before the forkmoneromooo-monero1-18/+27
2016-08-28change fork settings to allow pre-rct txes for one more fork cyclemoneromooo-monero1-2/+2
2016-08-28rct: make the amount key derivable by a third party with the tx keymoneromooo-monero1-14/+33
Scheme design from luigi1114.
2016-08-28rct: do not serialize public keys in outPkmoneromooo-monero1-3/+3
They can be reconstructed from vout
2016-08-28rpc: send global indices along with blocks/transacions on refreshmoneromooo-monero1-30/+37
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-28wallet: better tx input selectionmoneromooo-monero1-29/+74
We try to avoid related inputs, when possible
2016-08-28wallet: handle 0 change properlymoneromooo-monero1-7/+8
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-28port get_tx_key/check_tx_key to rctmoneromooo-monero1-4/+17
2016-08-28integrate simple rct apimoneromooo-monero1-6/+24
2016-08-28wallet: rct specific output selectionmoneromooo-monero1-3/+123
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-28wallet: make sweep_all work with rct txes toomoneromooo-monero1-7/+21
2016-08-28wallet: factor transfer_rct code with transfer codemoneromooo-monero1-253/+40
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-28ringct: do not serialize what can be reconstructedmoneromooo-monero1-5/+8
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-28wallet: update spent status when an accepted tx disappearsmoneromooo-monero1-0/+19
2016-08-28wallet: reset output spent status on blockchain reorgmoneromooo-monero1-5/+41
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-28add rct to the protocolmoneromooo-monero1-40/+610
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-22Merge pull request #970Riccardo Spagni1-0/+3
25f529a wallet: store key images after importing them (moneromooo-monero)
2016-08-17wallet: store key images after importing themmoneromooo-monero1-0/+3
It avoids rescan_spent resetting spent status, for example.
2016-08-17wallet: fix build on Mac and Windows (missing include)moneromooo-monero1-0/+1
Reported by RaskaRuby, tested by iDunk5400.
2016-08-11Merge pull request #948Riccardo Spagni1-49/+175
11dc091 Fake outs set is now decided by the wallet (moneromooo-monero) 1593553 new unlocked parameter to output_histogram (moneromooo-monero)
2016-08-11Fake outs set is now decided by the walletmoneromooo-monero1-45/+170
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-04wallet2: if importing key images fails, print failure indexmoneromooo-monero1-1/+2
2016-08-01new unlocked parameter to output_histogrammoneromooo-monero1-4/+5
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-07-24wallet: new {ex,im}port_key_images commands and RPC callsmoneromooo-monero1-0/+116
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-20wallet: add unconfirmed incoming txes from the txpoolmoneromooo-monero1-47/+176
Shown in show_transfers simplewallet command, and get_transfers RPC command, if req.pool is true.
2016-07-20Merge pull request #902Riccardo Spagni1-8/+25
014f3a0 Add a daemon RPC version, and make simplewallet check it (moneromooo-monero)
2016-07-19wallet: add command and RPC to sign/verify datamoneromooo-monero1-0/+35
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-10Add a daemon RPC version, and make simplewallet check itmoneromooo-monero1-8/+25
If the version is different, simplewallet will refuse to use that daemon, unless --allow-mismatched-daemon-version is used.
2016-07-06Merge pull request #878Riccardo Spagni1-12/+37
945c272 wallet: add a fee multiplier (moneromooo-monero)
2016-06-23Merge branch 'master' of https://github.com/mbg033/bitmoneroIlya Kitaev1-6/+5
2016-06-23- testnet option added to api;Ilya Kitaev1-0/+5
2016-06-23wallet2::store() implemented within wallet2::store_toIlya Kitaev1-69/+53
2016-06-22wallet: add a fee multipliermoneromooo-monero1-12/+37
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-05-27Merge remote-tracking branch 'upstream/master'Ilya Kitaev1-4/+13
2016-05-17Merge pull request #827Riccardo Spagni1-4/+13
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 19fe8ae3ef1aa46ae8fdd4e4d6862510390ddab7 (Howard Chu)
2016-05-12Merge remote-tracking branch 'upstream/master'Ilya Kitaev1-11/+249
2016-04-29Only log 1/N skipped blocksHoward Chu1-2/+4
2016-04-29Move refresh height to keys file from cache fileHoward Chu1-0/+6
2016-04-29Make fast_refresh interruptibleHoward Chu1-2/+3
2016-04-28add a --max-concurrency flagmoneromooo-monero1-2/+2
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-26wallet: allow attaching notes to txidsmoneromooo-monero1-0/+13
2016-04-26wallet: add GMT timestamps to transfers/paymentsmoneromooo-monero1-5/+8
2016-04-26Merge pull request #815Riccardo Spagni1-0/+127
b0850a9 wallet: add a new sweep_all command and RPC command (moneromooo-monero)
2016-04-26Merge pull request #814Riccardo Spagni1-4/+12
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-26Merge remote-tracking branch 'upstream/master' into developIlya Kitaev1-76/+76
2016-04-19wallet: add a new sweep_all command and RPC commandmoneromooo-monero1-0/+127
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-18 modified: src/wallet/wallet2.cppawfulcrawler1-3/+4
modified: src/wallet/wallet2.h Removed working comments
2016-04-18 modified: src/simplewallet/simplewallet.cppawfulcrawler1-4/+11
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-17Add GET_HASHES_FAST rpc, use it in walletHoward Chu1-0/+87
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-14Merge pull request #784Riccardo Spagni1-0/+1
087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
2016-04-14Merge pull request #783Riccardo Spagni1-53/+36
48d0747 wallet: better output selection for transfer/transfer_new (moneromooo-monero)
2016-04-05rpc: add a do_not_relay boolean to tx submissionmoneromooo-monero1-0/+1
Just to make it easier
2016-04-02Fix potential race with parallel processing of txes/signatures/blocksmoneromooo-monero1-0/+1
2016-04-02wallet: better output selection for transfer/transfer_newmoneromooo-monero1-53/+36
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-02Merge pull request #769Riccardo Spagni1-22/+37
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-02Merge pull request #767Riccardo Spagni1-1/+1
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-03-31Merge remote-tracking branch 'upstream/master'Ilya Kitaev1-39/+108
2016-03-28wallet: fix --generate-from-keys saving as watch onlymoneromooo-monero1-1/+1
2016-03-27wallet: make load_keys check types when loading JSONmoneromooo-monero1-22/+37
2016-03-27Convey tx verification failure reasons to the RPC clientmoneromooo-monero1-1/+1
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-26wallet: pass std::function by const ref, not valuemoneromooo-monero1-1/+1
Because we can.
2016-03-26wallet: do not leak owned amounts to the daemon unless --trusted-daemonmoneromooo-monero1-4/+5
This will be slower, though more private. New trusted_daemon parameter to the matching RPC call, false by default.
2016-03-26wallet: change sweep_dust to sweep_unmixablemoneromooo-monero1-13/+91
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-26wallet: handle rare case where fee adjustment can bump to the next kBmoneromooo-monero1-2/+3
It resulted in a tx being sent with too low a fee, and thus rejected.
2016-03-26wallet: factor fee calculationmoneromooo-monero1-22/+11
2016-03-25- testnet option added to api;Ilya Kitaev1-0/+5
2016-03-25wallet: add a --generate-from-json flagmoneromooo-monero1-1/+1
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-21wallet2::store() implemented within wallet2::store_toIlya Kitaev1-69/+53
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero1-3/+2
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero1-2/+3
Useful for debugging users' logs
2016-03-16Wallet::store_to(path, password) implemented;Ilya Kitaev1-0/+72
2016-03-16Wallet::setPassword() method for wallet2_apiIlya Kitaev1-0/+10
2016-03-11Use boost::thread instead of std::threadHoward Chu1-5/+5
and all other associated IPC
2016-02-22simplewallet: add a new --restore-from-keys optionmoneromooo-monero1-0/+35
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-15wallet: clear missing data on rescan_bcmoneromooo-monero1-0/+4
2016-02-05wallet: check a key image isn't already present when adding onemoneromooo-monero1-12/+49
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-01-31Revert "Merge pull request #632"Riccardo Spagni1-9/+1
This reverts commit 58f890652e86039e98dff2d48d217c9ea9e84eca, reversing changes made to 39d73d2a27730e6a5844c259d81a0ed9d4ee3000.
2016-01-31Merge pull request #634Riccardo Spagni1-2/+10
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-31Merge pull request #633Riccardo Spagni1-0/+2
80882ac wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31Merge pull request #632Riccardo Spagni1-1/+9
2cf8b32 wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31wallet: forbid dust altogether in output selection where appropriatemoneromooo-monero1-2/+10
2016-01-30wallet: guard against exception in process_blocksmoneromooo-monero1-0/+2
If an exception occurs, the thread needs to be joined, or it will be deleted while still live, and terminate the process.
2016-01-30wallet: guard against exception in process_blocksmoneromooo-monero1-1/+9
If an exception occurs, the thread needs to be joined, or it will be deleted while still live, and terminate the process.
2016-01-29wallet: detect and handle failed outgoing transfersmoneromooo-monero1-1/+64
When a transaction is not found in the pool anymore, it is marked as failed, and displayed as such in show_transfers.
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero1-4/+8
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2016-01-24wallet2: update spent comparison now that we have two spent statesmoneromooo-monero1-1/+1
2016-01-10wallet2: decide at runtime which upper tx size to usemoneromooo-monero1-4/+16
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-05rpc: is_key_image_spent now checks the tx pool toomoneromooo-monero1-3/+3
2015-12-31Merge pull request #584Riccardo Spagni1-1/+3
5c67c48 wallet: don't forget to close the file after storing cache (moneromooo-monero)
2015-12-31wallet: don't forget to close the file after storing cachemoneromooo-monero1-1/+3
Also add some flags to open, as epee's save_string_to_file does, to truncate file, etc.
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-30wallet: add a rescan_bc command and rescan_blockchain RPCmoneromooo-monero1-0/+15
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-30wallet: protect against exceptions in the block pull threadmoneromooo-monero1-13/+29
This can happen when the daemon exits, which would also cause the wallet to crash via unhandled exception
2015-12-30no longer need to pass the size to rapidjsonRiccardo Spagni1-2/+2
2015-12-29wallet: store cache to file without unnecessary memory buffermoneromooo-monero1-6/+8
2015-12-24fixed missing parenthesisRiccardo Spagni1-1/+1
2015-12-24fix for 'failed to generate new wallet: failed to save file' error during ↵Lex Kalinkin1-3/+5
wallet generation
2015-12-19Allow the wallet to access hard fork informationmoneromooo-monero1-1/+36
And make it change behavior slightly when close/after first hard fork
2015-12-18Merge pull request #544Riccardo Spagni1-2/+2
01e92eb replace std::auto_ptr with std::unique_ptr (moneromooo-monero)
2015-12-17replace std::auto_ptr with std::unique_ptrmoneromooo-monero1-2/+2
The former is obsolete
2015-12-17wallet: save to a temporary file, then renamemoneromooo-monero1-1/+14
This should avoid most of wallet cache corruption cases
2015-12-05wallet: make the wallet refresh type a wallet settingmoneromooo-monero1-0/+13
instead of a command line setting. It makes sense that is is a long lived setting.
2015-12-05wallet: default auto-refresh to true for old walletsmoneromooo-monero1-0/+1
2015-11-30wallet2: default auto-refresh to true for preexisting walletsmoneromooo-monero1-1/+1
2015-11-29wallet: cancellable refreshmoneromooo-monero1-0/+1
^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-30Merge pull request #509Riccardo Spagni1-0/+8
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
2015-11-30Merge pull request #507Riccardo Spagni1-0/+4
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
2015-11-29wallet2: remove confirmed transactions from detached blocksmoneromooo-monero1-0/+8
2015-11-28wallet2: speed up wallet refresh for large minersmoneromooo-monero1-14/+47
2015-11-28wallet: optional automatic refresh from the daemonmoneromooo-monero1-0/+4
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-27wallet2: parallelize pulling blocks and processing them on refreshmoneromooo-monero1-13/+44
This needed locking the use of m_http_client, to avoid collisions in I/O.
2015-11-27wallet2: maintain the short chain manually when refreshingmoneromooo-monero1-3/+16
2015-11-27wallet2: split pull blocks between pulling and processingmoneromooo-monero1-9/+18
2015-11-22wallet: make the refresh optimizations selectable via command linemoneromooo-monero1-1/+5
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-22wallet: speedup refresh from daemonmoneromooo-monero1-37/+58
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-22wallet2: minor cleanupmoneromooo-monero1-7/+4
- use std::vector::std::deque to not leak when exceptions happen - use std::unique_ptr instead of the deprecated std::auto_ptr
2015-11-22wallet2: speedup refresh a bitmoneromooo-monero1-2/+148
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-22wallet: rename store-tx-keys to store-tx-infomoneromooo-monero1-6/+7
With backward compatibility
2015-11-22wallet: improve show_transfersmoneromooo-monero1-2/+37
More information is now saved and displayed
2015-11-21wallet: use incoming blocks to keep track of payments toomoneromooo-monero1-0/+19
2015-11-15wallet: track outgoing payments and add a show_transfers commandmoneromooo-monero1-8/+36
It's a user friendly display of incoming and outgoing transfers, listed by height, within an optional height range.
2015-10-30simplewallet: add a set default-mixin commandmoneromooo-monero1-0/+5
The default default mixin is 4. It can now be changed per wallet.
2015-10-30wallet2: fix CLANG compile errormoneromooo-monero1-1/+1
2015-10-27Fix a possibly-unused warning, and rationalize typesmoneromooo-monero1-5/+5
2015-10-25Fix leak on real output when using a very recent outputmoneromooo-monero1-1/+1
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-14wallet2: really include non canonical outputs in dust sweepmoneromooo-monero1-1/+1
2015-10-11from hard fork 2, all outputs must be decomposedmoneromooo-monero1-15/+19
The wallet decomposes fully as of now too.