Commit Graph

208 Commits

Author SHA1 Message Date
moneromooo-monero
e36f5b6021
Match surae's recommendation to derive multisig keys 2017-12-17 16:12:32 +00:00
moneromooo-monero
265290388b
wallet: guard against partly initialized multisig wallet 2017-12-17 16:12:18 +00:00
moneromooo-monero
66e34e85b1
add multisig core test and factor multisig building blocks 2017-12-17 16:12:15 +00:00
moneromooo-monero
f4eda44ce3
N-1/N multisig 2017-12-17 16:12:12 +00:00
moneromooo-monero
cd64c7990c
multisig address generation RPC 2017-12-17 16:12:09 +00:00
moneromooo-monero
fff871a455
gen_multisig: generates multisig wallets if participants trust each other 2017-12-17 16:12:06 +00:00
moneromooo-monero
4c313324b1
Add N/N multisig tx generation and signing
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-17 16:11:57 +00:00
Dmitriy Plekhanov
b60f48f0e3
return subaddress in get_bulk_payments 2017-12-08 18:45:53 +03:00
moneromooo-monero
3dffe71b72
new wipeable_string class to replace std::string passphrases 2017-11-27 22:25:57 +00:00
Riccardo Spagni
4c90d638bc
Merge pull request #2823
0d149f70 Add out-of-bound exceptions and handle them in RPC (Michał Sałaban)
2017-11-25 19:53:12 +02:00
Riccardo Spagni
539f511eb1
Merge pull request #2368
b0b7e0f0 Spend proof without txkey (stoffu)
2017-11-25 19:48:56 +02:00
Riccardo Spagni
d80a3e5c38
Merge pull request #2788
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-25 19:47:05 +02:00
moneromooo-monero
9739da1e84
wallet_rpc_server: new relay_tx command
It takes a full tx+metadata hex string as input
2017-11-24 14:03:55 +00:00
moneromooo-monero
01dc829784
wallet: transfer RPC can now return tx metadata (pending_tx) 2017-11-24 14:03:52 +00:00
stoffu
b0b7e0f09a
Spend proof without txkey 2017-11-21 16:49:16 +09:00
stoffu
be1c01298a
fix for tx proof: use exception instead of error_str when signature gen failed 2017-11-21 16:48:22 +09:00
Riccardo Spagni
8d9e4920fc
Merge pull request #2768
ef941855 Wallet RPC: Add prompt-for-password flag (Tim L)
2017-11-20 12:08:31 +09:00
stoffu
998777ecd7
Tx proof (revised):
- 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-18 20:44:27 +09:00
Tim L
ef941855ae Wallet RPC: Add prompt-for-password flag 2017-11-15 13:21:55 -05:00
Michał Sałaban
0d149f708f Add out-of-bound exceptions and handle them in RPC 2017-11-15 16:35:14 +01:00
stoffu
c4587e83f8
simplewallet: wrong ns for input_line in sweep_single (fix #2634) 2017-11-15 20:45:58 +09:00
stoffu
b738f4b59d
wallet: add sweep_single command 2017-11-15 17:51:54 +09:00
Howard Chu
987eb662bf
More missed readline dependencies thru scoped_message_writer 2017-11-14 22:43:52 +00:00
moneromooo-monero
437421ce42
wallet: move some scoped_message_writer calls from the libs 2017-11-14 17:06:29 +00:00
moneromooo-monero
e89994e98f
wallet: rejig to avoid prompting in wallet2
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-14 17:06:26 +00:00
Riccardo Spagni
f48aeab5c4
Merge pull request #2756
0bf09154 Fix file permission issue (Tim L)
2017-11-14 16:02:28 +02:00
moneromooo-monero
da8b60cbbf
simplewallet: reject attempts to use too low mixin early
This yields a clear error message rather then some possibly
confusing more technical errors down the line
2017-11-14 13:12:39 +00:00
moneromooo-monero
ccf53a566c
track double spending in the txpool
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-06 00:05:44 +00:00
Riccardo Spagni
3dd31d33fa
Merge pull request #2605
b370ef54 Wallet: Descriptions through new commands 'set_description', 'get_description' (rbrunner7)
2017-11-06 01:56:06 +02:00
Tim L
0bf0915446 Fix file permission issue
This branch fixes a file permission issue introduced by 69c37200aa
2017-11-03 11:27:50 -04:00
Riccardo Spagni
54463b33b3
Merge pull request #2723
69c37200 RPC Add cross origin resource sharing support (Tim L)
2017-10-31 20:38:38 +02:00
Tim L
69c37200aa RPC Add cross origin resource sharing support 2017-10-30 13:55:56 -04:00
Michał Sałaban
fab3b7221b Add more specific RPC error codes 2017-10-23 04:27:02 +02:00
rbrunner7
b370ef54b9 Wallet: Descriptions through new commands 'set_description', 'get_description' 2017-10-16 22:24:09 +02:00
Vasil Dimov
4d35ad7603
Fix compiler warnings with Clang 6.0.0.
monero/src/cryptonote_protocol/block_queue.cpp:208:44: error:
      suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  static const boost::uuids::uuid uuid0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           {                                          }

monero/src/wallet/wallet_rpc_server.cpp:1895:43: error:
      lambda capture 'wal' is not used [-Werror,-Wunused-lambda-capture]
  tools::signal_handler::install([&wrpc, &wal](int) {
                                          ^

monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:40: error:
      lambda capture 'arg' is not used [-Werror,-Wunused-lambda-capture]
    m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections...
                                       ^

monero/src/cryptonote_protocol/cryptonote_protocol_handler.inl:1616:46: error:
      lambda capture 'fluffy_arg' is not used [-Werror,-Wunused-lambda-capture]
    m_p2p->for_each_connection([this, &arg, &fluffy_arg, &exclude_context, &fullConnections...
                                             ^

monero/src/blockchain_utilities/blockchain_export.cpp:181:3: error:
      bool literal returned from 'main' [-Werror,-Wmain]
  CHECK_AND_ASSERT_MES(r, false, "Failed to initialize source blockchain storage");
  ^                       ~~~~~
monero/contrib/epee/include/misc_log_ex.h:180:97: note:
      expanded from macro 'CHECK_AND_ASSERT_MES'
  ...fail_ret_val, message)   do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0)
                                                                  ^      ~~~~~~~~~~~~
monero/src/blockchain_utilities/blockchain_export.cpp:195:3: error:
      bool literal returned from 'main' [-Werror,-Wmain]
  CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data");
  ^                       ~~~~~
monero/contrib/epee/include/misc_log_ex.h:180:97: note:
      expanded from macro 'CHECK_AND_ASSERT_MES'
  ...fail_ret_val, message)   do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0)
                                                                  ^      ~~~~~~~~~~~~
2017-10-15 22:02:24 +03:00
Riccardo Spagni
71253c1dcd
Merge pull request #2592
dc19659d Remove network_address_base which has been merged with ipv4_network_address in 8b006877 (Michał Sałaban)
2183ade0 Don't try to create wallet-dir when it's not given, don't crash if wallet-dir already exists. (Michał Sałaban)
2017-10-15 18:39:13 +02:00
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Michał Sałaban
2183ade0c4 Don't try to create wallet-dir when it's not given, don't crash if wallet-dir already exists. 2017-10-07 02:04:33 +02:00
moneromooo-monero
5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00
Riccardo Spagni
c2346c6c59
Merge pull request #2424
28b72b6e tx_pool: pre-init tvc.m_verifivation_failed before processing (moneromooo-monero)
50a629b2 core_tests: catch (impossible in practice) tx extra api failure (moneromooo-monero)
fee15ef1 wallet2: catch failure to parse address (moneromooo-monero)
1399e26d net_peerlist: remove dead code (moneromooo-monero)
50e09698 tx_pool: guard against failure getting tx hash (moneromooo-monero)
54cc209a wallet_rpc_server: catch failure to create directory (moneromooo-monero)
3e55099c wallet_rpc_server: init m_vm to NULL in ctor (moneromooo-monero)
7d0dde5e wallet_args: remove redundant default value for --log-file (moneromooo-monero)
ed4a3350 wallet2: catch failure to save keys file (moneromooo-monero)
44434c8a wallet2_api: check whether dynamic_cast returns NULL (moneromooo-monero)
92f2f687 core: check return value from parse_hexstr_to_binbuff (moneromooo-monero)
5475692e wallet2_api: remove an unused, uninitialized, field (moneromooo-monero)
a7ba3de1 libwallet_api_tests: initialize newblock_triggered on reset (moneromooo-monero)
b2763ace wallet2_api: init error code to "no error" in the ctor (moneromooo-monero)
b5faac53 get_blockchain_top now returns void (moneromooo-monero)
2e44d8f2 wallet_rpc_server: guard against exceptions (moneromooo-monero)
4230876b simplewallet: guard against I/O exceptions (moneromooo-monero)
06c1e057 daemon: initialize decode_as_json in RPC request (moneromooo-monero)
11f71af5 http_base: init size_t in http_request_info ctor (moneromooo-monero)
2017-09-25 16:52:27 +02:00
Riccardo Spagni
5953724f69
Merge pull request #2443
ffe27127 wallet_rpc_server: fix index for newly added address book entry (moneromooo-monero)
2017-09-25 16:51:07 +02:00
moneromooo-monero
54cc209a5e
wallet_rpc_server: catch failure to create directory
CID 175281
2017-09-25 15:48:39 +01:00
moneromooo-monero
3e55099cb2
wallet_rpc_server: init m_vm to NULL in ctor
CID 175279
2017-09-25 15:48:36 +01:00
moneromooo-monero
2e44d8f23c
wallet_rpc_server: guard against exceptions
CID 175305
2017-09-25 15:48:10 +01:00
moneromooo-monero
ffe2712726
wallet_rpc_server: fix index for newly added address book entry 2017-09-13 11:02:06 +01:00
Lee Clagett
9c83f8063d Do not create file when RPC user/pass is given and use file locking 2017-08-30 17:39:59 -04:00
Riccardo Spagni
9e6bcbc014
Merge pull request #2286
8655ba04 wallet_rpc_server: adjust small ring sizes to 5 for v6 (moneromooo-monero)
2017-08-15 20:55:30 +02:00
Riccardo Spagni
a861cbb465
Merge pull request #2279
359517c7 wallet_rpc_server: fix possible privacy leak in on_import_key_images() (Jaquee)
20495b27 simplewallet: fix possible privacy leak in import_key_images() (Jaquee)
2017-08-15 20:53:58 +02:00
Riccardo Spagni
68ccc10b29
Merge pull request #2205
c97d1bd3 wallet: return unlock_time in get_transfers (moneromooo-monero)
2017-08-15 20:44:44 +02:00
moneromooo-monero
8655ba04ba
wallet_rpc_server: adjust small ring sizes to 5 for v6 2017-08-12 12:59:06 +01:00
Jaquee
359517c7f5 wallet_rpc_server: fix possible privacy leak in on_import_key_images() 2017-08-11 11:18:21 +02:00
moneromooo-monero
61770ec2da
change mixin to ring size in user visible places 2017-08-07 21:12:27 +01:00
Riccardo Spagni
f5be5b7e7b
Merge pull request #2210
cb0b5594 Move OpenAlias console input back from libs (moneromooo-monero)
2017-08-07 15:09:45 +02:00
moneromooo-monero
c97d1bd3d4
wallet: return unlock_time in get_transfers
also show it in simplewallet's show_transfer
2017-08-02 10:15:27 +01:00
moneromooo-monero
cb0b559451
Move OpenAlias console input back from libs
Library code should definitely not ask for console input unless
it's clearly an input function. Delegating the user interaction
part to the caller means it can now be used by a GUI, or have a
decision algorithm better adapted to a particular caller.
2017-07-27 11:30:13 +01:00
moneromooo-monero
dc0b312f8a
wallet_rpc_server: optionally return tx blobs on transfer calls
also add do_not_relay flag to them, so it now becomes possible
to create a tx without sending it yet
2017-07-26 10:33:04 +01:00
Riccardo Spagni
218f1a1d69
Merge pull request #2125
f98bf48b Minor cleanup: tab vs. space + logs messages (binaryFate)
2017-07-03 12:30:46 +02:00
Riccardo Spagni
645c898e2d
Merge pull request #2121
5a09d79c Fix #2120: return per-tx amount in transfer_split RPC call. (binaryFate)
2017-07-03 12:28:56 +02:00
binaryFate
f98bf48b1d Minor cleanup: tab vs. space + logs messages 2017-06-26 12:30:14 +02:00
binaryFate
5a09d79caf Fix #2120: return per-tx amount in transfer_split RPC call. 2017-06-26 12:22:12 +02:00
Mike C
b592cb3f0a Fix on_transfer RPC incorrect logging info 2017-06-23 11:54:10 -04:00
moneromooo-monero
6df83b3efb
wallet: add sweep_below function
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-24 19:50:37 +01:00
Howard Chu
110b683152
Resolve #92 add ability to create wallets thru RPC
Reviewed and squashed. Open/Create is only allowed if no walletfile
was specified at startup.
2017-04-11 01:22:44 +01:00
stoffu
8bbcbcfb0d
wallet rpc: enable solo mining 2017-03-20 09:47:16 +09:00
kenshi84
df810a8250
wallet-rpc bugfix: get_transfer_by_txid previously checking against payment id 2017-03-19 17:45:39 +09:00
Riccardo Spagni
a6f1959d1c
Merge pull request #1884
e9175cec wallet_rpc_server: make a few RPCs unavailable in restricted mode (moneromooo-monero)
2017-03-18 20:30:50 +02:00
Riccardo Spagni
f33a696ec7
Merge pull request #1883
d0238313 use const references in catch blocks (moneromooo-monero)
2017-03-18 20:30:19 +02:00
Riccardo Spagni
9aac64c238
Merge pull request #1882
3fa59755 wallet2: call is_key_image_spent in blocks in rescan_spent (moneromooo-monero)
9d134e86 wallet_rpc_server: add a rescan_spent RPC (moneromooo-monero)
2017-03-18 20:29:22 +02:00
moneromooo-monero
e9175cec07
wallet_rpc_server: make a few RPCs unavailable in restricted mode
Address book modification, setting tx nodes, importing key images
2017-03-18 13:01:53 +00:00
moneromooo-monero
d023831327
use const references in catch blocks 2017-03-18 12:56:07 +00:00
moneromooo-monero
9d134e8647
wallet_rpc_server: add a rescan_spent RPC 2017-03-18 12:04:17 +00:00
stoffu
250c4cb3e0
wallet-rpc: enable openalias 2017-03-17 10:42:10 +09:00
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