Commit Graph

1408 Commits

Author SHA1 Message Date
moneromooo-monero 4278a3a7e3
cryptonote_basic: catch crypto api errors 2022-06-20 22:17:57 +00:00
Luke Parker da0715e503
Improve consistency between on_money_received and on_money_received_unconfirmed
unconfirmed solely uses a - b, and received now accepts b so it can 
provide more detailed logs on what occurred (printing a - b, yet with a 
and b).
2022-06-01 18:20:11 -04:00
luigi1111 1ff2b02064
Merge pull request #8331
fde7c96 wallet2: fix spurious reorg detection with untrusted nodes (moneromooo-monero)
2022-05-26 21:24:38 -05:00
luigi1111 f96cf86532
Merge pull request #8328
2979474 disable multisig by default (moneromooo-monero)
2022-05-26 21:22:52 -05:00
moneromooo-monero 2979474221
disable multisig by default
There are vulnerabilities in multisig protocol if the parties do not
trust each other, and while there is a patch for it, it has not been
throroughly reviewed yet, so it is felt safer to disable multisig by
default for now.
If all parties in a multisig setup trust each other, then it is safe
to enable multisig.
2022-05-17 19:52:03 +00:00
luigi1111 5b9724b03d
Merge pull request #8308
f63f7dc wallet2: fix a couple unused variable warnings (selsta)
2022-05-16 13:51:18 -05:00
moneromooo-monero fde7c96b5c
wallet2: fix spurious reorg detection with untrusted nodes
When forced to deal with an untrusted node, a wallet will quantize
its current height to disguise the real height to the adversary, to
try and minimize the daemon's ability to distinguish returning
wallets.
Daemons will thus return more blocks than the wallet needs, starting
from earlier in the chain. These extra blocks will be disregarded
by the wallet, which had already scanned them.
However, for the purposes of reorg size detection, the wallet assumes
all blocks the daemon sends are different, which is only correct if
the wallet hasn't been coy, which is only the case for trusted
daemons (which you should use). This causes an issue when the size
of this "fake reorg" is above the sanity check threshold at which
the wallet refuses a reorg.
To fix this, the reorg size check is moved later on, when the reorg
is about to actually happen, after the wallet has checked which
blocks are actually different from the ones it expects.
2022-05-15 11:57:37 +00:00
moneromooo-monero df2e680825
wallet2: speedup large tx construction: reserve vector memory
2.8 seconds -> 2.6 seconds on a test case
2022-05-13 17:43:22 +00:00
Crypto City 38cdf01c64
wallet2: speedup large tx construction: batch ringdb lookups
3.3 seconds -> 2.8 seconds on a test case
2022-05-13 17:43:22 +00:00
Crypto City 2b95178897
wallet2: speedup large tx construction: batch ringdb updates
5.2 seconds -> 4.1 seconds on a test case
2022-05-13 17:43:20 +00:00
moneromooo-monero c9cf0b78f8
wallet2: speedup large tx construction: cache public key validity
5.9 second -> 5.2 seconds on a test case
2022-05-13 17:43:16 +00:00
luigi1111 436ca13722
Merge pull request #8277
baee2c0 Preserve commitment format inside transactions (kayabaNerve)
2022-05-10 16:49:13 -05:00
luigi1111 c1625a8928
Merge pull request #8220
0d6ecb1 multisig: add post-kex verification round to check that all participants have completed the multisig address (koe)
2022-05-10 16:41:02 -05:00
selsta f63f7dc7e2
wallet2: fix a couple unused variable warnings 2022-05-02 21:28:40 +02:00
koe 0d6ecb1136 multisig: add post-kex verification round to check that all participants have completed the multisig address 2022-04-29 14:04:59 -05:00
luigi1111 e13244ea9c
Merge pull request #8178
5d388eb Bump ring size to 16 for v15 & remove set default in wallet cli (j-berman)
2022-04-25 10:18:26 -05:00
Luke Parker baee2c06ec
Preserve commitment format inside transactions 2022-04-21 18:58:47 -04:00
luigi1111 9f814edbd7
Merge pull request #8254
9df7179 wallet2: use BP+ for cold signing (moneromooo-monero)
2022-04-19 22:21:21 -05:00
j-berman 5d388eb74d Bump ring size to 16 for v15 & remove set default in wallet cli 2022-04-18 14:36:28 -07:00
j-berman ea87b30f89 Add view tags to outputs to reduce wallet scanning time
Implements view tags as proposed by @UkoeHB in MRL issue
https://github.com/monero-project/research-lab/issues/73

