Commit graph

817 commits

Author SHA1 Message Date
Justin Berman
e23d51bc16 wallet: improve lookahead logic & make rpc persistent 2025-07-07 22:21:43 +00:00
benevanoff
8f5a7b0f1a wallet: ensure subaddress keys table is at least size of requested lookahead 2025-07-03 16:10:29 +00:00
Bastian Germann
fe1a10d70e
Replace in-tree MD5 with OpenSSL
This uses OpenSSL's non-deprecated EVP digest facility to calculate MD5
in HTTP digest authentication.
2025-03-14 14:00:16 +01:00
tobtoht
3da68db978
Merge pull request #9740
008ba966d blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
2025-03-10 16:20:00 +00:00
jeffro256
008ba966da
blockchain sync: reduce disk writes from 2 to 1 per tx 2025-03-10 01:32:08 -05:00
Lee *!* Clagett
01bcd52924 Fix build with boost ASIO 0.87. Support boost 1.66+ 2025-02-14 13:29:57 -05:00
Lee *!* Clagett
13ff355cf6 Set response limits on http server connections 2025-02-14 00:21:05 -05:00
tobtoht
3b1300d2af
Merge pull request #9790
d13da6e71 tests: include <iomanip> where using std::setfill (jeffro256)
2025-02-13 18:14:02 +00:00
tobtoht
5b045d70e0
Merge pull request #8617
e44e8b164 wallet: background sync with just the view key (j-berman)
2025-02-13 17:43:24 +00:00
jeffro256
d13da6e71d
tests: include <iomanip> where using std::setfill 2025-02-09 09:12:04 +01:00
iamamyth
84e44dd012 tests: Fix tools::is_hdd unit tests
Correct the unit tests for tools::is_hdd to avoid making assumptions
about the configuration of a particular device based solely on the
value of the __GLIBC__ preprocessor flag. Instead, rely on the
test invoker to provide paths for devices of specific types via
the process environment, thereby avoiding faulty assumptions and
improving the specificity of test assertions. To ensure appropriate
devices exist, add a script, tests/create_test_disks.sh, which
configures loopback devices mirroring relevant configurations.
2025-02-08 02:55:03 +01:00
tobtoht
00e582a2b1
Merge pull request #9460
0cd74568d Cleanup TCP throttling code (performance) + move connection checks (Lee *!* Clagett)
2025-01-22 22:47:10 +00:00
tobtoht
d8e5a17883
tests: fix IPv4Success, DNSSECSuccess
"example.com" now has more than one A record
2025-01-16 13:17:36 +01:00
luigi1111
a6f21ca4bd
Merge pull request #9616
a1b545a p2p: allow comments in banlist files (jeffro256)
2024-12-23 11:04:59 -05:00
Lee *!* Clagett
0cd74568d6 Cleanup TCP throttling code (performance) + move connection checks 2024-12-19 20:54:22 -05:00
0xFFFC0000
13df862535 contrib: force (de)serialization to create params section incase there is none.
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-12-13 19:49:55 +00:00
jeffro256
a1b545a2f7
p2p: allow comments in banlist files
In-line comments explicitly explaining banned hosts/subnets might help assuage fears of some good banlists' arbitaryiness.
2024-12-13 13:37:39 -06:00
jeffro256
65568d3a88
build: fix build with Boost 1.85 and remove instances of viewkey logging [RELEASE]
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. Removed reimplementation of std::hash for boost::uuids::uuid
3. Removed << operator overload for crypto::secret_key
4. Removed instances in code where private view key was dumped to the log in plaintext

Release version of #9450, containing C++14 modified assertions
2024-09-10 16:07:36 -05:00
tobtoht
7cb69fa6bc
epee: string_tools: keep full path in cut_off_extension 2024-08-14 19:50:06 +02:00
tobtoht
c7d4bf491e
epee: string_tools: remove dot from get_extension
Fixes a regression introduced in #9254. Previously it did not
include the dot.
2024-08-14 16:57:49 +02:00
luigi1111
bedfa83ea0
Merge pull request #9385
c5ad937 Fix ZMQ DaemonInfo: (Lee *!* Clagett)
2024-08-13 12:15:57 -04:00
Lee *!* Clagett
c5ad937cc1 Fix ZMQ DaemonInfo:
* top_block_hash was never set in handler
  * wide_difficulty was never sent in JSON
  * wide_cumulative_difficulty was never sent in JSON
