Commit Graph

1089 Commits

Author SHA1 Message Date
Elliot Wirrick c8ff1d4d23 monero-wallet-cli: improve error message when tx amount is zero 2021-04-07 10:10:16 -04:00
luigi1111 ac091fb539
Merge pull request #7358
f346e3e wallet_rpc_payments: implement multithreading (gdmojo)
2021-03-29 21:10:48 -04:00
mj-xmr 673c6d2d11 Reduce compilation time of epee/portable_storage_template_helper.h 2021-03-28 15:41:48 +02:00
gdmojo f346e3ec0e wallet_rpc_payments: implement multithreading 2021-02-20 18:23:06 +00:00
luigi1111 6556c33f13
Merge pull request #7355
bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett)
1572df9 Removing unused namespace alias (Lee Clagett)
2021-02-18 14:06:47 -05:00
luigi1111 ce5800a225
Merge pull request #7346
85db173 Remove unused variables in monero codebase (Kevin Barbour)
2021-02-18 14:03:31 -05:00
luigi1111 98cb68e5a7
Merge pull request #7340
ccd0f2b Simplewallet.cpp: Add export_outputs help (SomaticFanatic)
2021-02-18 14:01:29 -05:00
luigi1111 3f55f7df31
Merge pull request #7312
186271e monero-wallet-cli: Added command scan_tx (Horia Mihai David)
2021-02-18 14:00:35 -05:00
Horia Mihai David 186271e5d1 monero-wallet-cli: Added command scan_tx
To implement this feature, the wallet2::scan_tx API was implemented.
2021-02-17 20:25:55 +01:00
luigi1111 3328938d4e
Merge pull request #7319
993e9be simplewallet: allow setting --restore-height 0 (selsta)
2021-02-16 11:42:14 -05:00
luigi1111 7439d891bf
Merge pull request #7242
021a281 simplewallet: Add input file parameter to sign_transfer (Steff Richards)
2021-02-15 21:44:53 -05:00
Kevin Barbour 85db1734e7
Remove unused variables in monero codebase
There are quite a few variables in the code that are no longer
(or perhaps never were) in use. These were discovered by enabling
compiler warnings for unused variables and cleaning them up.

In most cases where the unused variables were the result
of a function call the call was left but the variable
assignment removed, unless it was obvious that it was
a simple getter with no side effects.
2021-02-09 08:05:05 +01:00
Lee Clagett bd129849f0 Remove copies from foreach loops (thanks to Clang) 2021-01-28 23:42:40 -05:00
SomaticFanatic ccd0f2bdc2 Simplewallet.cpp: Add export_outputs help
See #6547
2021-01-21 18:39:43 -05:00
luigi1111 d01f31460e
Merge pull request #7113
7f30c49 simplewallet: don't complain about connecting to the daemon when offline (moneromooo-monero)
2021-01-15 23:44:32 -05:00
selsta 993e9be669
simplewallet: allow setting --restore-height 0 2021-01-13 12:36:58 +01:00
Steff Richards 021a28137d simplewallet: Add input file parameter to sign_transfer 2020-12-31 16:54:01 +01:00
Alexander Blair d06bae56b3
Merge pull request #7173
d2fda6c25 restrict public node checks a little (moneromooo-monero)
2020-12-26 13:41:42 -08:00
Alexander Blair d365f2409a
Merge pull request #6931
fbb03ef2a simplewallet: add "address mnew" command (codesoap)
2020-12-26 13:35:24 -08:00
codesoap fbb03ef2a0 simplewallet: add "address mnew" command 2020-12-26 19:33:11 +01:00
moneromooo-monero d2fda6c25f
restrict public node checks a little
do not include blocked hosts in peer lists or public node lists by default,
warn about no https on clearnet and about untrusted peers likely being spies
2020-12-22 23:39:07 +00:00
moneromooo-monero 7f30c49731
simplewallet: don't complain about connecting to the daemon when offline 2020-12-10 17:57:13 +00:00
xiphon ec14e4b8cd wallet2: skip reorgs exceeding max-reorg-depth wallet setting 2020-10-13 15:23:35 +00:00
luigi1111 d27d4526fe
Merge pull request #6819
c3f354e simplewallet fix wrong persistent-rpc-client-id name in help (moneromooo-monero)
2020-09-15 19:59:36 -05:00
TheCharlatan 80e535c95a
wallet2: adapt to deterministic unlock time 2020-09-15 11:40:31 +00:00
moneromooo-monero c3f354e6c1
simplewallet fix wrong persistent-rpc-client-id name in help 2020-09-14 20:50:35 +00:00
Sarang Noether fa06c39d97 Bind signature to full address and signing mode 2020-08-28 19:38:00 -04:00
moneromooo-monero 743608ec16 wallet: allow signing a message with spend or view key 2020-08-28 19:25:17 -04:00
Alexander Blair a06c83db73
Merge pull request #6752
85899230d simplewallet: allow setting tx keys when sending to a subaddress (moneromooo-monero)
e916201f1 wallet2: fix setting tx keys when another is already set (moneromooo-monero)
2020-08-27 02:58:23 -07:00
moneromooo-monero 7175dcb107
replace most boost serialization with existing monero serialization
This reduces the attack surface for data that can come from
malicious sources (exported output and key images, multisig
transactions...) since the monero serialization is already
exposed to the outside, and the boost lib we were using had
a few known crashers.

