1606 Commits

Author SHA1 Message Date
j-berman
c01e1fa288 Fix logging deadlock 2025-11-11 10:43:39 -08:00
jeffro256
32d9359b9a fuzz: fix some warnings 2025-10-28 01:13:00 -05:00
tobtoht
b4a168b5f8 Merge pull request #10083
daded36 wallet: identify spends in pool when scanning (j-berman)
2025-10-27 18:50:40 +00:00
0xFFFC0000
5860b43d94 tests: only enable fuzz testing if ENABLE_FUZZ_TEST defined 2025-09-24 12:05:00 +00:00
j-berman
daded36823 wallet: identify spends in pool when scanning
- Make sure to mark identified spends in the pool as spends. The
wallet might not know these have been spent if it wasn't the wallet
that relayed the tx to the daemon, or the wallet was cleared via
rescan_bc.
- Make sure to add spends to m_unconfirmed_txs if not present.
- Make sure to process the entire pool again if refreshing for
the first time. The wallet fetches pool and blocks at the same
time. The wallet scans blocks first, then pool. If the wallet
identifies received outputs in the chain, then it may have spent
those received outputs in the pool. So we make sure to re-process
the entire pool again after scanning the chain for the first time.
- Multisig wallets that know about spent key images can now detect
spend txs in the pool. Update tests for that.
2025-09-15 14:14:50 -07:00
tobtoht
8d4c625713 Merge pull request #10004
36bdfad rpc-fuzz: Add new fuzzers for RPC endpoints (Arthur Chan)
2025-09-09 17:39:15 +00:00
Arthur Chan
36bdfad073 rpc-fuzz: Add new fuzzers for RPC endpoints
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add macro definition for fuzzers

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix FuzzedDataProvider header missing problem

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add README

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Provide static FuzzedDataProvider.h

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Update and enhance fuzzer

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Activate UBSan

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix fuzz target retrieval

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Remove bias selector and fix protocol lifespan

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Drop SIGALARM handling and fix bug on selectors

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix rpc request changes

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add a new fuzzer profile that catch all expcetions

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix typo

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add warning

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
2025-09-08 18:35:55 +00:00
tobtoht
8259df0d1d Merge pull request #9860
dbc8402 wallet: fix wallet_keys_unlocker (jeffro256)
2025-09-08 18:08:22 +00:00
jeffro256
dbc8402da6 wallet: fix wallet_keys_unlocker
Fix four issues with wallet_keys_unlocker:
1. It won't decrypt if there are unlockers open simulataneously on multiple `wallet2` instances
2. It won't decrypt if the first unlocker was disabled (i.e. `locked=false`), even with a second non-disabled unlocker
3. If a destructor of an earlier unlocker is triggered before the destructor of a later unlocker, it will re-encrypt too early, while the second unlocker is still in scope
4. Calling the 3-parameter constructor with `locked=true` after an unlocker already exists will "double-encrypt"  the spend key after its destructor since the local variable is `locked=false` and the field member is `locked=true`

Also, replace `wallet2::decrypt_account_for_multisig` with `wallet_keys_unlocker`.
2025-09-04 15:43:38 -05:00
jeffro256
57c40b8993 functional_tests: fix piecemeal export in cold_signing, part 2
Do not mark output import as done if exception is thrown for output being past last imported output.
2025-08-26 15:38:25 -05:00
jeffro256
22433f8414 functional_tests: fix piecemeal export in cold_signing
The `while` loop condition was incorrect, which could lead to incomplete imports.
Also, setting `start` to an *undone* output speeds up the test by 16s on my machine.
2025-08-22 13:21:32 -05:00
jeffro256
78b8c83fdf functional_tests: check transfers list consistency in cold_signing 2025-08-21 11:34:58 -05:00
tobtoht
4e93cdc941 Merge pull request #9883
7b28be0 functional_tests: test PR #9863 (jeffro256)
2025-08-21 16:31:19 +00:00
tobtoht
6dc7b1f8fb Merge pull request #9921
90256c8 error out if functional tests are disabled (Crypto City)
2025-08-21 16:19:30 +00:00
David Korczynski
4775755456 tests: add OSS-Fuzz documentation
Adds documentation that outlines the OSS-Fuzz integration of Monero. The
goal is to make it more accessible to build/test/expand the existing
fuzz suite, and also to make it more visible that this integration
exists.

