Commit Graph

633 Commits

Author SHA1 Message Date
Riccardo Spagni 59e8a4c306
Merge pull request #4753
157054b8 hardfork: initialize current_fork_index in ctor (moneromooo-monero)
2362baf7 network_throttle: initialize m_last_sample_time in ctor (moneromooo-monero)
d9400f69 serializtion: add missing mainnet and stagenet fields for 0mq (moneromooo-monero)
cbe0122b wallet2: initialize amount to 0 in tx_scan_info_t ctor (moneromooo-monero)
2018-11-14 21:33:02 +02:00
Riccardo Spagni 164ba3ef1c
Merge pull request #4731
f26ce08c wallet: add a non destructive blockchain rescan (moneromooo-monero)
2018-11-06 21:30:12 +02:00
Riccardo Spagni 1667d41064
Merge pull request #4728
1f35de23 simplewallet: display locked/unlocked state in show_transfers (moneromooo-monero)
2018-11-06 14:54:17 +02:00
moneromooo-monero 8d71b2b1b3
wallet2: only export necessary outputs and key images
and disable annoying test that requires ridiculous amounts
of skullduggery every time some format changes
2018-11-04 22:27:01 +00:00
moneromooo-monero f26ce08c8a
wallet: add a non destructive blockchain rescan 2018-11-03 15:04:37 +00:00
Dusan Klinec 29ffb6bba8
device/trezor: trezor support added 2018-11-02 21:36:39 +01:00
moneromooo-monero cbe0122bf1
wallet2: initialize amount to 0 in tx_scan_info_t ctor
It seems the more prudent thing to do here. It will not catch
attempts to use that value before it is initialized when using
ASAN or valgrind, but in a case where it does, it will have
smaller repercussions.

So it seems appropriate in this particular case.

Coverity 182498
2018-10-29 16:22:55 +00:00
moneromooo-monero 1f35de2300
simplewallet: display locked/unlocked state in show_transfers
it doesn't display the details, which are already displayed
in show_transfer
2018-10-25 23:02:42 +00:00
Riccardo Spagni e19652df51
Merge pull request #4036
9acf42d3 Multisig M/N functionality core tests added (naughtyfox)
9f3963e8 Arbitrary M/N multisig schemes: * support in wallet2 * support in monero-wallet-cli * support in monero-wallet-rpc * support in wallet api * support in monero-gen-trusted-multisig * unit tests for multisig wallets creation (naughtyfox)
2018-10-07 19:57:26 +02:00
naughtyfox 9f3963e823 Arbitrary M/N multisig schemes:
* support in wallet2
* support in monero-wallet-cli
* support in monero-wallet-rpc
* support in wallet api
* support in monero-gen-trusted-multisig
* unit tests for multisig wallets creation
2018-10-01 19:16:56 +03:00
moneromooo-monero 25e5890d37
wallet: fix --generate-from-json using wrong password 2018-10-01 12:32:26 +00:00
Riccardo Spagni 83d8f03c23
Merge pull request #4333
73403004 add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc} (moneromooo-monero)
2018-09-29 22:20:44 +02:00
Riccardo Spagni 9a54d0033e
Merge pull request #4458
921b0fb1 use default create_address_file argument (m2049r)
2018-09-29 22:20:35 +02:00
Riccardo Spagni 85110b42ab
Merge pull request #4401
66901901 README: harmonize command formatting inside README.md (Andrea)
8cd98408 disable AES on s390x architecture (Tuan M. Hoang)
4ed30bab wallet: implement coin splitting for sweep_* 'outputs' option (whythat)
24f52396 wallet: add 'outputs' option for sweep_* commands (whythat)
52e19d69 README: Compile boost with cxxflags=-fPIC cflags=-fPIC (Italocoin Project)
0c77523d README: fill in libsodium package name for Arch (phloatingman)
2018-09-21 20:46:22 +02:00
m2049r bce474be7d
query backing device 2018-09-19 18:25:38 +02:00
Riccardo Spagni b174527f1d
Merge pull request #4302
ba8dd347 api/wallet: properly disable key encryption (stoffu)
2018-09-18 17:31:35 +02:00
whythat 24f5239693
wallet: add 'outputs' option for sweep_* commands
'outputs' option allows to specify the number of
separate outputs of smaller denomination that will
be created by sweep operation.