For interoperability, a new load-deprecated-formats wallet
setting is added (off by default). This allows loading boost
format data if there is no alternative. It will likely go
at some point, along with the ability to load those.

Notably, the peer lists file still uses the boost serialization
code, as the data it stores is define in epee, while the new
serialization code is in monero, and migrating it was fairly
hairy. Since this file is local and not obtained from anyone
else, the marginal risk is minimal, but it could be migrated
later if needed.

Some tests and tools also do, this will stay as is for now.
2020-08-17 16:23:58 +00:00
Alexander Blair eba2189925
Merge pull request #6677
f9e3fcdf3 add trezor support to sweep_single (Dusan Klinec)
2020-08-16 12:46:27 -07:00
moneromooo-monero 85899230d1
simplewallet: allow setting tx keys when sending to a subaddress
The tx key derivation is different then
2020-08-10 21:25:51 +00:00
rbrunner7 fb31167b12 Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' command 2020-07-24 07:12:11 +02:00
Alexander Blair 61e5208181
Merge pull request #6537
5e0ea6e95 simplewallet: add missing calls to on_command (moneromooo-monero)
2020-07-19 03:38:07 -07:00
Alexander Blair a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
Alexander Blair 5041de8a3b
Merge pull request #6488
99684e3e simplewallet: add show_qr_code command (selsta)
2020-07-16 06:14:30 -07:00
Dusan Klinec f9e3fcdf3e
add trezor support to sweep_single 2020-06-21 23:17:58 +02:00
selsta 99684e3ec3
simplewallet: add show_qr_code command
Thanks to iDunk for helping with Windows.
2020-06-21 20:15:10 +02:00
selsta 58e1c8b031
repo: update donation fund address 2020-06-09 12:19:39 +02:00
luigi1111 e17c864ba2
Merge pull request #6549
82d21f5 easylogging++: sanitize log payload (moneromooo-monero)
7d0b7e8 [master] MMS: New 'config_checksum' subcommand (rbrunner7)
2020-06-08 14:12:08 -05:00
luigi1111 3a577f1ce7
Merge pull request #6525
86cf811 simplewallet: don't complain about incoming payment ids on change (moneromooo-monero)
2020-06-08 14:07:45 -05:00
Lee Clagett 7aeb503547 Fix boost <1.60 compilation and fix boost 1.73+ warnings 2020-05-31 21:18:11 -04:00
rbrunner7 7d0b7e83ef [master] MMS: New 'config_checksum' subcommand 2020-05-24 10:23:55 +02:00
moneromooo-monero 5e0ea6e95c
simplewallet: add missing calls to on_command
It resets the inactivity time
2020-05-16 00:48:44 +00:00
moneromooo-monero 86cf811a39
simplewallet: don't complain about incoming payment ids on change 2020-05-13 23:28:31 +00:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
luigi1111 6d1f3c9acd
Merge pull request #6467
8b655de simplewallet: report timestamp based expected unlock time on balance (moneromooo-monero)
2020-05-05 23:40:44 -05:00
luigi1111 ac9f7c9bec
Merge pull request #6449
27d551d simplewallet: add sweep_account command (moneromooo-monero)
2020-05-01 15:36:19 -05:00
luigi1111 c9b800a787
Merge pull request #6446
e509ede trezor: adapt to new passphrase mechanism (ph4r05)
2020-05-01 15:32:52 -05:00
luigi1111 f020b24b02
Merge pull request #6444
b367630 simplewallet : missing function block separator (sumogr)
2020-05-01 15:24:33 -05:00
luigi1111 6b7e88e16c
Merge pull request #6440
7c4a400 simplewallet: fix strings (show_transfers & export_transfers) (sumogr)
2020-05-01 15:21:57 -05:00
Dusan Klinec e509ede2aa
trezor: adapt to new passphrase mechanism
- choice where to enter passphrase is now made on the host
- use wipeable string in the comm stack
- wipe passphrase memory
- protocol optimizations, prepare for new firmware version
- minor fixes and improvements
- tests fixes, HF12 support
2020-04-27 18:17:56 +02:00
moneromooo-monero 8b655de8ed
simplewallet: report timestamp based expected unlock time on balance 2020-04-22 13:34:58 +00:00
moneromooo-monero 27d551d12f
simplewallet: add sweep_account command
Expects an account number, then the usual sweep_all options

