Commit graph

2378 commits

Author SHA1 Message Date
jeffro256
ed955bf751
build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions
3. Removed reimplementation of `std::hash` for `boost::uuids::uuid
4. Removed `<<` operator overload for `crypto::secret_key`
5. Removed instances in code where private view key was dumped to the log in plaintext
2024-09-06 11:46:22 -05:00
luigi1111
28788bc031
Merge pull request #9425
fc0a4b4 Make wallet2::estimate_fee static (Lee Clagett)
2024-08-13 12:18:24 -04:00
Lee Clagett
fc0a4b4b04 Make wallet2::estimate_fee static 2024-08-07 13:47:31 -04:00
luigi1111
8dbbc47804
Merge pull request #9379
6c28bdb wallet2: move get_rpc_status func to RPC server definition file (j-berman)
2024-07-16 18:58:08 -04:00
luigi1111
c2fceb2939
Merge pull request #9344
a026d5a wallet2: validate fetched block height and parent hash (Oscar Mira)
c634c26 wallet2: use start_height consistently as const in process_parsed_blocks (Oscar Mira)
2024-07-16 18:48:43 -04:00
luigi1111
baf6df06c2
Merge pull request #9343
302fa9b wallet: fetch pool txs in pruned form (jeffro256)
2024-07-16 18:46:04 -04:00
luigi1111
040bccc22f
Merge pull request #9338
4a376d6 copyright: fix vector.h typo (hinto.janaiyo)
d61e8e9 workflows: delete copyright.yml (plowsof)
341771a copyright: bump to 2024 (copyCat)
2024-07-16 18:42:49 -04:00
luigi1111
d7eece3cae
Merge pull request #8619
e71c8bf wallet: background sync with just the view key (j-berman)
2024-07-16 18:29:47 -04:00
Oscar Mira
a026d5ac44
wallet2: validate fetched block height and parent hash 2024-07-05 05:45:28 +02:00
Oscar Mira
c634c261c2
wallet2: use start_height consistently as const in process_parsed_blocks 2024-07-04 13:01:12 +02:00
j-berman
6c28bdb856 wallet2: move get_rpc_status func to RPC server definition file 2024-06-24 17:44:23 -07:00
jeffro256
302fa9b5df
wallet: fetch pool txs in pruned form 2024-05-28 11:19:46 -05:00
j-berman
e71c8bf190 wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
all receives, spends, and "plausible" spends of receives the
wallet does not know key images for.
- When background sync disabled, the wallet processes all
background synced txs and then clears the background sync cache.
- Adding "plausible" spends to the background sync cache ensures
that the wallet does not need to query the daemon to see if any
received outputs were spent while background sync was enabled.
This would harm privacy especially for users of 3rd party daemons.
- To enable the feature in the CLI wallet, the user can set
background-sync to reuse-wallet-password or
custom-background-password and the wallet automatically syncs in
the background when the wallet locks, then processes all
background synced txs when the wallet is unlocked.
- The custom-background-password option enables the user to
open a distinct background wallet that only has a view key saved
and can be opened/closed/synced separately from the main wallet.
When the main wallet opens, it processes the background wallet's
cache.
- To enable the feature in the RPC wallet, there is a new
`/setup_background_sync` endpoint.
- HW, multsig and view-only wallets cannot background sync.
2024-05-24 23:11:58 -07:00
koe
ddf3af1f0c add key exchange round booster to multisig_account 2024-05-21 15:27:08 -05:00
selsta
a28c38c946
wallet2: correct variable usage in get_multisig_seed 2024-05-21 19:22:39 +02:00
copyCat
341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
luigi1111
e6acde1a07
Merge pull request #9310
6d4f7b8 wallet2: fix stagenet get_approximate_blockchain_height (selsta)
2024-05-20 23:41:06 -05:00
luigi1111
6c346eca03
Merge pull request #9305
de9c461 common: support boost filesystem copy_options. Co-authored-by: selsta <selsta@sent.at> (0xFFFC0000)
2024-05-20 23:38:20 -05:00
luigi1111
b208eed32a
Merge pull request #9270
267e31f Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. (0xFFFC0000)
2024-05-20 23:35:48 -05:00
luigi1111
812535390f
Merge pull request #9259
427ba77 wallet2: ensure transfers and sweeps use same fee calc logic rnd2 (j-berman)
2024-05-20 23:32:48 -05:00
luigi1111
1e5ad57e2e
Merge pull request #9211
9b946ae Removed default cryptonote address (SyntheticBird45)
2024-05-20 23:16:59 -05:00
luigi1111
cdd7fc09b4
Merge pull request #9151
ff49444 @tobtoht: undo rebase changes tx.dsts -> tx_dsts (jeffro256)
38f354e Enforce Tx unlock_time is Zero by Relay Rule (jeffro256)
2024-05-20 23:11:09 -05:00
luigi1111
3a47cdad13
Merge pull request #7852
8d94d08 replace 'multisig()' with 'get_multisig_status()' using multisig_account_status and including '.kex_is_done' member (koe)
2024-05-20 22:35:57 -05:00
de9c461a98
common: support boost filesystem copy_options.
Co-authored-by: selsta <selsta@sent.at>
2024-04-30 23:20:10 +00:00
selsta
6d4f7b89c3
wallet2: fix stagenet get_approximate_blockchain_height 2024-04-28 21:15:38 +02:00
267e31f5b7
Add drop_and_recreate in privatefile class.
When creating a private file we need to delete the file if exist.
2024-04-22 14:32:12 +00:00
jeffro256
ff49444ee8
@tobtoht: undo rebase changes tx.dsts -> tx_dsts 2024-04-05 13:12:34 -05:00
j-berman
427ba7702f wallet2: ensure transfers and sweeps use same fee calc logic rnd2
Looks like the logic from #8882 was accidentally removed in #8861
(regressing to the behavior noted in the #8882 description).
This commit brings that logic back.
2024-03-22 14:05:17 -07:00
9b946ae527 Removed default cryptonote address
- Removed `localhost:8080` default value to address string in wallet rpc
- Added an error response in case string is empty

fixed indentation

removed if and errors, default to localhost and port based on nettype

Forgot ":"

forgot ; and m_

removed wallet_rpc_server_error_codes.h
2024-03-08 21:32:26 +01:00
selsta
e6f4875219
wallet2: adjust fee during backlog, fix set priority 2024-03-08 14:13:58 +01:00
jeffro256
38f354e89f
Enforce Tx unlock_time is Zero by Relay Rule
Related to https://github.com/monero-project/research-lab/issues/78

Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions.

UIs changed:
* Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli`

