Commit Graph

625 Commits

Author SHA1 Message Date
jeffro256 ba98269ca5
wallet2: fix `store_to()` and `change_password()`
Resolves #8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
2023-08-23 11:52:31 -05:00
luigi1111 9d5c5b5634
Merge pull request #8942
78348bc wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:24:16 -05:00
jeffro256 78348bcddd
wallet-rpc: restore from multisig seed 2023-08-10 10:13:07 -05:00
j-berman f137a35984 Enforce restricted # pool txs served via RPC + optimize chunked reqs [release-v0.18]
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-07-09 08:38:18 +02:00
rbrunner7 23f782b211 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call [release-v0.18] 2023-07-09 08:30:53 +02:00
luigi1111 5a99b2dfbe
Merge pull request #8905
dc24312 wallet: respect frozen key images in multisig wallets [RELEASE] (jeffro256)
2023-07-06 21:38:34 -05:00
luigi1111 60e9426ef2
Merge pull request #8566
65e13db wallet2: fix rescanning tx via scan_tx (j-berman)
2023-06-27 11:20:25 -05:00
jeffro256 dc24312bc3 wallet: respect frozen key images in multisig wallets [RELEASE]
Before this change, if a multisig peer asked you to sign a transaction with a frozen enote, the wallet will do it without any error or warning. This change makes it
so that wallets will refuse to sign multisig transactions with frozen enotes.

Disclaimer: This PR was generously funded by @LocalMonero.
2023-06-12 16:49:33 -05:00
Crypto City 132804811d
wallet2: fix infinite loop in fake out selection
The gamma picker and the caller code did not quite agree on the
number of rct outputs available for use - by one block - which
caused an infinite loop if the picker could never pick outputs
from that block but already had picked all other outputs from
previous blocks.

Also change the range to select from using code from UkoeHB.
2023-03-25 19:26:43 +00:00
j-berman 65e13dbef1 wallet2: fix rescanning tx via scan_tx
- Detach & re-process txs >= lowest scan height
- ensures that if a user calls scan_tx(tx1) after scanning tx2,
the wallet correctly processes tx1 and tx2
- if a user provides a tx with a height higher than the wallet's
last scanned height, the wallet will scan starting from that tx's
height
- scan_tx requires trusted daemon iff need to re-process existing
txs: in addition to querying a daemon for txids, if a user
provides a txid of a tx with height *lower* than any *already*
scanned txs in the wallet, then the wallet will also query the
daemon for all the *higher* txs as well. This is likely
unexpected behavior to a caller, and so to protect a caller from
revealing txid's to an untrusted daemon in an unexpected way,
require the daemon be trusted.
2023-03-13 12:57:43 -07:00
koe 1cd21bfba5 add an option to force-update multisig key exchange under some circumstances 2022-09-21 12:51:19 -05:00
luigi1111 7cbae6ca98
Merge pull request #8545
12e7c41 Merge pull request #5 from j-berman/restore-msig-encrypted-seed (Justin Berman)
848a0c0 Fix segfault restoring encrypted multisig seed (j-berman)
401f5d9 Require user ack multisig is experimental to restore (j-berman)
fc8a5d6 multisig: fix #8537 seed restore (suggestions by @UkoeHB) (j-berman)
2022-09-15 16:25:22 -05:00
j-berman 864a78ee5f wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:23:08 -06:00
moneromooo-monero 1d3657afb5
wallet2: better test on whether to allow output import
Being offline is not a good enough heuristic, so we keep track
of whether the wallet ever refreshed from a daemon, which is a
lot better, and probably the best we can do without manual user
designation (which would break existing cold wallet setups till
the user designates those wallets)
2022-09-07 06:22:31 +00:00
moneromooo-monero 0cbf5571d3
allow exporting outputs in chunks
this will make it easier huge wallets to do so without hitting
random limits (eg, max string size in node).
2022-09-07 06:22:07 +00:00
j-berman b03d7091f7
wallet2: fixes for export/import output flow
- only allow offline wallets to import outputs
- don't import empty outputs
- export subaddress indexes when exporting outputs
2022-09-06 17:20:23 -06:00
moneromooo-monero 0de1571abd
wallet2: fix missing subaddress indices in "light" exported outputs 2022-09-06 18:25:45 +00:00
j-berman fc8a5d68f1 multisig: fix #8537 seed restore (suggestions by @UkoeHB)
- spend secret key is no longer the sum of multisig key shares;
no need to check that is the case upon restore.
- restoring a multisig wallet from multisig info means that the
wallet must have already completed all setup rounds. Upon restore,
set the number of rounds completed accordingly.
2022-09-01 16:25:28 -07:00
luigi1111 02cbccc529
Merge pull request #8432
edcc094 derive multisig tx secret keys from an entropy source plus the tx inputs' key images (koe)
2022-07-14 22:14:41 -04:00
luigi1111 d912444a4a
Merge pull request #7986
5770265 wallet2: keep around transaction prefix for confirmed transfers (tobtoht)
2022-07-14 12:54:39 -04:00
koe edcc094558 derive multisig tx secret keys from an entropy source plus the tx inputs' key images 2022-07-13 12:40:34 -05:00
luigi1111 cfdee9ba69
Merge pull request #8421
bd1e7c5 wallet2: prevent crash when reading tx w/fewer outputs than expected (j-berman)
2022-07-13 00:39:54 -04:00
luigi1111 6fed8c2d9f
Merge pull request #8149
c7b2944 multisig: fix critical vulnerabilities in signing (anon)
2022-07-13 00:38:29 -04:00
j-berman bd1e7c5635 wallet2: prevent crash when reading tx w/fewer outputs than expected 2022-07-05 21:39:59 -07:00
anon c7b2944f89 multisig: fix critical vulnerabilities in signing 2022-06-30 12:56:40 -05: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 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
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
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 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 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
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
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
koe e08abaa43f multisig key exchange update and refactor 2022-02-22 16:37:42 -06: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
tobtoht 5770265a16
wallet2: keep around transaction prefix for confirmed transfers 2021-10-01 12:42:48 +02:00
Nathan Dorfman c57ef7f807 wallet2: Fix rescan_bc keep_ki option 2021-04-23 09:11:45 -06:00
luigi1111 3c69596bc9
Merge pull request #7321
f9b5b52 fix serialization being different on mac (moneromooo-monero)
2021-04-06 12:20:15 -05:00
luigi1111 ac091fb539
Merge pull request #7358
f346e3e wallet_rpc_payments: implement multithreading (gdmojo)
2021-03-29 21:10:48 -04: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
gdmojo f346e3ec0e wallet_rpc_payments: implement multithreading 2021-02-20 18:23:06 +00: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