Signed-off-by: David Korczynski <david@adalogics.com>
2025-07-31 11:30:42 -07:00
tobtoht
08438b60c1 Merge pull request #9838
2f2a8c4 wallet: Improve Fee Priority Code for Clarity (tzadiko)
2025-07-10 12:45:39 +00:00
tobtoht
ff000b654d Merge pull request #9927
6fd3a2e tools::variant: remove (jeffro256)
2025-07-10 12:32:20 +00:00
tobtoht
6f2efeca1e Merge pull request #9940
e9c89dc wallet: kill support for deprecated ephemeral Boost messages (jeffro256)
2025-07-10 12:29:13 +00:00
tzadiko
2f2a8c46bb wallet: Improve Fee Priority Code for Clarity 2025-07-09 20:08:42 -05:00
jeffro256
6d06de74b2 wallet: refactor subaddress expansion & add to transfer test 2025-07-07 22:16:11 +00:00
Justin Berman
6e26e4477e wallet: improve lookahead logic & make rpc persistent 2025-07-07 22:16:09 +00:00
benevanoff
6f36037116 wallet: create set_subaddress_lookahead wallet rpc endpoint 2025-07-07 22:15:04 +00:00
benevanoff
b987676d63 wallet: ensure subaddress keys table is at least size of requested lookahead 2025-06-27 21:35:16 +00:00
jeffro256
e9c89dc6ab wallet: kill support for deprecated ephemeral Boost messages
The commit kills support for deprecated ephemeral Boost messages: signed/unsigned transaction sets, pending transactions, reserve proofs, MMS messages, etc.
It does NOT kill support for loading very old wallets in Boost format, that should be supported indefinitely. These messages were deprecated 5 years ago. Since
then, we have had a hard fork to enable a new non-compatible transaction type (w/ view tags), and disable the old transaction type. This renders basically all
of the aforementioned messages before that HF useless, with the possible exception of reserve proofs.

This commit also cleans up dead inclusions of boost serialization headers.

This commit is part of upstreaming Carrot/FCMP++. Killing support for Boost messages now means less boilerplate Boost serialization review for Carrot/FCMP++.
2025-05-30 14:24:56 -05:00
jeffro256
6fd3a2e06b tools::variant: remove 2025-05-15 13:48:36 -05:00
Crypto City
90256c8208 error out if functional tests are disabled 2025-05-08 17:08:32 +00:00
tobtoht
02fba21846 Merge pull request #9881
8af33c71c epee: syncobj: replace shims with Boost classes (jeffro256)
2025-04-23 16:31:56 +00:00
tobtoht
8d6b25568f Merge pull request #9795
cb91dcee3 tests: Speed up p2p reorg test (iamamyth)
2025-04-23 16:15:23 +00:00
jeffro256
7b28be0ef3 functional_tests: test PR #9863 2025-04-01 13:56:44 -05:00
jeffro256
8af33c71cf epee: syncobj: replace shims with Boost classes
a. `critical_section` is functionally identical to a `boost::recursive_mutex`
b. `critical_region_t` is functionally identical to a `boost::unique_lock`
c. remove some vestigial definitons `g_test_dbg_lock_sleep` as a variable
2025-04-01 11:09:26 -05:00
iamamyth
cb91dcee36 tests: Speed up p2p reorg test
Use a fixed, 240s deadline for the daemons to reach agreement and poll
with a suitable frequency (.25s), rather than polling up to 100 times at
roughly 10s intervals.
2025-03-24 11:18:57 -07:00
tobtoht
7ea8bcdc91 Merge pull request #9808
446d9622f logging: Generalize terminal color detection (iamamyth)
2025-03-24 14:06:18 +00:00
iamamyth
446d9622f8 logging: Generalize terminal color detection
Assume the terminal supports color codes if TERM ends with `-color` or
`-256color`, rather than special-casing a handful of such terminals.

