aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-17wallet: make the segregation height settablemoneromooo-monero1-0/+5
via user setting first, then DNS TXT record, hardcoded fallback
2018-03-16Add command line option allowing to restrict the default sub-address ↵stoffu1-0/+1
lookahead in order to avoid so looooong time of set-up when creating a HW based wallet.
2018-03-16wallet: more user friendly print_ringmoneromooo-monero1-3/+12
It can now take a txid (to display rings for all its inputs), and will print rings in a format that set_ring understands
2018-03-16wallet: add a set_ring commandmoneromooo-monero1-0/+1
This is so one can set rings for spent key images in case the attackers don't merge the ring matching patch set.
2018-03-16wallet: make ringdb an object with database statemoneromooo-monero1-6/+10
2018-03-16wallet: add an output blackball list to avoid using those in ringsmoneromooo-monero1-0/+5
2018-03-16wallet: key reuse mitigation optionsmoneromooo-monero1-0/+6
If a pre-fork output is spent on both Monero and attack chain, any post-fork output can be deduced to be a fake output, thereby decreasing the effective ring size. The segregate-per-fork-outputs option, on by default, allows selecting only pre-fork outputs in this case, so that the same ring can be used when spending it on the other side, which does not decrease the effective ring size. This is intended to be SET when intending to spend Monero on the attack fork, and to be UNSET if not intending to spend Monero on the attack fork (since it leaks the fact that the output being spent is pre-fork). If the user is not certain yet whether they will spend pre-fork outputs on a key reusing fork, the key-reuse-mitigation2 option should be SET instead. If you use this option and intend to spend Monero on both forks, then spend real Monero first.
2018-03-16wallet: add shared ring databasemoneromooo-monero1-1/+16
This maps key images to rings, so that different forks can reuse the rings by key image. This avoids revealing the real inputs like would happen if two forks spent the same outputs with different rings. This database is meant to be shared with all Monero forks which don't bother making a new chain, putting users' privacy at risk in the process. It is placed in a shared data directory by default ($HOME/.shared-ringdb on UNIX like systems). You may use --shared-ringdb-dir to override this location, and should then do so for all Monero forks for them to share the database.
2018-03-16add RPC to get a histogram of outputs of a given amountmoneromooo-monero1-0/+2
2018-03-15wallet2+cli+rpc: eliminate redundant m_http_client from cli/rpc and delegate ↵stoffu1-0/+19
calls to wallet2
2018-03-14Merge pull request #3369Riccardo Spagni1-1/+1
1979d53d wallet: fixes and tweaks to the save_watch_only command (moneromooo-monero)
2018-03-10wallet2 / simplewallet: Must opt-in to create '.address.txt' files for new ↵Leon Klingele1-20/+24
wallets Previously, a file containing the unencrypted Monero address was created by default in the wallet's directory. This file might pose as a privacy risk. The creation of this file is now opt-in and can be enabled by providing --create-address-file
2018-03-07wallet: fixes and tweaks to the save_watch_only commandmoneromooo-monero1-1/+1
- save the new keys file as FOO-watchonly.keys, not FOO.keys-watchonly - catch any exception (eg, I/O errors) and error out - print the new keys filename in simplewallet
2018-03-05Stagenetstoffu1-5/+6
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm1-1/+11
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.
2018-02-20Merge pull request #3247Riccardo Spagni1-2/+3
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero) f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-16wallet2: remove unused m_subaddresses_invmoneromooo-monero1-2/+2
2018-02-16wallet2: speed up subaddress generation (by about a third)moneromooo-monero1-0/+1
2018-02-16Merge pull request #3175Riccardo Spagni1-0/+6
3be98036 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero. (Maximilian Lupke)
2018-01-28wallet: automatically use low priority if safe (no backlog & recent blocks ↵stoffu1-0/+4
not full)
2018-01-28wallet2: split estimate_backlog to allow for raw fee levelsmoneromooo-monero1-0/+1
2018-01-27Merge pull request #3141Riccardo Spagni1-20/+18
3160a930 wallet2: remove {set|get}_default_decimal_point and use the same funcs under cryptonote:: instead (stoffu) 7d1088d3 wallet2: make scan_output const and omit keys arg (stoffu) bc1ee2c2 wallet2: make member functions const when possible (stoffu)
2018-01-27Merge pull request #3118Riccardo Spagni1-0/+3
ca336c62 simplewallet: check file overwrite when exporting stuff (stoffu)
2018-01-27Merge pull request #3113Riccardo Spagni1-1/+8
ffc2e570 wallet rpc: show fees when querying incoming transfers (stoffu)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-26wallet2: remove {set|get}_default_decimal_point and use the same funcs under ↵stoffu1-2/+0
cryptonote:: instead
2018-01-26wallet2: make scan_output const and omit keys argstoffu1-1/+1
2018-01-26wallet2: make member functions const when possiblestoffu1-17/+17
2018-01-26wallet rpc: show fees when querying incoming transfersstoffu1-1/+8
2018-01-26simplewallet: check file overwrite when exporting stuffstoffu1-0/+3
2018-01-24wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero.Maximilian Lupke1-0/+6
Fixes #3080
2018-01-10Reserve proofstoffu1-0/+42
2018-01-02Merge pull request #2960Riccardo Spagni1-0/+10
5cbcf0aa wallet: support for multisig seeds (moneromooo-monero)
2017-12-25Add a chacha20 variant to go with chacha8moneromooo-monero1-4/+4
2017-12-20wallet: support for multisig seedsmoneromooo-monero1-0/+10
They are hex rather than words, because they are a lot longer than "normal" seeds, as they have to embed a lot more information
2017-12-18Account taggingstoffu1-1/+23
2017-12-17wallet: factor multisig info parsingmoneromooo-monero1-0/+8
2017-12-17wallet: use raw encrypted data in multisig import/export RPCmoneromooo-monero1-2/+2
2017-12-17wallet: add multisig sign/submit RPCmoneromooo-monero1-0/+6
2017-12-17wallet2: fix slow multisig unit tests with subaddress patchmoneromooo-monero1-5/+3
While there, move the wallet2 ctor to the cpp file as it's a huge amount of init list now, and remove an unused one.
2017-12-17make multisig work with subaddressesmoneromooo-monero1-1/+0
Thanks to kenshi84 for help getting this work
2017-12-17wallet: guard against partly initialized multisig walletmoneromooo-monero1-1/+1
2017-12-17add multisig core test and factor multisig building blocksmoneromooo-monero1-1/+5
2017-12-17N-1/N multisigmoneromooo-monero1-27/+83
2017-12-17multisig address generation RPCmoneromooo-monero1-1/+3
2017-12-17Add N/N multisig tx generation and signingmoneromooo-monero1-7/+93
Scheme by luigi1111: Multisig for RingCT on Monero 2 of 2 User A (coordinator): Spendkey b,B Viewkey a,A (shared) User B: Spendkey c,C Viewkey a,A (shared) Public Address: C+B, A Both have their own watch only wallet via C+B, a A will coordinate spending process (though B could easily as well, coordinator is more needed for more participants) A and B watch for incoming outputs B creates "half" key images for discovered output D: I2_D = (Hs(aR)+c) * Hp(D) B also creates 1.5 random keypairs (one scalar and 2 pubkeys; one on base G and one on base Hp(D)) for each output, storing the scalar(k) (linked to D), and sending the pubkeys with I2_D. A also creates "half" key images: I1_D = (Hs(aR)+b) * Hp(D) Then I_D = I1_D + I2_D Having I_D allows A to check spent status of course, but more importantly allows A to actually build a transaction prefix (and thus transaction). A builds the transaction until most of the way through MLSAG_Gen, adding the 2 pubkeys (per input) provided with I2_D to his own generated ones where they are needed (secret row L, R). At this point, A has a mostly completed transaction (but with an invalid/incomplete signature). A sends over the tx and includes r, which allows B (with the recipient's address) to verify the destination and amount (by reconstructing the stealth address and decoding ecdhInfo). B then finishes the signature by computing ss[secret_index][0] = ss[secret_index][0] + k - cc[secret_index]*c (secret indices need to be passed as well). B can then broadcast the tx, or send it back to A for broadcasting. Once B has completed the signing (and verified the tx to be valid), he can add the full I_D to his cache, allowing him to verify spent status as well. NOTE: A and B *must* present key A and B to each other with a valid signature proving they know a and b respectively. Otherwise, trickery like the following becomes possible: A creates viewkey a,A, spendkey b,B, and sends a,A,B to B. B creates a fake key C = zG - B. B sends C back to A. The combined spendkey C+B then equals zG, allowing B to spend funds at any time! The signature fixes this, because B does not know a c corresponding to C (and thus can't produce a signature). 2 of 3 User A (coordinator) Shared viewkey a,A "spendkey" j,J User B "spendkey" k,K User C "spendkey" m,M A collects K and M from B and C B collects J and M from A and C C collects J and K from A and B A computes N = nG, n = Hs(jK) A computes O = oG, o = Hs(jM) B anc C compute P = pG, p = Hs(kM) || Hs(mK) B and C can also compute N and O respectively if they wish to be able to coordinate Address: N+O+P, A The rest follows as above. The coordinator possesses 2 of 3 needed keys; he can get the other needed part of the signature/key images from either of the other two. Alternatively, if secure communication exists between parties: A gives j to B B gives k to C C gives m to A Address: J+K+M, A 3 of 3 Identical to 2 of 2, except the coordinator must collect the key images from both of the others. The transaction must also be passed an additional hop: A -> B -> C (or A -> C -> B), who can then broadcast it or send it back to A. N-1 of N Generally the same as 2 of 3, except participants need to be arranged in a ring to pass their keys around (using either the secure or insecure method). For example (ignoring viewkey so letters line up): [4 of 5] User: spendkey A: a B: b C: c D: d E: e a -> B, b -> C, c -> D, d -> E, e -> A Order of signing does not matter, it just must reach n-1 users. A "remaining keys" list must be passed around with the transaction so the signers know if they should use 1 or both keys. Collecting key image parts becomes a little messy, but basically every wallet sends over both of their parts with a tag for each. Thia way the coordinating wallet can keep track of which images have been added and which wallet they come from. Reasoning: 1. The key images must be added only once (coordinator will get key images for key a from both A and B, he must add only one to get the proper key actual key image) 2. The coordinator must keep track of which helper pubkeys came from which wallet (discussed in 2 of 2 section). The coordinator must choose only one set to use, then include his choice in the "remaining keys" list so the other wallets know which of their keys to use. You can generalize it further to N-2 of N or even M of N, but I'm not sure there's legitimate demand to justify the complexity. It might also be straightforward enough to support with minimal changes from N-1 format. You basically just give each user additional keys for each additional "-1" you desire. N-2 would be 3 keys per user, N-3 4 keys, etc. The process is somewhat cumbersome: To create a N/N multisig wallet: - each participant creates a normal wallet - each participant runs "prepare_multisig", and sends the resulting string to every other participant - each participant runs "make_multisig N A B C D...", with N being the threshold and A B C D... being the strings received from other participants (the threshold must currently equal N) As txes are received, participants' wallets will need to synchronize so that those new outputs may be spent: - each participant runs "export_multisig FILENAME", and sends the FILENAME file to every other participant - each participant runs "import_multisig A B C D...", with A B C D... being the filenames received from other participants Then, a transaction may be initiated: - one of the participants runs "transfer ADDRESS AMOUNT" - this partly signed transaction will be written to the "multisig_monero_tx" file - the initiator sends this file to another participant - that other participant runs "sign_multisig multisig_monero_tx" - the resulting transaction is written to the "multisig_monero_tx" file again - if the threshold was not reached, the file must be sent to another participant, until enough have signed - the last participant to sign runs "submit_multisig multisig_monero_tx" to relay the transaction to the Monero network
2017-12-17wallet: add multisig key generationmoneromooo-monero1-1/+21
Scheme by luigi1111
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-2/+0
2017-12-16Merge pull request #2860Riccardo Spagni1-12/+12
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero) 7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero) 54950829 use memwipe in a few relevant places (moneromooo-monero) 000666ff add a memwipe function (moneromooo-monero)
2017-12-08add bulletproofs from v7 on testnetmoneromooo-monero1-1/+1
2017-12-02Merge pull request #2833Riccardo Spagni1-0/+1
b0426d4c Fixes #759 Add sanity check on restore height (Cifrado)
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero1-12/+12
2017-11-25Merge pull request #2368Riccardo Spagni1-0/+2
b0b7e0f0 Spend proof without txkey (stoffu)
2017-11-25Merge pull request #2788Riccardo Spagni1-0/+27
9739da1e wallet_rpc_server: new relay_tx command (moneromooo-monero) 01dc8297 wallet: transfer RPC can now return tx metadata (pending_tx) (moneromooo-monero) 83fa9047 serialization: add std::set and std::unordered_set serialization (moneromooo-monero)
2017-11-24wallet: transfer RPC can now return tx metadata (pending_tx)moneromooo-monero1-0/+27
2017-11-21Spend proof without txkeystoffu1-0/+2
2017-11-21fix for tx proof: use exception instead of error_str when signature gen failedstoffu1-1/+1
2017-11-18Tx proof (revised):stoffu1-0/+4
- refactoring: proof generation/checking code was moved from simplewallet.cpp to wallet2.cpp - allow an arbitrary message to be signed together with txid - introduce two types (outbound & inbound) of tx proofs; with the same syntax, inbound is selected when <address> belongs to this wallet, outbound otherwise. see GitHub thread for more discussion - wallet RPC: added get_tx_key, check_tx_key, get_tx_proof, check_tx_proof - wallet API: moved WalletManagerImpl::checkPayment to Wallet::checkTxKey, added Wallet::getTxProof/checkTxProof - get_tx_key/check_tx_key: handle additional tx keys by concatenating them into a single string
2017-11-17Fixes #759 Add sanity check on restore heightCifrado1-0/+1
2017-11-15wallet: add sweep_single commandstoffu1-0/+1
2017-11-15wallet2 bugfix: loading old m_unconfirmed_paymentsstoffu1-3/+2
2017-11-14wallet: rejig to avoid prompting in wallet2moneromooo-monero1-7/+4
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
2017-11-14Merge pull request #2755Riccardo Spagni1-2/+2
d70515fc Used declared default refresh status as default rather than it's current value (Maxime THIEBAUT)
2017-11-14Merge pull request #2624Riccardo Spagni1-0/+1
2677ade5 simplewallet: forbid 0 ring size (moneromooo-monero) da8b60cb simplewallet: reject attempts to use too low mixin early (moneromooo-monero)
2017-11-14Merge pull request #2697Riccardo Spagni1-14/+38
d269bff2 wallet2: use a vector, not a list, for selected_transfers (moneromooo-monero)
2017-11-14simplewallet: reject attempts to use too low mixin earlymoneromooo-monero1-0/+1
This yields a clear error message rather then some possibly confusing more technical errors down the line
2017-11-13wallet2: use a vector, not a list, for selected_transfersmoneromooo-monero1-14/+38
Friendlier on memory/speed, we know in advance the max amount of items, which are small and constant size, and there's a lot of list walking involved.
2017-11-06track double spending in the txpoolmoneromooo-monero1-7/+32
Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
2017-11-06Merge pull request #2605Riccardo Spagni1-1/+27
b370ef54 Wallet: Descriptions through new commands 'set_description', 'get_description' (rbrunner7)
2017-11-06Merge pull request #2546Riccardo Spagni1-2/+2
b2d416f2 Distinguish "not enough money" and "not enough unlocked money" (binaryFate)
2017-11-03Used declared default refresh status as default rather than it's current valueMaxime THIEBAUT1-2/+2
2017-11-01Merge pull request #2703Riccardo Spagni1-2/+2
d0463312 fix libwallet api test after api change (Jaquee) a46c1eed Wallet2: Don't throw when subaddress label doesn't exist (Jaquee) 086b7db2 Wallet API: default values for account and subaddr index (Jaquee)
2017-10-29Wallet2: Don't throw when subaddress label doesn't existJaquee1-2/+2
2017-10-23wallet2: fix subaddress fields serializationmoneromooo-monero1-0/+15
When loading an older wallet cache, they wouldn't be initialized, leading them to have random(ish) values, and so assigned to some random subaddress.
2017-10-16Wallet: Descriptions through new commands 'set_description', 'get_description'rbrunner71-1/+27
2017-10-16Distinguish "not enough money" and "not enough unlocked money"binaryFate1-2/+2
Fix #1530
2017-10-15Merge pull request #2565Riccardo Spagni1-1/+1
452d4fae tests: fix hashchain unit tests (moneromooo-monero)
2017-10-15Merge pull request #2109Riccardo Spagni1-2/+62
97c2e449 wallet2+API: use separate callbacks for lightwallets (Jaquee) d9261867 walletAPI: correct confirmations in txHistory for unsynced wallets (Jaquee) 9442b043 walletAPI: lightwallet exceptions (Jaquee) fc922934 walletAPI: add lightwallet login() and importWalletRequest() (Jaquee) 79207743 walletAPI: init() lightwallet and SSL support (Jaquee) dde5a1fc walletAPI: add tx unlock_time (Jaquee) bba5cbed wallet2: remove obsolete get_num_rct_outputs() call from create_transactions_2 (Jaquee) 7a482f30 wallet2: create_transactions_2 lightwallet support (Jaquee) ce61b818 wallet2: get_outs lightwallet support (Jaquee) 1197cb71 wallet2: commit_tx() lightwallet support (Jaquee) 43b57804 wallet2: refactor is_tx_spendtime_unlocked() (Jaquee) 32e2b003 wallet2: add lightwallet exceptions to common functions (Jaquee) 2e692fc0 wallet2: refresh() lightwallet support (Jaquee) f44d156c my/openmonero API functions (Jaquee) 288d3c75 wallet2: add remove_obsolete_pool_txs() (Jaquee) 2c6aad7e wallet2: add on_pool_tx_removed callback (Jaquee) ff7c30aa wallet2: light wallet member variables (Jaquee) e2a276cb wallet2: add ssl option to init() (Jaquee) a13540be add string_tools::validate_hex() (Jaquee) fd773d88 refactor cryptonote_basic::add_tx_pub_key_to_extra (Jaquee) 8bfa6c2d lightwallet rpc server commands (Jaquee) 76961ddc Serializer: string to integer conversion for MyMonero compatibility (Jaquee) 1cf940f2 epee http_client SSL support (Jaquee) eec10137 CMakeLists.txt - Add openssl include dir (Jaquee)
2017-10-15wallet2+API: use separate callbacks for lightwalletsJaquee1-0/+7
2017-10-15wallet2: get_outs lightwallet supportJaquee1-0/+2
2017-10-15wallet2: refactor is_tx_spendtime_unlocked()Jaquee1-0/+1
2017-10-15my/openmonero API functionsJaquee1-0/+34
2017-10-15wallet2: add remove_obsolete_pool_txs()Jaquee1-0/+1
2017-10-15wallet2: add on_pool_tx_removed callbackJaquee1-0/+1
2017-10-15wallet2: light wallet member variablesJaquee1-1/+15
2017-10-15Merge pull request #2554Riccardo Spagni1-2/+2
d74336d5 wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstr (stoffu)
2017-10-15wallet2: add ssl option to init()Jaquee1-1/+1
2017-10-07Subaddresseskenshi841-54/+131
2017-10-07wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstrstoffu1-2/+2
2017-10-06Merge pull request #2529Riccardo Spagni1-1/+0
bd937139 wallet2: error check for generate_key_image_helper, removed redundant wallet_generate_key_image_helper (stoffu)
2017-10-03tests: fix hashchain unit testsmoneromooo-monero1-1/+1
and relax the not-empty safety check to stay more intuitiuve
2017-10-03wallet2: error check for generate_key_image_helper, removed redundant ↵stoffu1-1/+0
wallet_generate_key_image_helper
2017-10-02simplewallet: allow to set threshold before warning about tx backlogselsta1-0/+3
2017-10-02wallet2: fix hash chain trimming when the inner chain becomes emptymoneromooo-monero1-1/+2
It'd prevent further syncing. Recovery of empty hash chains is automatic, but requires a running daemon
2017-09-25wallet2: do not keep block hashes below last checkpointmoneromooo-monero1-5/+52
This saves a lot of space and load/save time for wallet caches
2017-09-25move checkpoints in a separate librarymoneromooo-monero1-1/+1
2017-09-25wallet2: simplify tx processing a bitmoneromooo-monero1-2/+15
2017-09-25wallet2: factor some of the tx scanning codemoneromooo-monero1-0/+1
2017-09-12wallet: add encrypted seed functionalitymoneromooo-monero1-1/+1
This uses luigi1111's CN_Add method. See https://xmr.llcoins.net for details.
2017-09-02Merge pull request #2362Riccardo Spagni1-3/+4
adce8ae4 simplewallet: new "fee" command to display fee information (moneromooo-monero)
2017-09-02Merge pull request #2309Riccardo Spagni1-2/+7
d58700e0 WalletAPI: only allow trusted daemon when importing key images (Jaquee) 8a9bbd26 WalletAPI: copy wallet data when creating a view only wallet (Jaquee) d27fe32e wallet2: export/import wallet data functions (Jaquee) 225a25f3 import_key_images - allow importing without being connected to daemon (Jaquee)
2017-08-29simplewallet: new "fee" command to display fee informationmoneromooo-monero1-3/+4
including expected transaction backlog at different priorities
2017-08-26wallet: new option to check/confirm txpool backlog when sendingmoneromooo-monero1-2/+7
2017-08-21wallet2: export/import wallet data functionsJaquee1-1/+6
2017-08-18import_key_images - allow importing without being connected to daemonJaquee1-1/+1
2017-08-15Merge pull request #2240Riccardo Spagni1-0/+2
b7d6ec83 simplewallet: add (out of sync) or (no daemon) markers in the prompt (moneromooo-monero) fa23a500 wallet2: add a is_synced function (moneromooo-monero) f1307bbd node_rpc_proxy: add a proxy for target height (moneromooo-monero)
2017-08-15Merge pull request #2238Riccardo Spagni1-0/+2
ad4649ac Enable verifying wallet password with having to load wallet. (m2049r)
2017-08-15Merge pull request #2205Riccardo Spagni1-3/+11
c97d1bd3 wallet: return unlock_time in get_transfers (moneromooo-monero)
2017-08-05wallet2: fix temporarily missing incoming tx when being minedmoneromooo-monero1-1/+1
When scanning the txpool without having first updated the blockchain, the tx would be seen as neither in the txpool nor the chain, and removed, so it'd only reappear once the chain is refreshed, and the tx seen in a block.
2017-08-03Enable verifying wallet password with having to load wallet.m2049r1-0/+2
2017-08-02wallet2: add a is_synced functionmoneromooo-monero1-0/+2
2017-08-02wallet: return unlock_time in get_transfersmoneromooo-monero1-3/+11
also show it in simplewallet's show_transfer
2017-06-03Prevent crash if performing certain actions before wallet is initializedRobby Weinberg1-2/+3
2017-05-09Correct spelling of 'get_upper_transaction_size_limit'Nano Akron1-2/+2
2017-04-24wallet: add sweep_below functionmoneromooo-monero1-1/+1
It sweeps all outputs below the given threshold This is available via the existing sweep_all RPC, by setting amount_threshold the desired amount (in atomic units)
2017-04-11Resolve #92 add ability to create wallets thru RPCHoward Chu1-0/+3
Reviewed and squashed. Open/Create is only allowed if no walletfile was specified at startup.
2017-03-25wallet: option to merge destinationsmoneromooo-monero1-2/+5
With the change from the original transfer method to the new algorithm, payments to the same destination were merged. It seemed like a good idea, optimizing space. However, it is a useful tool for people who want to split large outputs into several smaller ones (ie, service providers making frequent payments, and who do not like a large chunk of their balance being locked for 10 blocks after each payment). Default to off, which is a change from the previous behavior.
2017-03-24wallet: try to save large outputs when using an unneeded second inputmoneromooo-monero1-2/+9
When a single input is enough to satisfy a transfer, the code would previously try to add a second input, to match the "canonical" makeup of a transaction with two inputs and two outputs. This would cause wallets to slowly merge outputs till all the monero ends up in a single output, which causes trouble when making two transactions one after the other, since change is locked for 10 blocks, and an increasing portion of the remaining balance would end up locked on each transaction. There are two new settings (min-output-count and min-output-value) which can control when to stop adding such unneeded second outputs. The idea is that small "dust" outputs will still get added, but larger ones will not. Enable with, eg: set min-output-count 10 set min-output-value 30 to avoid using an unneeded second output of 30 monero or more, if there would be less than 10 such outputs left. This does not invalidate any other reason why such outputs would be used (ie, when they're really needed to satisfy a transfer, or when randomly picked in the normal course of selection). This may be improved in the future.
2017-03-21Merge pull request #1903Riccardo Spagni1-1/+6
350e99ae wallet2: cache which pool txes were scanned already (moneromooo-monero)
2017-03-21wallet2: cache which pool txes were scanned alreadymoneromooo-monero1-1/+6
This massively speeds up the wallet updating the pool on mainnet, where the tx backlog is more than 500 txes.
2017-03-20wallet2: speed up transactions using remote nodesmoneromooo-monero1-0/+2
Asking for a full histogram from a remote node (since it's untrusted) is pretty slow, and spams the remote node, so we replace it by only adding a second input if we have rct ones, which are for all intents and purposes always mixable.
2017-03-15Add intervening v5 fork for increased min block sizemoneromooo-monero1-1/+2
Minimum mixin 4 and enforced ringct is moved from v5 to v6. v5 is now used for an increased minimum block size (from 60000 to 300000) to cater for larger typical/minimum transaction size. The fee algorithm is also changed to decrease the base per kB fee, and add a cheap tier for those transactions which we do not care if they get delayed (or even included in a block).
2017-03-06Merge pull request #1846Riccardo Spagni1-1/+1
4b48565c wallet: add password command (moneromooo-monero)
2017-03-05wallet: add password commandmoneromooo-monero1-1/+1
Also tweak wallet2 password code to verify password without saying it's a new wallet, because it's assuming things.
2017-03-04wallet: fix get_tranfers with multiple incoming txes with same pidmoneromooo-monero1-3/+13
2017-03-03Merge pull request #1826Riccardo Spagni1-0/+2
2c468dd4 allow user I/O in millinero, micronero, nanonero, piconero (moneromooo-monero)
2017-03-02allow user I/O in millinero, micronero, nanonero, piconeromoneromooo-monero1-0/+2
2017-02-27Add support for the wallet to refresh pruned blocksmoneromooo-monero1-7/+7
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-11Merge pull request #1689Riccardo Spagni1-2/+5
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11Merge pull request #1686Riccardo Spagni1-1/+1
bceaf4b7 wallet2: fix transactions not considering rct inputs (moneromooo-monero)
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-4/+5
2017-02-06wallet2: fix transactions not considering rct inputsmoneromooo-monero1-1/+1
I broke this very recently in 2bf029be172a47ace8134143e1320fdb10d3ea44 and didn't notice in time
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett1-2/+5
2017-02-04Merge pull request #1640Riccardo Spagni1-2/+5
f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
2017-02-03simplewallet: option to always ask password for any crytical operationskenshi841-2/+5
2017-02-02Merge pull request #1629Riccardo Spagni1-5/+5
c02e1cb9 Updates to epee HTTP client code - http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed (Lee Clagett)
2017-01-25Updates to epee HTTP client codeLee Clagett1-5/+5
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-22Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz1-8/+8
2017-01-16wallet: add a node RPC cache layer for simple RPC callsmoneromooo-monero1-2/+4
Mostly getinfo and get_hard_fork_info, which are called pretty often. This speeds up transfers as a bonus.
2017-01-16wallet2: reuse fake outs when adjusting fee on transfermoneromooo-monero1-2/+5
This avoids indirectly leaking the real output to the daemon, and is faster. This will still happen for more complex cases, especially when cancelling a tx and "re-rolling" it.
2017-01-15Merge pull request #1569Riccardo Spagni1-0/+2
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-16specify restore height by YYYY-MM-DD formatkenshi841-0/+2
2017-01-16Change logging to easylogging++moneromooo-monero1-0/+4
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-15Merge pull request #1574Riccardo Spagni1-2/+2
d276a165 wallet2: use at least two rct inputs if possible (moneromooo-monero)
2017-01-14wallet2: use at least two rct inputs if possiblemoneromooo-monero1-2/+2
If we'd make a rct tx with just one input, we try to add a second one to match the 2/2 ideal. This means more txes use that template (and are thus using a larger anonymity set), and it coalesces outputs "for free". We use the smallest amount outputs in priority for this, so we can "clean" the wallet at the same time.
2017-01-14fix timeout in check_connectionJaquee1-1/+1
2017-01-13Merge pull request #1562Riccardo Spagni1-0/+2
a081b39c Move key image export/import functions to wallet2 (Jaquee)
2017-01-13Merge pull request #1559Riccardo Spagni1-0/+1
db56a03f Wallet2 + API: Callbacks for unconfirmed transfers (Jaquee)
2017-01-13Merge pull request #1541Riccardo Spagni1-0/+7
0d3918e1 Wallet api: Update trustedDaemon when daemon is changed (Jaquee) dbb838f4 GUI cold signing (Jaquee) afb85a02 Wallet API: functions for supporting/creating view only wallets (Jaquee)
2017-01-13Merge pull request #1540Riccardo Spagni1-0/+1
79b4e1f9 Cold signing: make sure short payment id isnt encrypted twice (Jaquee)
2017-01-13Merge pull request #1526Riccardo Spagni1-0/+1
5eed5b05 Wallet API: functions for supporting/creating view only wallets (Jaquee)
2017-01-13Move key image export/import functions to wallet2Jaquee1-0/+2
2017-01-12Wallet2 + API: Callbacks for unconfirmed transfersJaquee1-0/+1
2017-01-10GUI cold signingJaquee1-0/+7
fix conflict
2017-01-10Wallet API: functions for supporting/creating view only walletsJaquee1-0/+1
2017-01-10Wallet API: functions for supporting/creating view only walletsJaquee1-0/+1
2017-01-09wallet cli: print originating block heights of mixin keys when making transferkenshi841-2/+5
2017-01-08Merge pull request #1515Riccardo Spagni1-32/+49
ada7c7da portable serializer: tests added (kenshi84) f390a0e2 portable serializer: make signerd/unsigned tx portable, ignore archive version checking (kenshi84)
2017-01-08Cold signing: make sure short payment id isnt encrypted twiceJaquee1-0/+1
2017-01-03portable serializer: tests addedkenshi841-0/+3
2017-01-02portable serializer: make signerd/unsigned tx portable, ignore archive ↵kenshi841-32/+46
version checking
2016-12-21make openalias also available for solo miner; introduce namespace ↵kenshi841-4/+0
tools::dns_utils; support integrated address with dns lookup
2016-12-20Merge pull request #1472Riccardo Spagni1-0/+3
2bddb8eb Refactored password prompting for wallets (Lee Clagett)
2016-12-19Refactored password prompting for walletsLee Clagett1-0/+3
2016-12-16added experimental boost::archive::portable_binary_{i|o}archivekenshi841-4/+3
2016-12-14AddressBook: use unsigned type for row ID'sanonimal1-1/+1
Fixes build warnings and may also prevent future headaches.
2016-12-12addressbook updatesJaquee1-3/+3
2016-12-12GUI address bookJaquee1-1/+29
2016-12-09Fix sending outputs from a tx with more than one pubkeymoneromooo-monero1-1/+13
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-04Merge pull request #1398Riccardo Spagni1-1/+1
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04Merge pull request #1385Riccardo Spagni1-0/+3
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-04Merge pull request #1380Riccardo Spagni1-0/+2
657a70e0 wallet: add a getter for the filename path (moneromooo-monero)
2016-12-04Fix a few minor typosPierre Boyer1-1/+1
2016-11-28wallet: add API and RPC to create/parse monero: URIsmoneromooo-monero1-0/+3
2016-11-26wallet: add a getter for the filename pathmoneromooo-monero1-0/+2
2016-11-26Improve daemon RPC version handlingmoneromooo-monero1-1/+1
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-24Merge pull request #1369Riccardo Spagni1-1/+7
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-23wallet2: fix wrong change being recorded for cold signed txesmoneromooo-monero1-1/+7
2016-11-19wallet: fix exporting outputs and key images with txes with two pubkeysmoneromooo-monero1-0/+1
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-17Merge pull request #1318Riccardo Spagni1-1/+4
4fca34d Wallet2: calculate approximate blockchain height on offline creation (Jacob Brydolf)
2016-11-16wallet: auto sync outputs and key images in cold signing filesmoneromooo-monero1-1/+20
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-13wallet: fix serialization of new m_key_image_known membermoneromooo-monero1-2/+16
2016-11-13Wallet2: calculate approximate blockchain height on offline creationJacob Brydolf1-1/+4
Wallet API: add approximateBlockChainHeight()
2016-11-10Created monero-wallet-rpc, moving functionality from monero-wallet-cliLee Clagett1-0/+19
2016-11-09Merge pull request #1305Riccardo Spagni1-2/+22
c80f4d4 wallet: fix output collision detection for view wallets (moneromooo-monero)
2016-11-08Merge pull request #1306Riccardo Spagni1-0/+6
8aba0d4 wallet: encrypt outputs and key images files with the view key (moneromooo-monero)
2016-11-08Merge pull request #1285Riccardo Spagni1-1/+1
a970a4e refresh speedup (luigi1111)
2016-11-08Merge pull request #1276Riccardo Spagni1-0/+2
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/+6
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-2/+22
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-2/+24
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-1/+1
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 #1281Riccardo Spagni1-0/+3
bb560dd wallet: new import_outputs/export_outputs commands (moneromooo-monero)
2016-10-31wallet: use the dynamic per kB feemoneromooo-monero1-0/+2
2016-10-30wallet: new import_outputs/export_outputs commandsmoneromooo-monero1-0/+3
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-0/+1
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/+1
This is on the potentially compromised wallet, but still guards against stupid mistakes.
2016-10-25wallet: fix pre-rct cold wallet signing not splitting changemoneromooo-monero1-3/+6
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-22Merge pull request #1225Riccardo Spagni1-2/+2
04da979 Always confirm transfers defaults to ON/YES (NanoAkron)