rebased by moneromooo
2018-09-18 11:01:59 +00:00
stoffu ba8dd3479d
api/wallet: properly disable key encryption 2018-09-17 22:15:29 +09:00
Dusan Klinec f9b22a7b01
hw_device: support for multiple devices added [for review]
- device name is a new wallet property
- full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for.
- new --hw-device parameter added to the wallet, can name the hardware device
- device reconnect added
2018-09-14 16:02:00 +02:00
Riccardo Spagni d743994086
Merge pull request #4324
44259e56 wallet: ask-password can now ask without encrypting the secret spend key (moneromooo-monero)
2018-09-14 13:15:41 +02:00
moneromooo-monero 44259e560e
wallet: ask-password can now ask without encrypting the secret spend key 2018-09-14 11:14:21 +00:00
Riccardo Spagni dd2fc3afe3
Merge pull request #4332
20171746 wallet2: factor the creation of a new wallet keys file (moneromooo-monero)
be6acfd5 wallet2: factor new blockchain setup (moneromooo-monero)
2018-09-14 13:05:43 +02:00
Riccardo Spagni 239a7e10ff
Merge pull request #4253
be001326 remove obsolete daemon selection of fake outs and old tx construction (moneromooo-monero)
2018-09-14 12:54:25 +02:00
moneromooo-monero be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
Riccardo Spagni c74d9057f8
Merge pull request #4260
a54dbaee blockchain_blackball: add --force-chain-reaction-pass flag (moneromooo-monero)
44439c32 record blackballs as amount/offset, and add export ability (moneromooo-monero)
4bce935b blockchain_blackball: more optimizations (moneromooo-monero)
b66ba783 blockchain_blackball: do not process duplicate blockchains parts (moneromooo-monero)
639a3c01 blockchain_blackball: make it clear secondary passes are not incremental (moneromooo-monero)
eb8a51be blockchain_blackball: detect spent outputs by partial ring reuse (moneromooo-monero)
d6d276c6 blockchain_blackball: fix chain reaction phase in incremental mode (moneromooo-monero)
2b2a681b blockchain_blackball: avoid false positives for different amounts (moneromooo-monero)
80e4fef3 blockchain_blackball: set transaction looping txn to read only (moneromooo-monero)
4801d6b5 blockchain_blackball: add stats (moneromooo-monero)
846190fd blockchain_blackball: support pre-v2 databases (moneromooo-monero)
daa6cc7d blockchain_blackball: use LMDB for the cache (moneromooo-monero)
50cb370d ringdb: allow blackballing many outputs at once (moneromooo-monero)
2018-09-14 12:45:18 +02:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero 9ce9f8caf6
bulletproofs: add multi output bulletproofs to rct 2018-09-11 13:37:28 +00:00
moneromooo-monero 44439c3208
record blackballs as amount/offset, and add export ability 2018-09-10 09:04:18 +00:00
moneromooo-monero 20171746de
wallet2: factor the creation of a new wallet keys file 2018-09-03 11:27:46 +00:00
moneromooo-monero be6acfd5be
wallet2: factor new blockchain setup 2018-09-03 11:27:43 +00:00
stoffu 8ca1215f25
wallet: store trusted-daemon flag in wallet2 2018-08-23 14:55:09 +09:00
moneromooo-monero e9ffa91257
store secret keys encrypted where possible
The secret spend key is kept encrypted in memory, and
decrypted on the fly when needed.