Add tests for terminal color detection.

Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2025-03-24 11:07:33 -07:00
tobtoht
902b664e26 Merge pull request #9821
665316708 Fix HTTP unit tests (broken with new Boost versions) (Lee *!* Clagett)
2025-03-24 03:05:09 +00:00
tobtoht
f2d765afc4 Merge pull request #9809
8c43e33e3 logging: Fix easylogging++ init with blank config (iamamyth)
2025-03-24 03:02:46 +00:00
tobtoht
dfa92d6031 Merge pull request #9824
da8907974 chore: fix some typos in comments (shenpengfeng)
2025-03-24 02:45:18 +00:00
tobtoht
44523cafff Merge pull request #9135
c069c04ed blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
2025-03-10 16:16:18 +00:00
jeffro256
c069c04ede blockchain sync: reduce disk writes from 2 to 1 per tx 2025-03-10 01:02:37 -05:00
shenpengfeng
da8907974e chore: fix some typos in comments
Signed-off-by: shenpengfeng <xinhangzhou@icloud.com>
2025-02-28 00:40:29 +08:00
Lee *!* Clagett
665316708c Fix HTTP unit tests (broken with new Boost versions) 2025-02-25 18:51:56 -05:00
iamamyth
8c43e33e35 logging: Fix easylogging++ init with blank config
The upstream version of el::base::TypedConfigurations::unsafeGetConfigByRef
accesses uninitialized memory if a key doesn't exist.
Commit b2c59af84d patched the library to
throw in this case, avoiding the invalid access, but the more suitable
pattern, both logically, and as evidenced by the behavior of
unsafeGetConfigByVal, would be to return a const reference to a
default-initialized value with static storage duration.
2025-02-19 15:02:08 -08:00
tobtoht
257db6dff2 Merge pull request #9765
ec74ff4a3 Set response limits on http server connections (Lee *!* Clagett)
2025-02-14 07:33:45 +00:00
Lee *!* Clagett
ec74ff4a3d Set response limits on http server connections 2025-02-13 23:55:17 -05:00
tobtoht
28e2042b04 Merge pull request #9762
950ddbf30 tests: Improve p2p tx propagation functional test (iamamyth)
2025-02-14 04:00:24 +00:00
tobtoht
4d1a8804ae Merge pull request #9729
e250841a3 cmake: remove msvc (tobtoht)
2025-02-14 03:51:01 +00:00
tobtoht
9570c1a216 Merge pull request #9717
ff4e86dc4 ringct: remove unused range proof types and fix serialization bug (jeffro256)
2025-02-13 17:37:47 +00:00
iamamyth
950ddbf30e tests: Improve p2p tx propagation functional test
Reduce the likelihood of false positive failures in the p2p
transaction propagation functional test by waiting up to a
maximum timeout for a transaction to propagate, rather than using a
fixed timeout, to reflect the random delay of Dandelion++ transaction
propagation. This strategy also speeds test execution in cases where
propagation occurs faster than the previously expected fixed delay.
2025-02-11 18:30:16 -08:00
tobtoht
e250841a35 cmake: remove msvc 2025-02-09 11:43:57 +01:00
iamamyth
274b5748da tests: Improve functional_tests_rpc startup
* Use a global startup timeout, and apply it to each socket's connect
  call, rather than repeating connection attempts with short timeouts.

* Avoid leaking sockets by closing them.
2025-01-31 21:15:20 -08:00
iamamyth
f48a73d919 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-01-24 23:11:47 -08:00