At tx construction, the sender adds a 1-byte view tag to each
output. The view tag is derived from the sender-receiver
shared secret. When scanning for outputs, the receiver can
check the view tag for a match, in order to reduce scanning
time. When the view tag does not match, the wallet avoids the
more expensive EC operations when deriving the output public
key using the shared secret.
2022-04-18 00:49:53 -07:00
moneromooo-monero 9df7179aaf
wallet2: use BP+ for cold signing
reported by ukoehb
2022-04-10 21:03:09 +00:00
moneromooo-monero b030f20751
Fee changes from ArticMine
https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf

with a change to use 1.7 instead of 2.0 for the max long term increase rate
2022-04-10 18:13:34 +00:00
luigi1111 0eb1b570b6
Merge pull request #8197
da9aa1f Copyright: Update to 2022 (mj-xmr)
2022-04-06 00:08:53 -04:00
luigi1111 88a5606795
Merge pull request #8195
3c82958 wallet2: update stagenet rollback blocks (selsta)
2022-04-06 00:07:36 -04:00
luigi1111 0285c07d7d
Merge pull request #8179
ae0a840 wallet2: decrease the amount of data exchanged for output export (moneromooo-monero)
2022-04-06 00:06:20 -04:00
luigi1111 d054def63f
Merge pull request #7170
bd27deb Bulletproofs+ (SarangNoether)
b7713cc Precompute initial transcript hash (SarangNoether)
b535d66 Updates from security audit (SarangNoether)
a0d80b1 plug bulletproofs plus into consensus (moneromooo-monero)
75bd004 ringct: a few minor optimizations from review (moneromooo-monero)
a345060 ringct: port some of vtnerd's review changes from BP+ to BP (moneromooo-monero)
4c94cfe store outPk/8 in the tx for speed (moneromooo-monero)
5acdd0e bulletproofs+: some minor cleanup from vtnerd's review (moneromooo-monero)
2022-04-05 23:56:09 -04:00
luigi1111 fb2f822c52
Merge pull request #7153
354e1d9 Make the wallet name optional when locked. (Norman Moeschter)
2022-04-05 23:48:18 -04:00
moneromooo-monero 4c94cfecfc
store outPk/8 in the tx for speed
It avoids dividing by 8 when deserializing a tx, which is a slow
operation, and multiplies by 8 when verifying and extracing the
amount, which is much faster as well as less frequent
2022-04-05 18:50:22 +00:00
moneromooo-monero a0d80b1f95
plug bulletproofs plus into consensus 2022-04-05 18:50:17 +00:00
moneromooo-monero ae0a840fda
wallet2: decrease the amount of data exchanged for output export 2022-03-29 08:40:32 +00:00
luigi1111 d9e6baac42
Merge pull request #8158
e5000a9 Balance includes unconfirmed transfers to self (woodser)
2022-03-18 16:28:16 -05:00
Norman Moeschter 354e1d9c65
Make the wallet name optional when locked. 2022-03-10 08:16:14 +00:00
mj-xmr da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
luigi1111 5eaa4434e8
Merge pull request #7877
e08abaa multisig key exchange update and refactor (koe)
2022-03-02 18:51:54 -05:00
selsta 3c829586be
wallet2: update stagenet rollback blocks 2022-03-01 00:25:41 +01:00
koe e08abaa43f multisig key exchange update and refactor 2022-02-22 16:37:42 -06:00
woodser e5000a9f0c Balance includes unconfirmed transfers to self 2022-01-31 07:52:38 -05:00
woodser 4446cc88c3 wallet inits cache if file and blob missing 2021-12-24 09:22:57 -05:00
woodser 53be72c08a `make_uri` disallows standalone payment ids 2021-11-30 09:28:45 -05:00
luigi1111 ff4ede9356
Merge pull request #8017
a15466d wallet2: remove 2 unused variables (selsta)
2021-11-01 12:29:22 -05:00
selsta a15466d850
wallet2: remove 2 unused variables 2021-10-20 22:19:15 +02:00
moneromooo-monero 2cad563060
wallet2: fix key encryption when changing ask-password from 0/1 to 2
we reuse the wallet_keys_unlocker object, which does the right thing
in conjunction with other users of decrypt/encrypt (ie, refresh).
2021-10-19 22:01:45 +00:00
luigi1111 99507da993
Merge pull request #7994
84c5257 Decrease the 'recent spend window' in gamma re-select to 15 blocks (j-berman)
2021-10-17 23:38:47 -05:00
luigi1111 308e601966
Merge pull request #7799
76542ea Fix precision of average_output_time (j-berman)
2021-10-17 23:23:15 -05:00
luigi1111 7f477c1902
Merge pull request #7793
13a8a57 trezor: try empty passphrase first (Dusan Klinec)
2021-10-11 12:54:17 -05:00
j-berman 84c52571ed Decrease the "recent spend window" in gamma re-select to 15 blocks
- combined with patching integer truncation (#7798), this gets the algorithm marginally closer to mirroring empirically observed output ages
- 50 was originally chosen assuming integer truncation would remain in the client for that client release version. But patching integer truncation causes the client to select more outputs in the 10-100 block range, and therefore the benefit of choosing a larger recent spend window of 50 has less merit
- 15 seems well-suited to cover the somewhat sizable observable gap in the early window of blocks
2021-10-04 20:12:42 -07:00
j-berman 76542ea709 Fix precision of average_output_time
The fix as suggested by <jberman> on IRC. Before the fix, it would truncate 1.9 to 1 skewing the output selection.
2021-09-12 10:07:31 +02:00
luigi1111 a39b1d56c8
Merge pull request #7899
cd76eb7 wallet: fix unused lambda capture warning (selsta)
2021-09-09 15:21:10 -04:00
luigi1111 dfa6b58d4d
Merge pull request #7823
24d3d65 monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir (Kermit Alexander II)
2021-09-09 15:14:17 -04:00
luigi1111 b7315efc1c
Merge pull request #7342
520ce1c Attempt to carve the fee from a partial payment early (lxop)
2021-09-09 15:06:46 -04:00
selsta cd76eb7b8c
wallet: fix unused lambda capture warning 2021-08-28 15:18:32 +02:00
SChernykh e52802baef Wallet2: fix optimize-coinbase for p2pool payouts
RefreshOptimizeCoinbase was an optimization to speed up scanning of coinbase transactions before RingCT (tx version 2) where they split miner reward into multiple denominations, all to the same wallet.

When RingCT was introduced, all coinbase transactions became 1 output only, so this optimization does nothing now.

With p2pool, this optimization will skip scanning p2pool payouts because they use more than 1 output in coinbase transaction.

Fix it by applying this optimization only to pre-RingCT transactions (version < 2).
2021-08-26 11:50:15 +02:00
luigi1111 8b9eea92f1
Merge pull request #7849
6f15a0c Make sure node returns to wallet that real output is unlocked (j-berman)
2021-08-20 16:49:59 -04:00
luigi1111 1b079e5195
Merge pull request #7845
e1af8dc Protect client from divide by 0 caused by integer truncation (j-berman)
2021-08-20 16:45:15 -04:00
luigi1111 5812b757e0
Merge pull request #7821
da2955f Apply gamma distr from chain tip when selecting decoys (j-berman)
2021-08-20 16:33:53 -04:00
Kermit Alexander II 24d3d65d42 monero-wallet-rpc: Prevent --password-file from being used with --wallet-dir 2021-08-20 08:54:41 -05:00
j-berman e1af8dc02c Protect client from divide by 0 caused by integer truncation 2021-08-19 14:56:36 -07:00
j-berman da2955feae Apply gamma distr from chain tip when selecting decoys
- matches the paper by Miller et al to apply the gamma from chain tip, rather than after unlock time
- if the gamma produces an output more recent than the unlock time, the algo packs that output into one of the first 50 spendable blocks, respecting the block density factor
2021-08-19 14:51:20 -07:00
luigi1111 62844a776d
Merge pull request #7786
9c6e094 fix #7784 - deinit wallet in wallet dtor (Dusan Klinec)
2021-08-11 22:30:11 -04:00
j-berman 6f15a0c8d3 Make sure node returns to wallet that real output is unlocked 2021-08-11 07:28:10 -07:00
Dusan Klinec 13a8a576ed
trezor: try empty passphrase first
- Try empty passphrase first when opening a wallet, as all Trezors will have passphrase enabled by default by Trezor Suite by default.
  This feature enables easier access to all users using disabled passphrase (or empty passhprase)
- If wallet address differs from device address with empty passphrase, another opening attempt is made, without passphrase suppression,
  so user can enter his passhprase if using some. In this scenario, nothing changes to user, wallet opening just consumes one more call
  to Trezor (get wallet address with empty passphrase)
- also change how m_passphrase is used. Previous version did not work well with recent passphrase entry mechanism change (made in Trezor),
  thus this commit fixes the behaviour).