Both spend and view secret keys are kept encrypted in a JSON
field in the keys file. This avoids leaving the keys in
memory due to being manipulated by the JSON I/O API.
2018-08-16 11:57:43 +00:00
moneromooo-monero ea37614efe
wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
stoffu a64f57fe42
wallet2: make --restricted-rpc available for wallet RPC only 2018-08-16 09:54:23 +09:00
luigi1111 8d2e454929
Merge pull request #4188
a3fe1c5 simplewallet: add set_tx_key for importing tx keys from 3rd party wallets (stoffu)
2018-08-15 17:47:05 -05:00
luigi1111 564e9c3b5f
Merge pull request #4170
1c6cfd3 wallet-rpc: add get_address_index command (stoffu)
2018-08-15 17:35:49 -05:00
luigi1111 5e795ee7af
Merge pull request #4153
37f0799 wallet: distinguish coinbase from other txes in show_transfers (moneromooo-monero)
2018-08-15 17:23:56 -05:00
luigi1111 017e07a035
Merge pull request #4103
bcab579 wallet: allow adjusting number of rounds for the key derivation function (stoffu)
2018-08-15 17:09:52 -05:00
luigi1111 4cde4cb946
Merge pull request #3528
34d4b79 wallet2: use a gamma distribution to pick fake outs (moneromooo-monero)
2018-08-15 17:00:32 -05:00
stoffu bcab579864
wallet: allow adjusting number of rounds for the key derivation function 2018-08-08 01:56:54 +09:00
moneromooo-monero 37f0799284
wallet: distinguish coinbase from other txes in show_transfers 2018-08-03 12:48:16 +00:00
stoffu 1c6cfd34f4
wallet-rpc: add get_address_index command 2018-07-31 21:36:12 +09:00
stoffu a3fe1c56ee
simplewallet: add set_tx_key for importing tx keys from 3rd party wallets 2018-07-30 20:50:05 +09:00
luigi1111 92b5d6c204
Merge pull request #4091
a4272de wallet2: unlock keys file before calling verify_password (needed for Windows) (stoffu)
2018-07-27 14:22:34 -05:00
luigi1111 5c102c60dc
Merge pull request #4087
d6440ab wallet2: recover from index out of hashchain bounds error (moneromooo-monero)
2018-07-19 14:14:10 -05:00
luigi1111 be81a27fa4
Merge pull request #4071
d6d78f1 Allow fractional outputs to be ignored (stoffu)
2018-07-19 14:06:54 -05:00
moneromooo-monero d6440ab319
wallet2: recover from index out of hashchain bounds error
This can happen when there's a very large reorg on the daemon
(ie, on testnet)
2018-07-16 23:13:56 +01:00
moneromooo-monero fc39d3b23c
wallet2: ensure outputs are processed only once
This should be proof against any way one might get to multiple
processing, such as generating the same derivation from the
same pubkey, etc
2018-07-08 12:56:51 +01:00
moneromooo-monero 34d4b798d4
wallet2: use a gamma distribution to pick fake outs
as per "An Empirical Analysis of Linkability in the Monero
Blockchain", by Miller et al.
2018-07-03 18:10:48 +01:00
stoffu a4272de797
wallet2: unlock keys file before calling verify_password (needed for Windows)
Also added notes to WalletManager::verifyWalletPassword (which afaik seems unused
by anyone at the moment) regarding the need to unlock the keys file beforehand.
2018-07-03 18:07:20 +09:00
stoffu d6d78f157b
Allow fractional outputs to be ignored 2018-07-03 18:04:31 +09:00
stoffu 3d623a86d1
wallet: prevent the same wallet file from being opened by multiple processes 2018-06-28 09:41:43 +09:00
luigi1111 2329d2f4c8
Merge pull request #3907
dcbc17e wallet: include a suggested number of confirmations based on amount (moneromooo-monero)
2018-06-27 16:32:33 -05:00
luigi1111 8a27caeb22
Merge pull request #3998
8db23df wallet: on first refresh, start off with a quantized height (moneromooo-monero)
2018-06-27 16:30:38 -05:00
luigi1111 5eb2e01216
Merge pull request #3991
798dfcf wallet: allow unspendable unmixable outputs to be discarded (stoffu)
2018-06-27 16:25:03 -05:00
moneromooo-monero dcbc17e97e
wallet: include a suggested number of confirmations based on amount
This is based on how much an attacking miner stands to lose in block
rewardy by mining a private chain which double spends a payment.
This is not foolproof, since mining is based on luck, and breaks
down as the attacking miner nears 50% of the network hash rate,
and the estimation is based on a constant block reward.
2018-06-27 21:38:21 +01:00
luigi1111 a844844cda
Merge pull request #3716
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-27 15:33:01 -05:00
moneromooo-monero 0e4c7d0fae
wallet2: cache ringdb key while refreshing
Speeds up syncing with a lot of outgoing outputs as key generation
runs Cryptonight.
2018-06-26 22:15:38 +01:00
moneromooo-monero 5d3e70229e
wallet2: remove old blockchain size cache hack 2018-06-26 22:15:18 +01:00
moneromooo-monero dcfd299239
wallet2: speedup refresh
key derivation and checking for incoming outputs are threaded
in batch before adding blocks to the local blockchain. Other
minor bits and bobs are also cached.
2018-06-26 22:15:16 +01:00
moneromooo-monero f025ae9760
wallet2: avoid re-parsing blocks when refreshing in a loop 2018-06-26 22:15:12 +01:00
moneromooo-monero ba8331ce41
wallet2: parse blocks in the RPC thread, not the processing thread
Processing typically is the bottleneck
2018-06-26 22:14:33 +01:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
luigi1111 506be80601
Merge pull request #3955
d7a6b72 wallet2: fix bulletproof cold signing (moneromooo-monero)
2018-06-25 15:09:48 -05:00
luigi1111 9226acca4b
Merge pull request #3804
89e51ec simple-wallet-cli: Add warnings about inaccurate balances to to watch-only wallet (jcktm)
2018-06-16 14:15:52 -05:00
luigi1111 4e7897e57c
Merge pull request #3780
9c2a7b4 wallet-rpc: watch-only and cold wallet features added (ph4r05)
2018-06-16 14:12:57 -05:00
moneromooo-monero 8db23df581
wallet: on first refresh, start off with a quantized height
for privacy reasons, so an untrusted node can't easily track
wallets from IP address to IP address, etc. The granularity
is 1024 blocks, which is about a day and a half.
2018-06-13 22:44:27 +01:00
stoffu 798dfcfe79
wallet: allow unspendable unmixable outputs to be discarded 2018-06-13 11:56:40 +09:00
luigi1111 00635bd68b
Merge pull request #3598
b21bc00 Wallet: added methods to sign and verify arbitrary message with multisig public signer's key (libwallet & wallet api) (naughtyfox)
2018-06-08 14:40:06 -05:00
moneromooo-monero d7a6b72c15
wallet2: fix bulletproof cold signing
Cold signing was always using Borromean range proofs, causing
a larger tx, and an incorrect fee
2018-06-07 12:29:30 +01:00
Dusan Klinec 9c2a7b4638 wallet-rpc: watch-only and cold wallet features added
- unsigned_txset, signed_txset in transfer / submit_transfer / sign_transfer
- export_outputs, import_outputs