Useful to move monero that was accidentally sent to a subaddress
with a very large account index.
2020-04-14 15:06:46 +00:00
luigi1111 bce050ee78
Merge pull request #6394
69b5992 simplewallet: new 'address one-off <major> <minor>' command (moneromooo-monero)
2020-04-10 16:06:10 -05:00
luigi1111 53800b3b63
Merge pull request #6341
927fd47 simplewallet: fix smart mining not starting after first setup (moneromooo-monero)
2020-04-10 15:59:14 -05:00
Sumo Gr b367630ee8
simplewallet : missing function block separator 2020-04-10 21:27:41 +03:00
sumogr 7c4a4003a3 simplewallet: fix strings (show_transfers & export_transfers) 2020-04-08 19:17:58 +03:00
moneromooo-monero 69b5992296
simplewallet: new "address one-off <major> <minor>" command 2020-04-07 16:25:01 +00:00
luigi1111 c4f75fe898
Merge pull request #6339
c61abf8 remove empty statements (shopglobal)
2020-04-04 12:47:31 -05:00
moneromooo-monero 9989cb087e
simplewallet: warn about correlations if print-ring-members is not set
The warning about spending more than one output with similar creation
time was skipped if print-ring-members was not set, and it defaults to
false, which means most people probably aren't getting this warning if
they spend correlated outputs.