2024-06-24 20:06:33 -04:00
0xFFFC0000
8dbc361e98
cryptonote_protocol: prevent duplicate txs in fluff queue
1. Fix duplicate transaction #9335
2. Add test for cases where there are duplicate transaction in fluff

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-06-06 17:33:17 +03:30
j-berman
e44e8b1640 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 20:42:59 -07:00
luigi1111
1ec7eae036
Merge pull request #9311
dd47d03 Enforce Tx unlock_time is Zero by Relay Rule [RELEASE] (jeffro256)
2024-05-20 23:42:54 -05:00
luigi1111
b13e597e8e
Merge pull request #9306
755dddd common: support boost filesystem copy_options. Co-authored-by: selsta <selsta@sent.at> (0xFFFC0000)
2024-05-20 23:39:01 -05:00
0xFFFC0000
755dddd2bc
common: support boost filesystem copy_options.
Co-authored-by: selsta <selsta@sent.at>
2024-05-01 02:51:08 +03:30
jeffro256
dd47d03cf2
Enforce Tx unlock_time is Zero by Relay Rule [RELEASE]
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

@tobtoht: undo rebase changes tx.dsts -> tx_dsts
2024-04-29 00:08:53 -05:00
Lee *!* Clagett
7686af7acf Skip privacy networks (on tx sends) that don't have outgoing connections 2024-03-29 15:30:14 -04:00
jeffro256
7807f569e4
unit_tests: fix strtoul unit test 2024-03-07 16:10:01 +01:00
luigi1111
68e40ea2a7
Merge pull request #9158
33e3f72 serialization: fix infinite loops and clean up dispatching (jeffro256)
2024-02-24 10:19:58 -05:00
luigi1111
b335433204
Merge pull request #9145
f5b8634 Add <cstdint> to aligned test (Lee *!* Clagett)
2024-02-24 10:07:23 -05:00
luigi1111
8a1e49664e
Merge pull request #9142
98ee46f Disable/fix ports with I2P (Lee Clagett)
2024-02-24 10:06:26 -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
jeffro256
33e3f72d24
serialization: fix infinite loops and clean up dispatching
Resolves #8687
2024-02-08 13:22:33 -06:00
Lee Clagett
98ee46f249 Disable/fix ports with I2P 2024-01-30 13:36:21 -05:00
Lee *!* Clagett
f5b86342e8 Add <cstdint> to aligned test 2024-01-29 21:40:50 -05:00
luigi1111
8eab181fe1
Merge pull request #9080
47d8899 Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:43 -05:00
Lee Clagett
47d8899c90 Fix missing checks for IsObject in ZMQ jsonrpc reading 2023-11-28 18:05:15 -05:00
Boog900
69de381526
add a test for the long term weight cache 2023-10-02 15:28:50 +01: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
tobtoht
8dc4abdafe
common: do not use DNS to determine if address is local
Co-authored-by: j-berman <justinberman@protonmail.com>
2023-05-25 18:06:34 +02:00
Jeffrey Ryan
c59e0096b6 verRctNonSemanticsSimpleCached: fix fragility 2023-03-17 18:46:34 -05:00
luigi1111
153819fc4c
Merge pull request #8649
2c24322 DNSResolver: fix not handling hostnames without dot characters [release] (Jeffrey Ryan)
2023-01-11 11:41:56 -05:00
luigi1111
cbc5cf43f2
Merge pull request #8644
38d4811 p2p: fix exclusive node DNS resolution for certain hosts [release] (Jeffrey Ryan)
2023-01-11 11:40:13 -05:00
Jeffrey Ryan
2c2432245f DNSResolver: fix not handling hostnames without dot characters [release]
Unrelated, but similar code-wise to #8643. There is a check in `DNSResolver` which automatically fails to resolve hostnames which do not contain the `.` character. This PR removes that check.
2022-11-21 21:16:16 -06:00
Jeffrey Ryan
38d4811c89 p2p: fix exclusive node DNS resolution for certain hosts [release]
Fixes #8633. The function `append_net_address` did not parse hostname + port addresses (e.g. `bar:29080`) correctly if the hostname did not contain a `'.'` character.

@vtnerd comments 1

clear up 2nd conditional statement
2022-11-17 18:57:04 -06:00
Lee Clagett
1bb5d25e31 Fix dandelion++ fluff/stem bug with local txes 2022-10-25 16:01:09 -04:00
luigi1111
1f27fdf6a5
Merge pull request #8588
802c4bb Move update_checkpoints() to a later stage (SChernykh)
2022-09-26 15:00:59 -05:00
SChernykh
802c4bb0e4 Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:06:39 +02:00