Squashed commits:
[f4d9f3d4] wallet-rpc: do_not_relay removed from submit_transfer
[5b16a86f] wallet-rpc: review-fix - method signature changes, renaming
[b7fbb10a] wallet-rpc: naming fixes (unsigned vs signed), consts renamed
[8c7d2727] wallet-rpc: sign_transfer added
[481d024a] wallet2: sign_tx splitted to work with strings and structs, more granular
[2a474db9] wallet-rpc: wallet2::load_unsigned_tx split to load from str, file
[b1e3a018] wallet-rpc: review fix, load_tx_from_str variable rename
[1f6373be] wallet-rpc: review fix: save_tx_to_{str,file}
[2a08eafc] wallet-rpc: review comments fixes
- redundant this removed from wallet2.cpp
- load_tx_from_str, load_tx_from_file
[43498052] wallet-rpc: submit_transfer added
[9c45d1ad] wallet-rpc: watch_only check, return unsigned_txset
[62831396] wallet2: added string variants to load_tx, save_tx

- analogously to save_multisig_tx
- required for monero-wallet-rpc to support watch-only wallet
2018-06-03 13:21:00 +02:00
luigi1111 3a373c3d3a
Merge pull request #3489
47fdb74 WalletApi: getMultisigInfo entry for gui wallets... (naughtyfox)
47fdb74 Refactored: work with wallet api statuses to make setting and getting operations atomic along with error strings (naughtyfox)
2018-05-31 14:34:34 -05:00
luigi1111 5b189ce2a8
Merge pull request #3405
80d2f80 wallet2: Update function parameter documentation (leonklingele)
2018-05-29 12:52:43 -05:00
jcktm 89e51ecd38 simple-wallet-cli: Add warnings about inaccurate balances to to watch-only wallet 2018-05-15 15:28:42 +10:00
naughtyfox b21bc00704 Wallet: added methods to sign and verify arbitrary message with multisig public signer's key (libwallet & wallet api) 2018-04-25 17:55:54 +03:00
Riccardo Spagni 5d8439e310
Merge pull request #3534
eecfb57d wallet: warn if not using the default ring size (moneromooo-monero)
2018-04-12 13:47:20 +02:00
moneromooo-monero eecfb57df9
wallet: warn if not using the default ring size 2018-03-31 15:47:02 +01:00
naughtyfox 5a96056600 WalletApi: getMultisigInfo entry for gui wallets
WalletApi: makeMultisig call introduced

WalletApi: finalizeMultisig call introduced

WalletApi: new calls exportMultisigImages and importMultisigImages

WalletApi: method to return multisig wallet creation state

WalletApi: create multisig transaction, sign multisig transaction, commit transaction and get multisig data are added