2021-08-03 13:54:04 +02:00
luigi1111 ed506006d2
Merge pull request #7796
0c6e1d3 wallet2: chunk get_outs.bin calls to avoid sanity limits (moneromooo-monero)
2021-08-02 18:54:46 -04:00
luigi1111 eeda76570c
Merge pull request #7790
bc8d764 wallet: rephrase error message on invalid device address (Dusan Klinec)
2021-08-02 18:53:05 -04:00
luigi1111 8c41d14ad5
Merge pull request #7788
f5eb2ce wallet2: Don't auto lock device on process parsed blocks (tobtoht)
2021-08-02 18:50:25 -04:00
luigi1111 9aa2d4c16e
Merge pull request #7747
8cf95c8 wallet2: refresh: check error and throw before potentially breaking out of loop (tobtoht)
2021-08-02 18:42:32 -04:00
luigi1111 2d5b8a6ff7
Merge pull request #7740
8cea9d8 wallet: Reset RPC Pay ID on node switch (tobtoht)
2021-07-27 16:55:14 -04:00
moneromooo-monero 0c6e1d343e
wallet2: chunk get_outs.bin calls to avoid sanity limits 2021-07-15 17:25:07 +00:00
tobtoht f5eb2ce968 wallet2: Don't auto lock device on process parsed blocks 2021-07-14 13:02:54 +02:00
Dusan Klinec bc8d7644d2
wallet: rephrase error message on invalid device address 2021-07-14 11:02:29 +02:00
Dusan Klinec 9c6e0941cb
fix #7784 - deinit wallet in wallet dtor 2021-07-14 10:46:16 +02:00
luigi1111 7499837a6f
Merge pull request #7661
08e4497 Improve cryptonote (block and tx) binary read performance (Lee Clagett)
2021-06-10 12:00:54 -05:00
luigi1111 a1a3e970f7
Merge pull request #7662
4da1112 rpc: send confirmations in get_transactions result (moneromooo-monero)
2021-06-10 11:34:20 -05:00
tobtoht 8cf95c8f29 wallet2: refresh: check error and throw before potentially breaking out of loop 2021-06-04 18:37:06 +02:00
tobtoht 8cea9d8605
wallet: Reset RPC Pay ID on node switch
RPC pay client ID is sent with each RPC request, set a new secret every time we switch nodes to mitigate trivial correlation
2021-06-04 13:58:09 +02:00
luigi1111 628c04499b
Merge pull request #7682
bbdb612 Wallet2: Update 'approximate_testnet_rolled_back_blocks' (rbrunner7)
2021-05-12 15:30:34 -05:00
rbrunner7 bbdb612b51 Wallet2: Update 'approximate_testnet_rolled_back_blocks' 2021-04-25 10:20:39 +02:00
Nathan Dorfman c57ef7f807 wallet2: Fix rescan_bc keep_ki option 2021-04-23 09:11:45 -06:00
luigi1111 9bba3f4767
Merge pull request #7651
c8ff1d4 monero-wallet-cli: improve error message when tx amount is zero (Elliot Wirrick)
2021-04-22 01:35:20 -04:00
mj-xmr dc81e23e60 Split epee/string_tools.h and encapsulate boost::lexical_cast 2021-04-16 20:54:20 +02:00
moneromooo-monero 4da1112967
rpc: send confirmations in get_transactions result
if the wallet does it, it would get a wrong result (possibly even
negative) if its local chain is not synced up to the daemon's yet
2021-04-15 15:31:52 +00:00
Elliot Wirrick c8ff1d4d23 monero-wallet-cli: improve error message when tx amount is zero 2021-04-07 10:10:16 -04:00
luigi1111 2098941ca0
Merge pull request #7635
447bfae wallet2: fix unlocked mixup in light wallet mode (moneromooo-monero)
2021-04-06 12:23:45 -05:00
moneromooo-monero 447bfae2a4
wallet2: fix unlocked mixup in light wallet mode 2021-03-25 09:33:40 +00:00
moneromooo-monero f9b5b521e8
fix serialization being different on mac
On Mac, size_t is a distinct type from uint64_t, and some
types (in wallet cache as well as cold/hot wallet transfer
data) use pairs/containers with size_t as fields. Mac would
save those as full size, while other platforms would save
them as varints. Might apply to other platforms where the
types are distinct.

