Commit Graph

950 Commits

Author SHA1 Message Date
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
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
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
luigi1111 99e4c403cb
Merge pull request #5977
e85c838 simplewallet: do not print warning for locked coinbase txes (moneromooo-monero)
2019-10-22 10:14:33 -05:00
luigi1111 40e71742a0
Merge pull request #5952
93d5cf2 wallet2: add ignore-outputs-{above/below} option (stoffu)
2019-10-16 13:40:44 -05:00
luigi1111 75f7959fa9
Merge pull request #5946
16498dc simplewallet.cpp - clean up welcome message (SomaticFanatic)
2019-10-16 13:38:18 -05:00
moneromooo-monero 19c0506e14
wallet: remove long payment ID sending support 2019-10-14 11:43:47 +00:00
moneromooo-monero b295e3cff6
simplewallet: reinstate short payment id nag, only if non default 2019-10-14 11:43:42 +00:00