summaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* wallet: option to merge destinationsmoneromooo-monero2017-03-251-4/+10
| | | | | | | | | | | | 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.
* wallet: try to save large outputs when using an unneeded second inputmoneromooo-monero2017-03-241-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* core, wallet: faster tx pool scanningmoneromooo-monero2017-03-231-78/+83
| | | | Includes a new RPC to get tx pool hashes fast.
* Merge pull request #1903Riccardo Spagni2017-03-211-1/+20
|\ | | | | | | 350e99ae wallet2: cache which pool txes were scanned already (moneromooo-monero)
| * wallet2: cache which pool txes were scanned alreadymoneromooo-monero2017-03-211-1/+20
| | | | | | | | | | This massively speeds up the wallet updating the pool on mainnet, where the tx backlog is more than 500 txes.
* | Merge pull request #1899Riccardo Spagni2017-03-211-4/+40
|\ \ | |/ |/| | | c1e9ccc7 wallet2: speed up transactions using remote nodes (moneromooo-monero)
| * wallet2: speed up transactions using remote nodesmoneromooo-monero2017-03-201-4/+40
| | | | | | | | | | | | | | 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.
* | wallet2: start using new fee priorities at v5, not 14 days laermoneromooo-monero2017-03-201-1/+1
|/ | | | | Waiting would mean the fee used is 1x base, but the base will have suddenly dropped
* wallet2: call is_key_image_spent in blocks in rescan_spentmoneromooo-monero2017-03-181-20/+23
| | | | This is a potentially long lasting daemon RPC call
* Add intervening v5 fork for increased min block sizemoneromooo-monero2017-03-151-14/+35
| | | | | | | | | | 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).
* Merge pull request #1846Riccardo Spagni2017-03-061-2/+2
|\ | | | | | | 4b48565c wallet: add password command (moneromooo-monero)
| * wallet: add password commandmoneromooo-monero2017-03-051-2/+2
| | | | | | | | | | Also tweak wallet2 password code to verify password without saying it's a new wallet, because it's assuming things.
* | Revert "wallet: fix insertion of pool transactions"moneromooo-monero2017-03-041-1/+1
|/ | | | | | | | | This reverts commit d47dac9a88ddd46b88850a899311363b3261c89e. Callers actually expect the key to be payment id, so this needs a lot more changes (like storing payment ids in the structure, and possibly also to other existing structures which do the same thing).
* use txid in wallet2::process_new_transaction()Jaquee2017-03-031-1/+1
|
* Merge pull request #1826Riccardo Spagni2017-03-031-0/+15
|\ | | | | | | 2c468dd4 allow user I/O in millinero, micronero, nanonero, piconero (moneromooo-monero)
| * allow user I/O in millinero, micronero, nanonero, piconeromoneromooo-monero2017-03-021-0/+15
| |
* | Merge pull request #1823Riccardo Spagni2017-03-031-1/+1
|\ \ | | | | | | | | | d47dac9a wallet: fix insertion of pool transactions (moneromooo-monero)
| * | wallet: fix insertion of pool transactionsmoneromooo-monero2017-02-281-1/+1
| |/ | | | | | | They were inserted using payment id as key, not txid
* | Add support for the wallet to refresh pruned blocksmoneromooo-monero2017-02-271-42/+56
| |
* | wallet: invalidate node proxy cache when reconnectingmoneromooo-monero2017-02-271-0/+1
|/
* add rpc timeouts to calls that might timeoutRiccardo Spagni2017-02-241-4/+4
|
* wallet2: fix wrong status on daemon shutdown/startupJaquee2017-02-231-1/+5
|
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-211-1/+1
|
* Merge pull request #1749Riccardo Spagni2017-02-211-5/+5
|\ | | | | | | 5a3b1e98 wallet2: fix failure to send (relatedness check in wrong case) (moneromooo-monero)
| * wallet2: fix failure to send (relatedness check in wrong case)moneromooo-monero2017-02-191-5/+5
| | | | | | | | | | | | A relatedness check was meant to be done in the case of adding an extra output if just one was enough. This was mistakenly added to the "preferred output" case.
* | simplewallet: validate hex input sizemoneromooo-monero2017-02-141-3/+3
|/
* Merge pull request #1689Riccardo Spagni2017-02-111-3/+18
|\ | | | | | | ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
| * Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett2017-02-061-3/+18
| |
* | Merge pull request #1686Riccardo Spagni2017-02-111-10/+10
|\ \ | | | | | | | | | bceaf4b7 wallet2: fix transactions not considering rct inputs (moneromooo-monero)
| * | wallet2: fix transactions not considering rct inputsmoneromooo-monero2017-02-061-10/+10
| | | | | | | | | | | | | | | I broke this very recently in 2bf029be172a47ace8134143e1320fdb10d3ea44 and didn't notice in time
* | | extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-081-2/+2
|/ /
* / wallet2::init() - disconnect before init if connectedJaquee2017-02-041-0/+2
|/ | | | Makes it possible for GUI to reinit with new daemon without closing and reopening wallet.
* Merge pull request #1640Riccardo Spagni2017-02-041-0/+6
|\ | | | | | | f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
| * simplewallet: option to always ask password for any crytical operationskenshi842017-02-031-0/+6
| |
* | Merge pull request #1652Riccardo Spagni2017-02-021-1/+1
|\ \ | | | | | | | | | fba9332d Changed console output for transaction from L0 to L1 (NanoAkron)
| * | Changed console output for transaction from L0 to L1NanoAkron2017-01-301-1/+1
| |/
* | Merge pull request #1647Riccardo Spagni2017-02-021-1/+2
|\ \ | | | | | | | | | 2bf029be wallet2: fix corner case failing to send a second output (moneromooo-monero)
| * | wallet2: fix corner case failing to send a second outputmoneromooo-monero2017-01-281-1/+2
| |/ | | | | | | | | | | | | | | | | If a rct transaction can be made with just one input, a second output will be added. This output will be the smallest amount output available. However, if this output is a non rct output with less available fake outs than requested, the transaction will be rejected. We now check the histogram to only consider outputs with enough available fake outs in the first place.
* | Merge pull request #1634Riccardo Spagni2017-02-021-3/+3
|\ \ | | | | | | | | | 99f58437 Fix invalid + of std::string and int (Timothy D. Prime)
| * | Fix invalid + of std::string and intTimothy D. Prime2017-01-261-3/+3
| |/ | | | | | | | | | | | | | | | | | | These warnings were emitted by clang++, and they are real bugs. src/rpc/core_rpc_server.cpp:208:58: warning: adding 'uint64_t' (aka 'unsigned long') to a string does not append to the string [-Wstring-plus-int] res.status = "Error retrieving block at height " + height; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ The obvious intent is achieved by using std::to_string().
* | Merge pull request #1629Riccardo Spagni2017-02-021-27/+20
|\ \ | | | | | | | | | 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)
| * | Updates to epee HTTP client codeLee Clagett2017-01-251-27/+20
| |/ | | | | | | | | | | | | | | - 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
* / Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz2017-01-221-23/+23
|/
* wallet2: fix sending a rct tx with a single output availablemoneromooo-monero2017-01-221-3/+50
| | | | | | | | | | | | This would have tried to send a second output to make the tx look like the 2/2 ideal, but it would not fail to find one because picking an output from preferred_inputs priority list did not remove it from the unused tranfer/dust outputs, so it would try to send the same output twice. While there, I also added a check to avoid sending a second input if it's related to the first. Better 1/2 than linking inputs, I think.
* wallet: add a node RPC cache layer for simple RPC callsmoneromooo-monero2017-01-161-77/+42
| | | | | Mostly getinfo and get_hard_fork_info, which are called pretty often. This speeds up transfers as a bonus.
* wallet2: reuse fake outs when adjusting fee on transfermoneromooo-monero2017-01-161-21/+45
| | | | | | | | 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.
* Merge pull request #1569Riccardo Spagni2017-01-151-0/+86
|\ | | | | | | 16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
| * specify restore height by YYYY-MM-DD formatkenshi842017-01-161-0/+86
| |
* | Change logging to easylogging++moneromooo-monero2017-01-161-3/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1561Riccardo Spagni2017-01-151-3/+3
|\ | | | | | | | | | | | | | | | | | | d561f4ad enable clang checks that were disabled (Chris Vickio) 0aefb2f6 remove std::move from return statements (pessimizing-move warning) (Chris Vickio) 629d5b76 change counter from bool to int (deprecated-increment-bool warning) (Chris Vickio) fb76d439 add extra braces around subobjects (missing-braces warning) (Chris Vickio) 3b6d5f25 make struct/class declarations consistent (mismatched-tags warning) (Chris Vickio) fcf66925 remove unused fields from network_throttle (unused-private-field warning) (Chris Vickio) 296f8c16 inline unused function (for unused-function warning) (Chris Vickio)