There's a nasty hack for backward compatibility, which can
go after a couple forks.
2021-03-05 23:42:33 +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 0e35d46f5e
Merge pull request #7341
b587ffa Stop adding more outputs than bulletproof allows (Alex Opie)
2021-02-18 14:02:13 -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 4ee301c687
Merge pull request #6986
ee58f4f Balance includes unconfirmed payments (woodser)
2021-02-15 21:36:48 -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 1572df9e26 Removing unused namespace alias 2021-01-28 23:40:57 -05:00
Alex Opie 520ce1ca81 Attempt to carve the fee from a partial payment early
Do this for both the estimate and actual fee.

#7337
2021-01-25 12:01:27 +13:00
Alex Opie b587ffa1fd Stop adding more outputs than bulletproof allows
If more outputs are requested, they are split across
multiple transactions.

#7322
2021-01-25 10:01:38 +13:00
Lee Clagett 08e4497c6e Improve cryptonote (block and tx) binary read performance 2021-01-23 06:23:39 +00: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
woodser ee58f4f766 Balance includes unconfirmed payments 2020-11-06 15:08:43 -05:00
Lee Clagett 7414e2bac1 Change epee binary output from std::stringstream to byte_stream 2020-10-10 15:28:40 +00:00
Alexander Blair 6b8db83149
Merge pull request #7043
17c537039 wallet2: check imported multisig curve points are in main subgroup (Crypto City)
2020-12-04 13:25:01 -08:00
selsta 89bbb802c0
wallet2: set propagation timeout to current max timeout 2020-12-03 02:18:58 +01:00