Commit graph

86 commits

Author SHA1 Message Date
moneromooo-monero b8a08f199a
wallet: fix --log-file not working 2017-02-28 09:07:56 +00:00
moneromooo-monero ada6a8a2de
wallet_rpc_server: new --trusted-daemon flag
and remove trusted_daemon fields from transfer RPCs,
it is much friendlier on users
2017-02-24 18:20:14 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
moneromooo-monero 83ec209f42
simplewallet: validate hex input size 2017-02-14 19:45:46 +00:00
Riccardo Spagni eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
moneromooo-monero 4f5b130de9
wallet_rpc_server: add address book RPC calls 2017-02-04 11:40:49 +00:00
Riccardo Spagni 614400e5af
Merge pull request #1643
69d2ad39 wallet_rpc_server: fix logs going to the wrong file (moneromooo-monero)
2017-02-02 21:26:56 +02:00
moneromooo-monero 8c8482ac98
wallet_rpc_server: fix short payment id validation in transfer 2017-01-29 16:10:20 +00:00
moneromooo-monero 69d2ad3967
wallet_rpc_server: fix logs going to the wrong file 2017-01-28 11:37:21 +00:00
moneromooo-monero d86ae2bec6
wallet2: reuse fake outs when adjusting fee on transfer
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-16 08:59:08 +00:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
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-16 00:25:46 +00:00
Lee Clagett d81cb08704 Added (not yet enabled) HTTP client authentication 2017-01-11 03:21:17 -05:00
moneromooo-monero 19c4041df5
wallet_rpc_server: new RPC call to get a transfer by txid 2017-01-08 13:16:22 +00:00
Lee Clagett 2bddb8ebee Refactored password prompting for wallets 2016-12-19 20:00:43 -05:00
Lee Clagett 427054c3d5 Enabled HTTP auth support for monero-wallet-rpc 2016-12-16 23:59:46 -05:00
Lee Clagett 18462aa065 Added confirmation before binding wallet-rpc to external IP 2016-12-05 21:45:11 -05:00
Riccardo Spagni f2ea2afb77
Merge pull request #1398
f4772bae Fix a few minor typos (Pierre Boyer)
2016-12-04 22:28:22 +02:00
Pierre Boyer f4772bae81 Fix a few minor typos 2016-12-04 14:13:54 +01:00
moneromooo-monero 82ba2108e9
wallet: add API and RPC to create/parse monero: URIs 2016-11-28 17:54:22 +00:00
moneromooo-monero 4eb7347fdd
wallet: return fee in transfer RPC 2016-11-16 18:56:45 +00:00
Lee Clagett 358e068e87 Created monero-wallet-rpc, moving functionality from monero-wallet-cli 2016-11-10 16:39:27 -05:00
moneromooo-monero eeb2bbc0fc
epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
2016-09-18 20:32:02 +01:00
moneromooo-monero 9c7b0cb28e
wallet: change priority/fee to ArticMine's recommendation
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-16 11:50:52 +01:00
moneromooo-monero adca903589
wallet_rpc_server: return payment id in make_integrated_address RPC
It is useful, especially when requesting a random one
2016-08-29 12:18:22 +01:00
moneromooo-monero d4b62a1e29
rct amount key modified as per luigi1111's recommendations
This allows the key to be not the same for two outputs sent to
the same address (eg, if you pay yourself, and also get change
back). Also remove the key amounts lists and return parameters
since we don't actually generate random ones, so we don't need
to save them as we can recalculate them when needed if we have
the correct keys.
2016-08-28 21:30:19 +01:00
moneromooo-monero a47ceee83b
wallet: do not store signatures in the wallet cache
Saves some substantial space.
Also avoid calculating tx hashes we don't need.
2016-08-28 21:30:10 +01:00
moneromooo-monero 1303cda646
wallet: always use new algorithm for RPC transfers
This ensures we get rct transactions when appropriate
2016-08-28 21:30:03 +01:00
moneromooo-monero c27194a444
wallet: do not try to use rct txes a few blocks before the fork 2016-08-28 21:29:53 +01:00
moneromooo-monero e81a2b2cfa
port get_tx_key/check_tx_key to rct 2016-08-28 21:29:24 +01:00
moneromooo-monero dc4aad7eb5
add rct to the protocol
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
2016-08-28 21:28:37 +01:00
moneromooo-monero ebf97d76f0
wallet: new {ex,im}port_key_images commands and RPC calls
They are used to export a signed set of key images from a wallet
with a private spend key, so an auditor with the matching view key
may see which of those are spent, and which are not.
2016-07-24 09:23:30 +01:00
moneromooo-monero b89b96394a
wallet: add unconfirmed incoming txes from the txpool
Shown in show_transfers simplewallet command, and get_transfers
RPC command, if req.pool is true.
2016-07-20 19:14:44 +01:00
Riccardo Spagni 07f1d4e04d
Merge pull request #899
a95a2cb wallet_rpc_server: add payment id from integrated addresses to extra (moneromooo-monero)
2016-07-20 13:52:54 +02:00
moneromooo-monero 89d9f382a0
wallet: add command and RPC to sign/verify data
Signing is done using the spend key, since the view key may
be shared. This could be extended later, to let the user choose
which key (even a per tx key).
simplewallet's sign/verify API uses a file. The RPC uses a
string (simplewallet can't easily do strings since commands
receive a tokenized set of arguments).
2016-07-19 20:39:03 +01:00
moneromooo-monero a95a2cbc4d
wallet_rpc_server: add payment id from integrated addresses to extra 2016-07-10 13:46:18 +01:00
moneromooo-monero 945c272f6c
wallet: add a fee multiplier
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-06-22 22:21:30 +01:00
moneromooo-monero 5dc09f2666
wallet_rpc_server: fix some string values being returned between <> 2016-06-19 17:52:46 +01:00
moneromooo-monero 09dddf281a
wallet: add a filter_by_height field to get_transfers
It allows a simple get_transfers (with default 0 min_height and
max_height) to return all transactions, instead of the unexpected
set of txes in block 0, which is probably none at all.
2016-04-27 23:43:39 +01:00
moneromooo-monero 48ab3f93ff
wallet: add get_transfers rpc call
Allows getting in, out, pending, and failed transfers, similarly
to the show_transfers command.
2016-04-26 22:39:52 +01:00
moneromooo-monero 7baed9bd89
wallet: allow attaching notes to txids 2016-04-26 19:07:33 +01:00
moneromooo-monero b0850a9bea
wallet: add a new sweep_all command and RPC command
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-19 21:20:27 +01:00
moneromooo-monero 48d0747d00
wallet: better output selection for transfer/transfer_new
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-02 14:17:02 +01:00
moneromooo-monero 0be6e08dd0
wallet: do not leak owned amounts to the daemon unless --trusted-daemon
This will be slower, though more private.

New trusted_daemon parameter to the matching RPC call, false by default.
2016-03-26 23:29:29 +00:00
moneromooo-monero 12146daeed
wallet: change sweep_dust to sweep_unmixable
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-26 21:15:47 +00:00
moneromooo-monero 8bc1bd6b65
wallet: use minimum mixin when RPC asks for too low mixin
After the fork, normal transfer functions called via RPC
use the minimum mixin 2 if 0 or 1 is requested. While the
incoming transaction may be valid (eg, it has an unmixable
and at most a mixable input), it is a simple way to make
sure RPC users can't get a seemingly random accept/reject
behavior if they don't update their requested mixin.
2016-03-11 21:32:16 +00:00
luigi1111 e2b7e55be6 get_payments short ID
Add support for short/integrated/encrypted IDs to get_payments RPC
2016-03-05 13:30:48 -06:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero bc8a52efd8
wallet: add a rescan_bc command and rescan_blockchain RPC
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-30 15:06:03 +00:00