Commit Graph

638 Commits

Author SHA1 Message Date
dsc dad8e3cadd
Add CoinsInfo->description and 'preferred_inputs' to create_transaction 2024-03-10 11:57:34 +03:00
thotbot 3f78176f3d
Import transaction 2024-03-09 16:04:03 +03:00
hinto-janaiyo 8ccfd46a41
simplewallet/wallet2: set option - show-detailed-prompt 2024-03-09 16:03:21 +03:00
thotbot e60954b619
Misc. network related
- Add interface for bytes sent/received
- Allow wallet refresh while daemon is not synchronized
- emit success boolean for refreshed()
- don't call refreshThreadFunc (we don't need it)
- lower rpc timeout from 3m30s (?!) to 10 seconds
2024-03-09 16:01:32 +03:00
thotbot 4f8ad5bfac
Print wallet cache 2024-03-09 16:01:30 +03:00
thotbot 3234b5fe62
Misc. wallet API and wallet2 changes 2024-03-09 16:01:30 +03:00
wowario c7190cdd0f
rename ringdb-dir 2024-03-09 15:58:13 +03:00
luigi1111 81f113dd8c
Merge pull request #9008
9a89e2d wallet2: call on_reorg callback in handle_reorg (j-berman)
1df5630 wallet2: add on_reorg callback (Crypto City)
2024-02-24 09:58:30 -05:00
jeffro256 51d7a6921c
wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:42 -06:00
selsta 03d51b7cc4
wallet2: fix refresh function parameters
max_blocks is last on master branch
2023-10-01 20:56:31 +02:00
Crypto City 1df5630f23 wallet2: add on_reorg callback 2023-09-27 12:50:34 -07:00
luigi1111 031d318ca2
Merge pull request #8941
356e687 wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (moneromooo-monero) 633e1b7 wallet_rpc_server: add --no-initial-sync flag for quicker network binding (moneromooo-monero)
2023-09-14 22:19:27 -05:00
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
moneromooo-monero 356e6877dc
wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing 2023-08-17 15:35:00 +00: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