1483 Commits
Author SHA1 Message Date
Guoqiang Liuandsuch-gitea 6d9aca92f1 net: detect half-closed sockets before connection reuse
Detect peer EOF and TLS closure before reusing idle connections. Make
disconnect idempotent while preserving buffered data and pending operation
lifetimes.

Keep the release branch's multi-byte recv_n behavior, and cover partial EOF,
socket modes, and TLS shutdown with loopback regression tests. Use fixed
test certificates and retain compatibility with the release branch's
Google Test version.

Co-authored-by: woodser <13068859+woodser@users.noreply.github.com>
(cherry picked from commit 096abdaa22b71ade9ca673ed8012c500cecb58d3)
2026-10-04 18:50:24 -04:00
j-bermanandsuch-gitea 7ff4a5567a cryptonote_basic: serialization checks
(cherry picked from commit d869dc0981ac55f90d5b52a1a794b124ae274716)
2026-10-04 18:50:23 -04:00
koeandsuch-gitea f4212ace98 add sanity_check_pending_tx
(cherry picked from commit 4eae9740460fb69e30bedeea48c2ab3268974bc0)
2026-10-04 18:50:23 -04:00
woodserandsuch-gitea 5fe3caa4d9 wallet2: abort in-flight daemon request on shutdown
(cherry picked from commit 3c0980f5991a3cc27f7b3890cb68251c971a4b07)
2026-10-04 18:50:23 -04:00
Samyandsuch-gitea aee1ca831e wallet_rpc_server: add weight to describe_transfer
(cherry picked from commit 017f3cf6b5e548859914a13a0a9ec184597d278d)
2026-10-04 18:50:22 -04:00
woodserandsuch-gitea cafc099d04 checkpoints: exclude equal height in get_nearest_checkpoint_height
(cherry picked from commit 37202dfc5220bfb75eea472cfcebc87a87d78ef3)
2026-10-04 18:50:22 -04:00
j-bermanandsuch-gitea f2a8c47410 p2p: use a bool for send()
Identified by @selsta

Callers can otherwise misinterpret int -1 as truthy success,
e.g. see make_payload_send_txs

(cherry picked from commit 9bf193728bb11beb9c40e06a0d48d1c697fe7a84)
2026-10-04 18:50:22 -04:00
selstaandsuch-gitea f26ac02df9 p2p, rpc: group public IPv6 connection limits by /64
(cherry picked from commit f277d328cf1f7e64423b5eb7dc0e21649f71e47a)
2026-10-04 18:50:22 -04:00
Lee Clagettandsuch-gitea e4d52af5c7 Fix stall issues with p2p
(cherry picked from commit f618ee1136fa11d0611229a81d9c2838cc9db737)
2026-10-04 18:50:22 -04:00
selstaandsuch-gitea 2ea94e6a21 rpc: hide ZMQ request contents in restricted mode
(cherry picked from commit dfb85dde03650430fa77541af17831f4bb9c5a2c)
2026-10-04 18:50:22 -04:00
plowsofandsuch-gitea f2c3f8ce3e wallet_api: set m_password in the recovery creation paths
libwallet_api_tests: cover password retention on wallet recovery

(cherry picked from commit 3a0df2b80b1dadcfd1a0115bd4667c6fb73b5d33)
2026-10-04 18:50:21 -04:00
selstaandsuch-gitea bcdb7c1075 http: share deterministic header field parser
(cherry picked from commit d2e4cbcda578152d9640a1aafa97a527f48a1380)
2026-10-04 18:50:20 -04:00
SNeedlewoodsandsuch-gitea 99d0c33dde fix: TypeError: 'method' object is not subscriptable
(cherry picked from commit 6bc37841a9523cadf144034376b7a79d69e55a21)
2026-10-04 18:50:20 -04:00
selstaandsuch-gitea 08cc86ab88 net: canonicalize Tor/I2P hosts during deserialization
(cherry picked from commit 93d792e63c85baec6f8a3b8f9bbad3f803dd3a7e)
2026-10-04 18:50:20 -04:00
selstaandsuch-gitea d171742ed6 p2p: close zone connections before stopping net servers
(cherry picked from commit b7ca9e73f23cfb0ce1e795b2074ad12af56b04e3)
2026-10-04 18:50:20 -04:00
selstaandsuch-gitea f8052081f3 net: canonicalize Tor and I2P hostnames
(cherry picked from commit 7d339778135c44370199f5c84e8c90b3d60f6717)
2026-10-04 18:50:20 -04:00
greatjourney589andsuch-gitea c3e982f2ad zmq: apply restricted-mode privacy filtering to get_transaction_pool
Add an include_sensitive parameter to tx_memory_pool::get_pool_for_rpc
(and its core passthrough), mirroring the include_sensitive_data
parameter on the HTTP analog get_transactions_and_spent_keys_info.
When false, receive_time and last_relayed_time are zeroed using the
same masking already applied on the HTTP path.

The ZMQ handler in daemon_handler.cpp passes !m_restricted, so
--restricted-zmq-rpc callers now receive the same privacy-filtered view
as restricted HTTP callers instead of the unfiltered timing metadata
they previously got. Stem-phase txs continue to be excluded regardless
(relay_category::broadcasted filter unchanged).

Refs #10529.

(cherry picked from commit 878c781764e62d8616ae49a42baf05366a1d7336)
2026-10-04 18:50:19 -04:00
jwinterm 5518c764c6 tests: skip bulletproof.weight_{equal,more,pruned} on wownero
The hardcoded tx_hex blobs are monero-format (RCTTypeBulletproofPlus,
ring size 16). Wownero uses RCTTypeBulletproofPlus_FullCommit (type 9)
and ring size 22, so parse_and_validate_tx_from_blob rejects them and
the tests fail at the parse step.