WalletApi: identation and style fixes
2018-03-28 18:22:13 +03:00
moneromooo-monero 5730049178
wallet: catch exceptions dealing with ringdb and warn 2018-03-21 14:29:49 +00:00
moneromooo-monero 1e393f4bb7
wallet: make the segregation height settable
via user setting first, then DNS TXT record, hardcoded fallback
2018-03-17 14:56:31 +00:00
stoffu b86f1e5dad Add command line option allowing to restrict the default sub-address lookahead in order to avoid
so looooong time of set-up when creating a HW based wallet.
2018-03-16 18:00:28 +01:00
moneromooo-monero eac3a11ed3
wallet: more user friendly print_ring
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-16 12:07:45 +00:00
moneromooo-monero b09e5181cc
wallet: add a set_ring command
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-16 10:32:51 +00:00
moneromooo-monero db10dd6d83
wallet: make ringdb an object with database state 2018-03-16 10:32:42 +00:00
moneromooo-monero d29ea0455a
wallet: add an output blackball list to avoid using those in rings 2018-03-16 10:32:37 +00:00
moneromooo-monero 18eaf19489
wallet: key reuse mitigation options
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-16 10:32:34 +00:00
moneromooo-monero 5f146873c5
wallet: add shared ring database
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-16 10:32:29 +00:00
moneromooo-monero 41f727ce42
add RPC to get a histogram of outputs of a given amount 2018-03-16 10:32:26 +00:00
stoffu a7266d6d7b
wallet2+cli+rpc: eliminate redundant m_http_client from cli/rpc and delegate calls to wallet2 2018-03-15 22:01:51 +09:00
Leon Klingele 80d2f8007c
wallet2: Update function parameter documentation
This completes and fixes various parameters docs
2018-03-14 16:41:24 +01:00
Riccardo Spagni 3bc2537f5a
Merge pull request #3369
1979d53d wallet: fixes and tweaks to the save_watch_only command (moneromooo-monero)
2018-03-14 13:37:14 +02:00
Leon Klingele 649a1b7ae6
wallet2 / simplewallet: Must opt-in to create '.address.txt' files for new 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-10 16:28:23 +01:00
moneromooo-monero 1979d53d78
wallet: fixes and tweaks to the save_watch_only command
- 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-07 14:24:14 +00:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
cslashm e745c1e38d Code modifications to integrate Ledger HW device into monero-wallet-cli.
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-03-04 12:54:53 +01:00
Riccardo Spagni cfa3af4078
Merge pull request #3247
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero)
f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-20 17:46:40 +02:00
moneromooo-monero 89ad162a3f
wallet2: remove unused m_subaddresses_inv 2018-02-16 17:13:09 +00:00
moneromooo-monero f2c4c39971
wallet2: speed up subaddress generation (by about a third) 2018-02-16 17:13:06 +00:00
Riccardo Spagni 82599ef0e3
Merge pull request #3175
3be98036 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero. (Maximilian Lupke)
2018-02-16 14:19:24 +01:00
stoffu 30c44bce06
wallet: automatically use low priority if safe (no backlog & recent blocks not full) 2018-01-28 11:04:52 +09:00
moneromooo-monero 2f5a9b6bb3
wallet2: split estimate_backlog to allow for raw fee levels 2018-01-28 10:52:16 +09:00
Riccardo Spagni 5603d5aaea
Merge pull request #3141
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-27 17:25:15 -08:00
Riccardo Spagni e1ba5b95c1
Merge pull request #3118
ca336c62 simplewallet: check file overwrite when exporting stuff (stoffu)
2018-01-27 17:24:34 -08:00
Riccardo Spagni 73a19e0b06
Merge pull request #3113
ffc2e570 wallet rpc: show fees when querying incoming transfers (stoffu)
2018-01-27 17:24:15 -08:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
stoffu 3160a93027
wallet2: remove {set|get}_default_decimal_point and use the same funcs under cryptonote:: instead 2018-01-26 10:59:32 +09:00
stoffu 7d1088d337
wallet2: make scan_output const and omit keys arg 2018-01-26 10:59:31 +09:00
stoffu bc1ee2c2ee
wallet2: make member functions const when possible 2018-01-26 10:59:30 +09:00
stoffu ffc2e5705d
wallet rpc: show fees when querying incoming transfers 2018-01-26 10:58:23 +09:00
stoffu ca336c62e3
simplewallet: check file overwrite when exporting stuff 2018-01-26 10:57:13 +09:00
Maximilian Lupke 3be98036e7 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero.
Fixes #3080
2018-01-24 18:01:08 +01:00
stoffu 6d40a92026
Reserve proof 2018-01-10 20:37:18 +09:00
Riccardo Spagni eb617be8f4
Merge pull request #2960
5cbcf0aa wallet: support for multisig seeds (moneromooo-monero)
2018-01-02 00:29:36 +02:00
moneromooo-monero 1e5491e942
Add a chacha20 variant to go with chacha8 2017-12-25 19:28:03 +00:00
moneromooo-monero 5cbcf0aa25
wallet: support for multisig seeds
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-20 10:22:29 +00:00
stoffu 6b5bd129b4
Account tagging 2017-12-18 10:21:47 +09:00
moneromooo-monero 98db7ee467
wallet: factor multisig info parsing 2017-12-17 16:12:44 +00:00
moneromooo-monero 31a97e761e
wallet: use raw encrypted data in multisig import/export RPC 2017-12-17 16:12:41 +00:00
moneromooo-monero 2fa707d1a5
wallet: add multisig sign/submit RPC 2017-12-17 16:12:35 +00:00
moneromooo-monero a36c261d7a
wallet2: fix slow multisig unit tests with subaddress patch
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-17 16:12:30 +00:00
moneromooo-monero fa5697127f
make multisig work with subaddresses
Thanks to kenshi84 for help getting this work
2017-12-17 16:12:27 +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 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
moneromooo-monero 6d219a9250
wallet: add multisig key generation
Scheme by luigi1111
2017-12-17 16:11:53 +00:00
moneromooo-monero 09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Riccardo Spagni 6c0953b15a
Merge pull request #2860
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-16 23:19:27 +02:00
moneromooo-monero c83d0b3ee2
add bulletproofs from v7 on testnet 2017-12-08 13:50:45 +00:00
Riccardo Spagni 81fb832082
Merge pull request #2833
b0426d4c Fixes #759 Add sanity check on restore height (Cifrado)
2017-12-02 09:25:53 +02:00
moneromooo-monero 3dffe71b72
new wipeable_string class to replace std::string passphrases 2017-11-27 22:25:57 +00: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 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
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
Cifrado b0426d4cf2 Fixes #759 Add sanity check on restore height 2017-11-17 08:35:59 +01:00
stoffu b738f4b59d
wallet: add sweep_single command 2017-11-15 17:51:54 +09:00
stoffu a17b8233da
wallet2 bugfix: loading old m_unconfirmed_payments 2017-11-15 17:30:49 +09: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 910218b14e
Merge pull request #2755
d70515fc Used declared default refresh status as default rather than it's current value (Maxime THIEBAUT)
2017-11-14 15:57:25 +02:00
Riccardo Spagni 25b97ee937
Merge pull request #2624
2677ade5 simplewallet: forbid 0 ring size (moneromooo-monero)
da8b60cb simplewallet: reject attempts to use too low mixin early (moneromooo-monero)
2017-11-14 15:20:45 +02:00
Riccardo Spagni 2458ff1a6d
Merge pull request #2697
d269bff2 wallet2: use a vector, not a list, for selected_transfers (moneromooo-monero)
2017-11-14 15:14:07 +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 d269bff2ab
wallet2: use a vector, not a list, for selected_transfers
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-13 19:36:18 +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
Riccardo Spagni 32b083d8bd
Merge pull request #2546
b2d416f2 Distinguish "not enough money" and "not enough unlocked money" (binaryFate)
2017-11-06 01:53:43 +02:00
Maxime THIEBAUT d70515fca4 Used declared default refresh status as default rather than it's current value 2017-11-03 16:15:02 +01:00
Riccardo Spagni 32b46c594b
Merge pull request #2703
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-11-01 11:24:54 +02:00
Jaquee a46c1eed8c Wallet2: Don't throw when subaddress label doesn't exist 2017-10-29 15:26:22 +01:00
moneromooo-monero ca87cbd852
wallet2: fix subaddress fields serialization
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-23 11:53:49 +01:00
rbrunner7 b370ef54b9 Wallet: Descriptions through new commands 'set_description', 'get_description' 2017-10-16 22:24:09 +02:00
binaryFate b2d416f211 Distinguish "not enough money" and "not enough unlocked money"
Fix #1530
2017-10-16 15:14:09 +02:00
Riccardo Spagni 1c546e0d81
Merge pull request #2565
452d4fae tests: fix hashchain unit tests (moneromooo-monero)
2017-10-15 18:27:08 +02:00
Riccardo Spagni 960886aa04
Merge pull request #2109
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-15 18:25:08 +02:00
Jaquee 97c2e449ce wallet2+API: use separate callbacks for lightwallets 2017-10-15 17:58:28 +02:00
Jaquee ce61b8189b wallet2: get_outs lightwallet support 2017-10-15 17:50:03 +02:00
Jaquee 43b57804f8 wallet2: refactor is_tx_spendtime_unlocked() 2017-10-15 17:48:45 +02:00
Jaquee f44d156cbd my/openmonero API functions 2017-10-15 17:42:29 +02:00
Jaquee 288d3c75c3 wallet2: add remove_obsolete_pool_txs() 2017-10-15 17:39:54 +02:00
Jaquee 2c6aad7ea7 wallet2: add on_pool_tx_removed callback 2017-10-15 17:35:15 +02:00
Jaquee ff7c30aadc wallet2: light wallet member variables 2017-10-15 17:35:08 +02:00
Riccardo Spagni d316b3d266
Merge pull request #2554
d74336d5 wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstr (stoffu)
2017-10-15 17:32:30 +02:00
Jaquee e2a276cbb5 wallet2: add ssl option to init() 2017-10-15 17:32:13 +02:00
kenshi84 53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
stoffu d74336d5c9
wallet: encrypt (un)signed tx, also optionally save unencrypted raw tx hexstr 2017-10-07 12:45:32 +09:00
Riccardo Spagni 1c044b162c
Merge pull request #2529
bd937139 wallet2: error check for generate_key_image_helper, removed redundant wallet_generate_key_image_helper (stoffu)
2017-10-06 22:53:28 +04:00
moneromooo-monero 452d4fae39
tests: fix hashchain unit tests
and relax the not-empty safety check to stay more intuitiuve
2017-10-03 00:51:53 +01:00
stoffu bd9371395e
wallet2: error check for generate_key_image_helper, removed redundant wallet_generate_key_image_helper 2017-10-03 08:13:00 +09:00
selsta 986d03d4b2 simplewallet: allow to set threshold before warning about tx backlog 2017-10-02 21:23:33 +02:00
moneromooo-monero 37c12119ab
wallet2: fix hash chain trimming when the inner chain becomes empty
It'd prevent further syncing. Recovery of empty hash chains is
automatic, but requires a running daemon
2017-10-02 12:52:22 +01:00
moneromooo-monero 36c3465b98
wallet2: do not keep block hashes below last checkpoint
This saves a lot of space and load/save time for wallet caches
2017-09-25 21:16:40 +01:00
moneromooo-monero 5d65a75b69
move checkpoints in a separate library 2017-09-25 21:16:26 +01:00
moneromooo-monero 2ec928badb
wallet2: simplify tx processing a bit 2017-09-25 18:35:51 +01:00
moneromooo-monero 740e6533a5
wallet2: factor some of the tx scanning code 2017-09-25 16:11:28 +01:00
moneromooo-monero 651baaec46
wallet: add encrypted seed functionality
This uses luigi1111's CN_Add method.
See https://xmr.llcoins.net for details.
2017-09-12 13:56:01 +01:00
Riccardo Spagni e19b68b005
Merge pull request #2362
adce8ae4 simplewallet: new "fee" command to display fee information (moneromooo-monero)
2017-09-02 11:30:07 +02:00
Riccardo Spagni 10da3051c2
Merge pull request #2309
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-09-02 11:28:25 +02:00
moneromooo-monero adce8ae466
simplewallet: new "fee" command to display fee information
including expected transaction backlog at different priorities
2017-08-29 16:28:18 +01:00
moneromooo-monero f906d87e66
wallet: new option to check/confirm txpool backlog when sending 2017-08-26 17:16:30 +01:00
Jaquee d27fe32e4a wallet2: export/import wallet data functions 2017-08-21 08:11:12 +02:00
Jaquee 225a25f327 import_key_images - allow importing without being connected to daemon 2017-08-18 16:11:30 +02:00
Riccardo Spagni 6f60613ffb
Merge pull request #2240
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-15 20:46:31 +02:00
Riccardo Spagni 4c24eb050b
Merge pull request #2238
ad4649ac Enable verifying wallet password with having to load wallet. (m2049r)
2017-08-15 20:46:09 +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 0c57df9770
wallet2: fix temporarily missing incoming tx when being mined
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-05 12:36:03 +01:00
m2049r ad4649ac81 Enable verifying wallet password with having to load wallet. 2017-08-03 01:45:45 +02:00
moneromooo-monero fa23a5006d
wallet2: add a is_synced function 2017-08-02 14:44:19 +01: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
Robby Weinberg 71f8249a08 Prevent crash if performing certain actions before wallet is initialized 2017-06-03 19:56:51 -05:00
Nano Akron e2529347b6 Correct spelling of 'get_upper_transaction_size_limit' 2017-05-09 16:02:57 +01: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
moneromooo-monero a50c4a4fad
wallet: option to merge destinations
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-25 11:44:04 +00:00
moneromooo-monero 0ad87db01f
wallet: try to save large outputs when using an unneeded second input
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-24 21:04:08 +00:00
Riccardo Spagni 7769a6e757
Merge pull request #1903
350e99ae wallet2: cache which pool txes were scanned already (moneromooo-monero)
2017-03-21 14:09:19 +02:00
moneromooo-monero 350e99ae57
wallet2: cache which pool txes were scanned already
This massively speeds up the wallet updating the pool on mainnet,
where the tx backlog is more than 500 txes.
2017-03-21 10:30:25 +00:00
moneromooo-monero c1e9ccc794
wallet2: speed up transactions using remote nodes
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-20 08:44:28 +00:00
moneromooo-monero 3396a9f2af
Add intervening v5 fork for increased min block size
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-15 08:32:51 +00:00
Riccardo Spagni 5bcb25f3f8
Merge pull request #1846
4b48565c wallet: add password command (moneromooo-monero)
2017-03-06 15:14:59 +00:00
moneromooo-monero 4b48565c9e
wallet: add password command
Also tweak wallet2 password code to verify password without
saying it's a new wallet, because it's assuming things.
2017-03-05 14:53:46 +00:00
moneromooo-monero 223fe5bbe2
wallet: fix get_tranfers with multiple incoming txes with same pid 2017-03-04 21:47:53 +00:00
Riccardo Spagni d35d626181
Merge pull request #1826
2c468dd4 allow user I/O in millinero, micronero, nanonero, piconero (moneromooo-monero)
2017-03-03 14:31:04 +02:00
moneromooo-monero 2c468dd429
allow user I/O in millinero, micronero, nanonero, piconero 2017-03-02 19:02:41 +00:00
moneromooo-monero 7a44f38a7f
Add support for the wallet to refresh pruned blocks 2017-02-27 22:29:00 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02: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
Riccardo Spagni 9296960081
Merge pull request #1686
bceaf4b7 wallet2: fix transactions not considering rct inputs (moneromooo-monero)
2017-02-11 00:22:17 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
moneromooo-monero bceaf4b788
wallet2: fix transactions not considering rct inputs
I broke this very recently in 2bf029be17
and didn't notice in time
2017-02-06 20:20:22 +00: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
Riccardo Spagni 31cf4e7362
Merge pull request #1640
f97526e6 simplewallet: option to always ask password for any crytical operations (kenshi84)
2017-02-04 17:18:38 +02:00
kenshi84 f97526e641 simplewallet: option to always ask password for any crytical operations 2017-02-03 09:38:12 +09:00
Riccardo Spagni 5fb3f97a55
Merge pull request #1629
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-02-02 19:32:01 +02:00
Lee Clagett c02e1cb943 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
2017-01-25 15:39:32 -05:00
Miguel Herranz 629e3101ab Replace BOOST_FOREACH with C++11 ranged for 2017-01-22 21:38:10 +01:00
moneromooo-monero 693c190881
wallet: add a node RPC cache layer for simple RPC calls
Mostly getinfo and get_hard_fork_info, which are called
pretty often. This speeds up transfers as a bonus.
2017-01-16 08:59:15 +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
Riccardo Spagni ab69d5b367
Merge pull request #1569
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-15 20:32:57 -05:00
kenshi84 16b8b66adc specify restore height by YYYY-MM-DD format 2017-01-16 10:00:28 +09: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
Riccardo Spagni 9cda94d0aa
Merge pull request #1574
d276a165 wallet2: use at least two rct inputs if possible (moneromooo-monero)
2017-01-15 14:55:40 -05:00
moneromooo-monero d276a16526
wallet2: use at least two rct inputs if possible
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-14 21:43:01 +00:00
Jaquee dea53962a3
fix timeout in check_connection 2017-01-14 14:45:30 +01:00
Riccardo Spagni 2806842200
Merge pull request #1562
a081b39c Move key image export/import functions to wallet2 (Jaquee)
2017-01-13 14:38:29 -05:00
Riccardo Spagni 2a2f02e375
Merge pull request #1559
db56a03f Wallet2 + API: Callbacks for unconfirmed transfers (Jaquee)
2017-01-13 14:37:12 -05:00
Riccardo Spagni faa33fc326
Merge pull request #1541
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-13 14:34:55 -05:00
Riccardo Spagni e51afeb90f
Merge pull request #1540
79b4e1f9 Cold signing: make sure short payment id isnt encrypted twice (Jaquee)
2017-01-13 14:34:26 -05:00
Riccardo Spagni 36b84ded95
Merge pull request #1526
5eed5b05 Wallet API: functions for supporting/creating view only wallets (Jaquee)
2017-01-13 14:32:26 -05:00
Jaquee a081b39c01
Move key image export/import functions to wallet2 2017-01-13 12:49:10 +01:00
Jaquee db56a03ff2
Wallet2 + API: Callbacks for unconfirmed transfers 2017-01-12 18:25:34 +01:00
Jaquee dbb838f4d0
GUI cold signing
fix conflict
2017-01-10 22:49:17 +01:00
Jaquee afb85a028f
Wallet API: functions for supporting/creating view only wallets 2017-01-10 22:49:11 +01:00
Jaquee 5eed5b056b
Wallet API: functions for supporting/creating view only wallets 2017-01-10 22:34:46 +01:00
kenshi84 f1dde1a429 wallet cli: print originating block heights of mixin keys when making transfer 2017-01-09 15:10:34 +09:00
Riccardo Spagni ba9744d400
Merge pull request #1515
ada7c7da portable serializer: tests added (kenshi84)
f390a0e2 portable serializer: make signerd/unsigned tx portable, ignore archive version checking (kenshi84)
2017-01-08 16:41:44 -08:00
Jaquee 79b4e1f997
Cold signing: make sure short payment id isnt encrypted twice 2017-01-08 21:04:53 +01:00
kenshi84 ada7c7da8f portable serializer: tests added 2017-01-03 09:14:48 +09:00
kenshi84 f390a0e2dc portable serializer: make signerd/unsigned tx portable, ignore archive version checking 2017-01-02 20:04:58 +09:00
kenshi84 99580adf66 make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup 2016-12-21 23:12:15 +09:00
Riccardo Spagni 6847999fb8
Merge pull request #1472
2bddb8eb Refactored password prompting for wallets (Lee Clagett)
2016-12-20 17:46:58 +02:00
Lee Clagett 2bddb8ebee Refactored password prompting for wallets 2016-12-19 20:00:43 -05:00
kenshi84 66e6af89ce added experimental boost::archive::portable_binary_{i|o}archive 2016-12-16 23:46:24 +09:00
anonimal 4bb0bff233
AddressBook: use unsigned type for row ID's
Fixes build warnings and may also prevent future headaches.
2016-12-14 21:37:49 +00:00
Jaquee 3b4539ee7e
addressbook updates 2016-12-12 21:50:50 +01:00
Jaquee 5df92877c7 GUI address book 2016-12-12 00:43:02 +01:00
moneromooo-monero f4a3ce15c1
Fix sending outputs from a tx with more than one pubkey
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-09 18:21:21 +00:00