Reported by SeventhAlpaca.
2020-03-28 11:46:06 +00:00
Alexander Blair 5ba6eef272
Merge pull request #6288
0349347e ringdb: use a different iv for key and data in rings table (moneromooo-monero)
7b882087 simplewallet: reword mixin in user message in terms of ring size (moneromooo-monero)
f507a43a wallet2: do not remove known rings when a tx fails (moneromooo-monero)
2020-03-27 12:23:59 -07:00
Alexander Blair d500bbe68f
Merge pull request #6268
a6c24412 wallet: fix exceptions getting the hash of a pruned tx (moneromooo-monero)
2020-03-12 01:02:31 -07:00
Alexander Blair ea6396ea66
Merge pull request #6222
a6a2ad6c simplewallet: set manual refresh mode in rescan_bc (moneromooo-monero)
2020-02-28 19:59:43 -08:00
Alexander Blair 8c2939a7cb
Merge pull request #6058
88b82bef simplewallet: point to "set help" in the lock screen message (moneromooo-monero)
f19c9f23 util: allow newlines in string to be split (moneromooo-monero)
2020-02-28 19:54:37 -08:00
Alexander Blair 5bd496e8ef
Merge pull request #6241
ae84ec90 wallet-cli/rpc: allow sweep_all to use outputs in all subaddresses within an account (stoffu)
2020-02-28 19:49:41 -08:00
Alexander Blair 2deb02f81d
Merge pull request #6224
d93e1dff simplewallet: warn on refresh if refresh-from-block-height seems off (moneromooo-monero)
2020-02-28 19:46:33 -08:00
Alexander Blair 5e492c4cbc
Merge pull request #6213
94266eeb simplewallet: fix output age display with duplicate heights (moneromooo-monero)
f1d379d2 simplewallet: fix "outputs in same tx" detector (moneromooo-monero)
2020-02-28 19:36:41 -08:00
luigi1111 04187e5968
Merge pull request #6197
f812783 simplewallet: fix encrypted payment id note triggering on dummy ones (moneromooo-monero)
2020-02-19 22:24:44 -05:00
Interchained c61abf87c0 remove empty statements
Cleaning up a little around the code base.
2020-02-17 11:55:15 -05:00
moneromooo-monero 927fd47934
simplewallet: fix smart mining not starting after first setup
Also avoid rewriting the wallet if the setting is already was we need
2020-02-17 13:16:09 +00:00
Alexander Blair e552ba14b2
Merge pull request #6127
67b4a19e simplewallet: noob-friendly help menu (wowario)
2020-02-06 00:33:31 -08:00
Alexander Blair cd1610bc37
Merge pull request #6076
22d30866 simplewallet: add missing inactivity-lock-timeout to set help blurb (moneromooo-monero)
9f57f0df simplewallet: do not mention inactivity if a lock was manual (moneromooo-monero)
2020-02-06 00:29:52 -08:00
Alexander Blair 3b224bb99d
Merge pull request #6069
d64e5aa7 wallet: allow message sign/verify for subaddresses (moneromooo-monero)
2020-02-06 00:29:32 -08:00
moneromooo-monero dd8c6b1703
wallet: do not split integrated addresses in address book api 2020-01-26 00:03:53 +00:00
Alexander Blair e4e70b57ca
Merge pull request #6130
6dec0013 simplewallet: fix restore height warning (selsta)
2020-01-16 17:39:03 -08:00
moneromooo-monero 7b88208722
simplewallet: reword mixin in user message in terms of ring size 2020-01-09 17:32:21 +00:00
moneromooo-monero d64e5aa719
wallet: allow message sign/verify for subaddresses 2019-12-31 08:44:36 +00:00
moneromooo-monero a6c24412e5
wallet: fix exceptions getting the hash of a pruned tx 2019-12-30 15:14:57 +00:00
stoffu ae84ec90c8
wallet-cli/rpc: allow sweep_all to use outputs in all subaddresses within an account 2019-12-16 21:10:11 +09:00
luigi1111 a61db51aae
Merge pull request #6027
9768e96 simplewallet: remove remaining payment id dead code (moneromooo-monero)
2019-12-12 13:38:00 -06:00
moneromooo-monero d93e1dffa9
simplewallet: warn on refresh if refresh-from-block-height seems off 2019-12-09 14:09:39 +00:00
moneromooo-monero a6a2ad6cac
simplewallet: set manual refresh mode in rescan_bc
This ensures we get asked for the password if needed
2019-12-07 13:57:26 +00:00
moneromooo-monero 94266eeb89
simplewallet: fix output age display with duplicate heights
The highlight check was based on height, so would highlight
any output at that height, resulting in several matches if
a fake out was picked at the same height as the real spend
2019-12-03 18:50:28 +00:00
moneromooo-monero f1d379d27d
simplewallet: fix "outputs in same tx" detector
It was comparing source txids, but txids were empty,
so all checks triggered
2019-12-03 18:50:22 +00:00
moneromooo-monero f8127831c7
simplewallet: fix encrypted payment id note triggering on dummy ones 2019-11-29 20:02:46 +00:00
moneromooo-monero 88b82befc7
simplewallet: point to "set help" in the lock screen message 2019-11-25 13:17:21 +00:00
selsta 6dec001359
simplewallet: fix restore height warning 2019-11-14 03:00:20 +01:00
wowario 67b4a19edf
simplewallet: noob-friendly help menu 2019-11-13 10:24:10 +03:00
moneromooo-monero 38f6910481
simplewallet: plug a timing leak
As reported by Tramèr et al, timing of refresh requests can be used
to see whether a password was requested (and thus at least one output
received) since this will induce a delay in subsequent calls.
To avoid this, we schedule calls at a given time instead of sleeping
for a set time (which would make delays additive).
To further avoid a scheduled call being during the time in which a
password is prompted, the actual scheduled time is now randomized.
2019-11-02 11:41:41 +00:00
moneromooo-monero fd35e2304a
wallet: fix another facet of "did I get some monero" information leak
We get new pool txes before processing any tx, pool or not.
This ensures that if we're asked for a password, this does not
cause a measurable delay in the txpool query after the last
block query.
2019-11-01 18:59:38 +00:00
moneromooo-monero 22d30866ca
simplewallet: add missing inactivity-lock-timeout to set help blurb 2019-11-01 15:37:55 +00:00
moneromooo-monero 9f57f0df92
simplewallet: do not mention inactivity if a lock was manual 2019-11-01 14:36:57 +00:00
luigi1111 4a67bdbde4
Merge pull request #6019
d60c1b6 changed 'batttery' to 'battery' (jakehemmerle)
2019-10-25 13:45:59 -05:00
moneromooo-monero 9768e96d74
simplewallet: remove remaining payment id dead code
pointed out by coverity
2019-10-25 16:53:15 +00:00
moneromooo-monero ffa46026b5
simplewallet: add public_nodes command
Lists nodes exposing their RPC port for public use
2019-10-25 09:34:41 +00:00
moneromooo-monero 2899379791
daemon, wallet: new pay for RPC use system
Daemons intended for public use can be set up to require payment
in the form of hashes in exchange for RPC service. This enables
public daemons to receive payment for their work over a large
number of calls. This system behaves similarly to a pool, so
payment takes the form of valid blocks every so often, yielding
a large one off payment, rather than constant micropayments.