APIs changed:
* Removed `unlock_time` parameters from `wallet2` transfer methods
* Wallet RPC transfer endpoints send error codes when requested unlock time is not 0
* Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions
2024-02-24 14:27:17 -06:00
luigi1111
72d87cd10a
Merge pull request #9160
c50ade5 Daemon-specific proxy for the wallet-rpc. (0xFFFC0000)
2024-02-24 10:11:51 -05:00
luigi1111
2dc918402c
Merge pull request #9006
47042ce wallet2: call on_reorg callback in handle_reorg (j-berman)
2024-02-24 09:57:55 -05:00
jeffro256
b13c5f6669
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:06 -06:00
c50ade514f
Daemon-specific proxy for the wallet-rpc.
1. Daemon-specific proxy is exclusive with global proxy (--proxy).
2. If you set global proxy (--proxy) you cannot set daemon-specific proxy.
3. If you don't set global proxy, you can set proxy (or not set) proxy for
each daemon connection with the proxy field in jsonrpc to the wallet-rpc.
2024-02-18 18:36:52 +00:00
luigi1111
8ee57110b0
Merge pull request #9077
2525200 serialization: remove container wrappers and serialize directly (jeffro256)
2024-01-18 18:02:31 -05:00
luigi1111
2eed43cef2
Merge pull request #9059
2766d12 MMS: Ignore 2 more API errors thrown by latest PyBitmessage (rbrunner7)
2024-01-18 17:58:57 -05:00
luigi1111
2a6f7efca6
Merge pull request #9049
1062b17 wallet: sign_tx: get tx pubkey from extra (tobtoht)
2024-01-18 17:56:55 -05:00
luigi1111
5f6646020e
Merge pull request #9023
b2eb47d wallet: mitigate statistical dependence for decoy selection within rings (jeffro256)
2024-01-18 17:55:49 -05:00
jeffro256
2525200185
serialization: remove container wrappers and serialize directly
Some downstream code (most notably PR https://github.com/UkoeHB/monero/pull/25) wants to use the src/serialization lib
for storing information persistently. When one builds classes/machines wishing to serialize containers, they must use
the `serializable_*` container classes. In this case, this makes the Seraphis library code unnecessarily tightly coupled
with the src/serialization code since one cannot swap out their type of storage format without major refactoring of class
field types. By serializing STL containers directly, we can abstract the serialization details away, making for much
cleaner design. Also small bonus side effect of this change is that STL containers with custom Comparators, Allocators,
and Hashers are serializable. `std::multimap` is added to the list of serializable containers.

Depends upon https://github.com/monero-project/monero/pull/9069.
2023-11-28 14:06:24 -06:00
luigi1111
ac02af9286
Merge pull request #9050
23179a0 wallet: fix multisig key memory leak (jeffro256)
2023-11-06 09:38:08 -05:00
luigi1111
b22ba16dec
Merge pull request #9038
e191083 epee: remove dead code in math_helper and string_tools (jeffro256)
2023-11-06 09:31:33 -05:00
rbrunner7
2766d12a62 MMS: Ignore 2 more API errors thrown by latest PyBitmessage 2023-11-05 16:11:52 +01:00
tobtoht
1062b172b6
wallet: sign_tx: get tx pubkey from extra 2023-11-02 15:19:05 +01:00
jeffro256
23179a0ba4
wallet: fix multisig key memory leak
Multisig keys per-transfer were being wiped, but not erased, which lead to a ginormous
quadratic bloat the more transfers and exports you performed with the wallet.
2023-11-02 02:58:50 -05:00
luigi1111
e946315627
Merge pull request #9002
932bba3 depends: remove libiconv: unused (tobtoht)
2023-10-25 21:38:32 -04:00
luigi1111
fc4397010d
Merge pull request #8974
759293d wallet2: fix version check at hf version 1 (j-berman)
2023-10-25 21:36:36 -04:00
luigi1111
e3d0154b5b
Merge pull request #8969
8190f25 KV_SERIALIZE: remove extraneous semicolons in DSL (jeffro256)
2023-10-25 21:35:43 -04:00
jeffro256
e191083bed
epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
jeffro256
b2eb47d875
wallet: mitigate statistical dependence for decoy selection within rings
Since we are required to check for uniqueness of decoy picks within any given
ring, and since some decoy picks may fail due to unlock time or malformed EC points,
the wallet2 decoy selection code was building up a larger than needed *unique* set of
decoys for each ring according to a certain distribution *without replacement*. After
filtering out the outputs that it couldn't use, it chooses from the remaining decoys
uniformly random *without replacement*.

The problem with this is that the picks later in the picking process are not independent
from the picks earlier in the picking process, and the later picks do not follow the
intended decoy distribution as closely as the earlier picks. To understand this
intuitively, imagine that you have 1023 marbles. You label 512 marbles with the letter A,
label 256 with the letter B, so on and so forth, finally labelling one marble with the
letter J. You put them all into a bag, shake it well, and pick 8 marbles from the bag,
but everytime you pick a marble of a certain letter, you remove all the other marbles
from that bag with the same letter. That very first pick, the odds of picking a certain
marble are exactly how you would expect: you are twice as likely to pick A as you are B,
twice as likely to pick B as you are C, etc. However, on the second pick, the odds of
getting the first pick are 0%, and the chances for everything else is higher. As you go
down the line, your picked marbles will have letters that are increasingly more unlikely
to pick if you hadn't remove the other marbles. In other words, the distribution of the
later marbles will be more "skewed" in comparison to your original distribution of marbles.

In Monero's decoy selection, this same statistical effect applies. It is not as dramatic
since the distribution is not so steep, and we have more unique values to choose from,
but the effect *is* measureable. Because of the protocol rules, we cannot have duplicate
ring members, so unless that restriction is removed, we will never have perfectly
independent picking. However, since the earlier picks are less affected by this
statistical effect, the workaround that this commit offers is to store the order that
the outputs were picked and commit to this order after fetching output information over RPC.
2023-10-17 00:53:40 -05:00