Commit Graph

1405 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 eac1b86bb2
Merge pull request #8957
b51f4a9 scan_tx: fix custom comparator for == case; fixes #8951 (j-berman)
2023-08-17 10:26:52 -05:00
luigi1111 3bebcc4a7d
Merge pull request #8953
ed05ac6 wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
2023-08-17 10:25:27 -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 b51f4a9244 scan_tx: fix custom comparator for == case; fixes #8951
Co-authored-by: woodser <woodser@protonmail.com>
2023-07-19 07:45:33 -07:00
jeffro256 ed05ac6872
wallet2: when checking frozen multisig tx set, don't assume order 2023-07-17 22:53:55 -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 ab826008d6
Merge pull request #8917
835896e wallet2: do not lose exception in current thread on refresh (Crypto City)
62bb95b wallet2: fix missing exceptions from failing wallet refresh (Crypto City)
2023-07-06 21:40:45 -05: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
Crypto City 835896ea24
wallet2: do not lose exception in current thread on refresh 2023-06-27 11:08:45 +00:00
Crypto City 62bb95b25f
wallet2: fix missing exceptions from failing wallet refresh 2023-06-27 11:08:45 +00: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
j-berman 85c9fe515d wallet2: fix create view-only wallet from existing wallet 2022-10-18 13:47:50 -05:00
luigi1111 0bef4265ac
Merge pull request #8585
5ffa31c wallet2: fail to establish daemon cxn == 'Disconnected' cxn status (j-berman)
2022-09-26 14:57:58 -05:00
luigi1111 a7b0c93c7d
Merge pull request #8582
1cd21bf add an option to force-update multisig key exchange under some circumstances (koe)
2022-09-26 14:55:28 -05:00
j-berman 5ffa31c48e wallet2: fail to establish daemon cxn == "Disconnected" cxn status 2022-09-21 20:12:16 -06:00
koe 1cd21bfba5 add an option to force-update multisig key exchange under some circumstances 2022-09-21 12:51:19 -05:00
SChernykh 6adf03cdc5 Second thread pool for IO 2022-09-20 10:22:12 +02: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
luigi1111 af4f97bf66
Merge pull request #8555
e29b2e9 wallet2: ensure imported outputs subaddresses are created (moneromooo-monero)
1d3657a wallet2: better test on whether to allow output import (moneromooo-monero)
0cbf557 allow exporting outputs in chunks (moneromooo-monero)
b03d709 wallet2: fixes for export/import output flow (j-berman)
4b7eb57 wallet2: do not assume imported outputs must be non empty (moneromooo-monero)
5b98beb wallet2: prevent importing outputs in a hot wallet (moneromooo-monero)
0de1571 wallet2: fix missing subaddress indices in 'light' exported outputs (moneromooo-monero)
2022-09-09 12:57:51 -05:00
moneromooo-monero e29b2e9997
wallet2: ensure imported outputs subaddresses are created
reported by j-berman
2022-09-07 06:22:31 +00: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 625147e577 Fix missing semi-colon in error message
Co-authored-by: woodser <woodser@protonmail.com>
2022-09-06 18:37:25 -06: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 4b7eb573b2
wallet2: do not assume imported outputs must be non empty 2022-09-06 18:25:48 +00:00
moneromooo-monero 5b98bebad1
wallet2: prevent importing outputs in a hot wallet 2022-09-06 18:25:48 +00: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 070c3d6b0f
Merge pull request #8433
db8181a wallet2: force using output distribution for ringct outs (tobtoht)
2022-07-14 22:15:27 -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 6fed8c2d9f
Merge pull request #8149
c7b2944 multisig: fix critical vulnerabilities in signing (anon)
2022-07-13 00:38:29 -04:00
luigi1111 4476c35fc8
Merge pull request #8408
09a597b wallet2: don't use DNS to obtain segregation heights (tobtoht)
2022-07-06 00:01:59 -05:00
luigi1111 cea2498e95
Merge pull request #8404
50ccc7e wallet2: remove obsolete rpc version check (tobtoht)
2022-07-06 00:01:29 -05:00
luigi1111 7a118f08f4
Merge pull request #8394
4278a3a cryptonote_basic: catch crypto api errors (moneromooo-monero)
2022-07-06 00:00:24 -05:00
luigi1111 45a44aa45f
Merge pull request #8388
04c0da2 Chunk /gettransactions to avoid hitting restricted RPC limit (tobtoht)
2022-07-05 23:58:46 -05:00
anon c7b2944f89 multisig: fix critical vulnerabilities in signing 2022-06-30 12:56:40 -05:00
tobtoht 09a597ba28
wallet2: don't use DNS to obtain segregation heights 2022-06-28 23:12:03 +02:00
tobtoht 04c0da2986
Chunk /gettransactions to avoid hitting restricted RPC limit 2022-06-27 21:23:56 +02:00
tobtoht db8181adf8
wallet2: force using output distribution for ringct outs
Co-authored-by: j-berman <justinberman@protonmail.com>
2022-06-25 13:06:11 +02:00
tobtoht 50ccc7e726
wallet2: remove obsolete rpc version check 2022-06-24 21:58:07 +02:00
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