This system can also be used by third parties as a "paywall"
layer, where users of a service can pay for use by mining Monero
to the service provider's address. An example of this for web
site access is Primo, a Monero mining based website "paywall":
https://github.com/selene-kovri/primo

This has some advantages:
 - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own
 - incentive to run your own node instead of using a third party's, thereby promoting decentralization
 - decentralized: payment is done between a client and server, with no third party needed
 - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance
 - no payment occurs on the blockchain, so there is no extra transactional load
 - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy)
 - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do
 - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue
 - no large credit balance maintained on servers, so they have no incentive to exit scam
 - you can use any/many node(s), since there's little cost in switching servers
 - market based prices: competition between servers to lower costs
 - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others
 - increases network security
 - helps counteract mining pools' share of the network hash rate
 - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner

And some disadvantages:
 - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine)
 - payment is "random", so a server might go a long time without a block before getting one
 - a public node's overall expected payment may be small

Public nodes are expected to compete to find a suitable level for
cost of service.

The daemon can be set up this way to require payment for RPC services:

  monerod --rpc-payment-address 4xxxxxx \
    --rpc-payment-credits 250 --rpc-payment-difficulty 1000

These values are an example only.

The --rpc-payment-difficulty switch selects how hard each "share" should
be, similar to a mining pool. The higher the difficulty, the fewer
shares a client will find.
The --rpc-payment-credits switch selects how many credits are awarded
for each share a client finds.
Considering both options, clients will be awarded credits/difficulty
credits for every hash they calculate. For example, in the command line
above, 0.25 credits per hash. A client mining at 100 H/s will therefore
get an average of 25 credits per second.
For reference, in the current implementation, a credit is enough to
sync 20 blocks, so a 100 H/s client that's just starting to use Monero
and uses this daemon will be able to sync 500 blocks per second.

The wallet can be set to automatically mine if connected to a daemon
which requires payment for RPC usage. It will try to keep a balance
of 50000 credits, stopping mining when it's at this level, and starting
again as credits are spent. With the example above, a new client will
mine this much credits in about half an hour, and this target is enough
to sync 500000 blocks (currently about a third of the monero blockchain).

There are three new settings in the wallet:

 - credits-target: this is the amount of credits a wallet will try to
reach before stopping mining. The default of 0 means 50000 credits.

 - auto-mine-for-rpc-payment-threshold: this controls the minimum
credit rate which the wallet considers worth mining for. If the
daemon credits less than this ratio, the wallet will consider mining
to be not worth it. In the example above, the rate is 0.25

 - persistent-rpc-client-id: if set, this allows the wallet to reuse
a client id across runs. This means a public node can tell a wallet
that's connecting is the same as one that connected previously, but
allows a wallet to keep their credit balance from one run to the
other. Since the wallet only mines to keep a small credit balance,
this is not normally worth doing. However, someone may want to mine
on a fast server, and use that credit balance on a low power device
such as a phone. If left unset, a new client ID is generated at
each wallet start, for privacy reasons.

To mine and use a credit balance on two different devices, you can
use the --rpc-client-secret-key switch. A wallet's client secret key
can be found using the new rpc_payments command in the wallet.
Note: anyone knowing your RPC client secret key is able to use your
credit balance.

The wallet has a few new commands too:

 - start_mining_for_rpc: start mining to acquire more credits,
regardless of the auto mining settings
 - stop_mining_for_rpc: stop mining to acquire more credits
 - rpc_payments: display information about current credits with
the currently selected daemon

The node has an extra command:

 - rpc_payments: display information about clients and their
balances

The node will forget about any balance for clients which have
been inactive for 6 months. Balances carry over on node restart.
2019-10-25 09:34:38 +00:00
Jake Hemmerle d60c1b6312 changed 'batttery' to 'battery' 2019-10-24 19:55:28 -04:00
luigi1111 35da1ce307
Merge pull request #5983
32d6376 simplewallet: add --restore-from-seed alias (moneromooo-monero)
2019-10-22 10:20:46 -05:00
luigi1111 8a88d9186a
Merge pull request #5982
bba5bae implewallet: don't trigger idle lock right after a foreground refresh (moneromooo-monero)
2019-10-22 10:19:35 -05:00