Functional bp+ correctness is still covered by the 136 ringct.* tests
which all pass. Re-enable by regenerating the blobs from real wow
transactions.
2026-05-06 10:52:48 -04:00
Lee Clagettandjwinterm da7acc3d72 Improve unpack reserve handling
(cherry picked from commit 54229196bd11913ef0ac2c44b9f090cf619d29d8)
2026-05-06 10:52:36 -04:00
jeffro256andjwinterm f857e2dc8c cryptonote_core: add change address sanity check
Prevents silly mistakes where wrong change address is passed

Release versions uses boost::optional instead of std::optional

(cherry picked from commit 44412d3574fcd7bdb6d0fcfb6c4ffc61c2d338d9)
2026-05-06 10:52:36 -04:00
tobtohtandjwinterm 620ff4c515 daemon: remove miniupnp
(cherry picked from commit 987e6d29133a493914a19b660051ca634fbed1d6)
2026-05-06 10:52:36 -04:00
Lee *!* Clagettandjwinterm c7227454e8 Add Socks v5 support to daemon and wallet
(cherry picked from commit 23e29a5074)
(cherry picked from commit ce5437f0677966c15d2946bc7c068975aa6bfd83)
2026-05-05 18:20:53 -04:00
Jeetrajandjwinterm 8d298b8d77 p2p: isolate regtest from mainnet bootstrap state
(cherry picked from commit 1d2ae2138a85dd93bc8a0d2c55513c5b5ba4658f)
2026-05-05 18:20:53 -04:00
j-bermanandjwinterm e69533337b p2p: fix hanging shutdown
(cherry picked from commit 7bc2d5a42e8462f2a04f71bd59111a863fa9a6d8)
2026-05-05 18:20:52 -04:00
selstaandjwinterm 907d6dd58d zmq: add restricted rpc mode
(cherry picked from commit 7f2cfe9294ec1fa7bece2a8069114c1b6985650f)
2026-05-05 18:20:52 -04:00
Lee *!* Clagettandjwinterm e16f0a2c28 Cleanup some of the fragmented levin handling
(cherry picked from commit 017c9022d7bbc03484191177228657b14fb09f53)
2026-05-05 18:20:52 -04:00
Lee *!* Clagettandjwinterm 93381db29c Harden HTTP client auth
(cherry picked from commit f355f85e6f7bea4a4f68c7880b2b995a3c225882)
2026-05-05 18:19:53 -04:00
j-bermanandjwinterm 0544146ff3 p2p: connection patches
- Make sure the server sends a complete response when the client
includes the "Connection: close" header.
- Make sure the server terminates in `m_strand` to avoid
concurrent socket closure and ops processing.

(cherry picked from commit ee9e4a49baae0319f6cab543979e221f251339a3)
2026-05-05 18:19:53 -04:00
j-bermanandjwinterm 06fed93f74 p2p: fix race causing dropped connections during sync
Without this commit:
1) read height from DB
2) add block to chain in separate thread
3) read chain for block id's and request them from peer
4) ERR in handle_response_chain_entry, peer's first block is the
one that was added to the chain, which has block idx=height from
step 1.

This commit reads the chain for height and highest block id's
in one go while holding the m_blockchain_lock to avoid the race.

(cherry picked from commit d8d3cf97300480b9d3942c667978dd4860b76feb)
2026-05-05 18:19:53 -04:00
j-bermanandjwinterm 7551a0dc04 Fix logging deadlock
(cherry picked from commit a83a46d60059a063ec953ba15f4cdcc2b3874440)
2026-05-05 18:19:53 -04:00
j-bermanandjwinterm 0ea75b1e3e 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.

(cherry picked from commit 9239d36691bfe94dda12cc925903fed5e761fbe3)
2026-05-05 18:19:53 -04:00
wowario de22caa968 cleanup old bp 2025-09-19 21:01:43 +03:00
wowario cf58f70251 fix unit tests 2025-09-19 21:01:39 +03:00
jeffro256andnahuhh 1da19dac54 wallet: refactor subaddress expansion & add to transfer test 2025-07-07 22:21:46 +00:00
Justin Bermanandnahuhh e23d51bc16 wallet: improve lookahead logic & make rpc persistent 2025-07-07 22:21:43 +00:00
benevanoffandnahuhh 678f5dab31 wallet: create set_subaddress_lookahead wallet rpc endpoint 2025-07-07 22:21:39 +00:00
benevanoffandnahuhh 8f5a7b0f1a wallet: ensure subaddress keys table is at least size of requested lookahead 2025-07-03 16:10:29 +00:00
Bastian Germannandtobtoht 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
tobtoht 23a11d851a Merge pull request #9775
13ff355cf Set response limits on http server connections (Lee *!* Clagett)
89fa3ed68 epee: update 'http_server_handlers_map2.h' macros to use fully qualified names (Jeffrey Ryan)
2025-02-14 07:49:40 +00:00
Lee *!* Clagett 13ff355cf6 Set response limits on http server connections 2025-02-14 00:21:05 -05:00
iamamyth ef1ff103f5 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-13 12:49:47 -08: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
jeffro256andtobtoht d13da6e71d tests: include <iomanip> where using std::setfill 2025-02-09 09:12:04 +01:00
iamamythandtobtoht 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