Commit Graph
795 Commits
Author SHA1 Message Date
tobtoht e00908bc49 Merge pull request #10921
edea850 general: replace auto_scope_leave_caller with scope_guard (jeffro256)

ACKs: selsta, tobtoht
2026-07-22 16:31:31 +00:00
tobtoht c821e75318 Merge pull request #10169
0c9956a functional_tests: Python epee binary lib and test `/get_blocks.bin` (jeffro256)

ACKs: selsta, plowsof
2026-07-20 18:34:10 +00:00
tobtoht 3ed8ffb56b Merge pull request #10842
fa91ae4 common: remove dead code (Thomas)
8701fc9 blockchain_db: remove unused MDB_val_copy specializations (Thomas)
00d21ee epee: remove dead code (Thomas)

ACKs: selsta, jpk68
2026-07-20 09:09:49 +00:00
tobtoht ff17d7f7ba Merge pull request #10905
d436311 epee: avoid bad_weak_ptr during connection teardown (selsta)

ACKs: vtnerd, SChernykh
2026-07-20 09:01:13 +00:00
jeffro256andselsta 0c9956af80 functional_tests: Python epee binary lib and test /get_blocks.bin
Co-authored-by: selsta <selsta@sent.at>
2026-07-17 22:35:43 -05:00
jeffro256 edea8505db general: replace auto_scope_leave_caller with scope_guard
And replace unused inclusions of misc_language.h
2026-07-15 19:54:58 -05:00
tobtoht ea379f8f76 Merge pull request #10877
6308971 epee: narrow included asio headers (jpk68)

ACKs: jeffro256, selsta
2026-07-15 17:18:29 +00:00
selsta d4363111b9 epee: avoid bad_weak_ptr during connection teardown
foreach_connection() can race with connection destruction while the
protocol handler remains in the raw-pointer map. Use the non-throwing
weak_from_this().lock() in add_ref() and treat expired connections as
unavailable.

This is an interim mitigation pending the broader connection lifetime
fix in PR 7345.
2026-07-11 16:22:25 +02:00
tobtoht d6aa5ce38f Merge pull request #10851
7eb70c7 chore: remove msvc remnants (jpk68)

ACKs: selsta, tobtoht
2026-07-08 09:26:40 +00:00
tobtoht 381fce8dde Merge pull request #10828
fecef76 Fix spelling typos in comments and string literals (Thomas)

ACKs: tobtoht, selsta
2026-07-02 13:18:56 +00:00
Thomas 00d21ee75e epee: remove dead code
Each symbol below has no references anywhere in the tree (src/, contrib/,
tests/); the full build still links cleanly. Per-symbol history is given so the
"why is this unused" is auditable (hashes are ancestors of HEAD).

net/connection_basic (all four lost their last caller in the 2022 connection
rewrite, 3be1dbd09 "connection: fix implementation"):
- to_string(t_connection_type): unused free function. Added 9bfa593ee (2015)
  to print a connection's type in a debug log; 3be1dbd09 (2022) switched that
  log line to std::to_string on the enum, orphaning this overload.
- do_send_handler_write / do_send_handler_write_from_queue: trace-only stubs
  added eabb51960 (2015) on the TCP send path; their calls in do_send_chunk /
  the write-completion handler were deleted by 3be1dbd09 (2022). The real send
  path is connection<T>::start_write().
- sleep_before_packet: outbound rate-limit sleep added eabb51960 (2015);
  callers were thinned over time (cf5f62361, 2017) and the last removed by
  3be1dbd09 (2022). Rate-limiting now lives in connection<T>::start_write()
  via the global out-throttle.

net/levin_base:
- struct bucket_head: legacy levin packet header from the 2014 epee import,
  superseded by bucket_head2 (the wire header, `using header = bucket_head2`).
  Its last use went away with the old levin_protocol_handler in 0c545f614
  (2024, "epee/test: remove levin_protocol_handler and core_proxy tests").
- LEVIN_PROTOCOL_VER_0: dead on arrival - present since the 2014 import, never
  referenced (the code uses LEVIN_PROTOCOL_VER_1).

net/net_utils_base (connection-context logging macros):
- LOG_PRINT_CC_L4: levin trace macro (2014 import); all call sites removed in
  5833d66f6 (2017, "Change logging to easylogging++").
- LOG_PRINT_CCONTEXT_L3: had a single "REMOTE PEERLIST" call site, removed in
  the same 5833d66f6 (2017).
- LOG_PRINT_CC_L3: only ever referenced inside LOG_PRINT_CCONTEXT_L3's body,
  never invoked directly - transitively dead once the above was removed.
- LOG_CC: dead on arrival - added in 5833d66f6 (2017) but never invoked.
  (The plain LOG_PRINT_L3 macro that LOG_PRINT_CC_L3/CCONTEXT_L3 wrap is still
  used elsewhere and is left untouched; only these unused CC wrappers go.)

net/network_throttle:
- typedef network_MB: added eabb51960 (2015); its only consumers
  (set_target_kill / m_target_MB) were stripped the same day in 5ce4256e3
  (2015), leaving an unused typedef.

profile_tools:
- START_WAY_POINTS / WAY_POINT / WAY_POINT2: dead on arrival - upstream-epee
  profiling macros present since the 2014 import, never once invoked (they only
  ever appear as definitions in profile_tools.h across all history).
- TIME_MEASURE_PAUSE / TIME_MEASURE_RESTART and their _NS_ variants: dead on
  arrival - added bda8c5983 (2017, "epee: add nanosecond timer and pause/restart
  profiling macros") but never wired to any call site. Of this family only
  TIME_MEASURE_START / TIME_MEASURE_FINISH are actually used.

storages:
- typedef binarybuffer (portable_storage_base): used by the binary store/load
  API since the 2014 import; its last consumer (store_to_binary) was removed in
  7414e2bac (2020, "Change epee binary output from std::stringstream to
  byte_stream").
- the templated min_bytes() member declaration (portable_storage_from_bin):
  declared but never defined or called. Added 7f407c027 (2020-12-26,
  "portable_storage: add some sanity checks on data size") alongside the
  ps_min_bytes<> trait struct, but the size checks were implemented via that
  trait (ps_min_bytes<>::strict), so this member was never defined or wired up
  - dead on arrival. The ps_min_bytes<> trait remains in use and is left intact.
2026-06-30 15:59:47 +02:00
jpk68 7eb70c7858 chore: remove msvc remnants 2026-06-29 21:29:19 -04:00
tobtoht 6eef935d2c Merge pull request #10810
07f7c75 http: parse server Content-Length strictly (alhudz)

ACKs: vtnerd, selsta
2026-06-29 11:42:27 +00:00
Thomas fecef767c9 Fix spelling typos in comments and string literals 2026-06-27 09:53:48 +02:00
tobtoht 0a83a39883 Merge pull request #10792
02db831 Fix spelling typos (Thomas)

ACKs: tobtoht, jeffro256
2026-06-24 17:21:24 +00:00
alhudz 07f7c7521d http: parse server Content-Length strictly 2026-06-23 17:37:41 +05:30
tobtoht 2c48374ecd Merge pull request #10768
389f366 http: share deterministic header field parser (selsta)

ACKs: SChernykh*, vtnerd
2026-06-21 21:44:23 +00:00
selsta 389f3660db http: share deterministic header field parser 2026-06-21 22:25:58 +02:00
tobtoht bb069330c7 Merge pull request #10786
49108d7 epee: use correct minor http version (jpk68)

ACKs: selsta, tobtoht
2026-06-21 11:37:21 +00:00
Thomas 02db831d01 Fix spelling typos 2026-06-18 09:30:42 +02:00
tobtoht 1431995430 Merge pull request #10740
776d355 use byte-safe isalpha in epee json value parser (alhudz)

ACKs: iamamyth, selsta
2026-06-14 15:49:09 +00:00
tobtoht d5b226d295 Merge pull request #10566
6460917 serialization: avoid blob memcpy of secret_key vector (selsta)

ACKs: vtnerd, tobtoht
2026-06-13 10:14:19 +00:00
alhudz 776d355780 use byte-safe isalpha in epee json value parser 2026-06-10 10:01:46 +05:30
tobtoht bf23534c8e Merge pull request #10691
f2afe97 p2p: close zone connections before stopping net servers (selsta)
3623399 p2p: make stop signal idempotent (selsta)
2026-06-06 13:12:31 +00:00
jpk68 49108d7a67 epee: use correct minor http version 2026-06-05 09:16:09 -04:00
tobtoht 67767bbb68 Merge pull request #10493
a46154e p2p: cleaner connection close() (j-berman)
2026-06-05 11:02:04 +00:00
jpk68 63089717ed epee: narrow included asio headers 2026-06-04 10:13:12 -04:00
selsta f2afe976c7 p2p: close zone connections before stopping net servers 2026-06-03 12:16:02 +02:00
tobtoht fa8b8ab93c Merge pull request #10666
8687825 crypto: split wire serialization in header (jeffro256)
2026-06-02 13:22:42 +00:00
tobtoht f7e7d1da68 Merge pull request #10563
642e636 epee: avoid memcpy in rolling median move (selsta)
2026-06-01 18:11:56 +00:00
selsta 3623399ea2 p2p: make stop signal idempotent 2026-05-31 02:45:53 +02:00
jeffro256 868782513e crypto: split wire serialization in header 2026-05-27 00:18:48 -05:00
tobtoht 93e5d3e25e Merge pull request #10623
7704a19 contrib: fix unaligned&aliased levin buffer reads (jeffro256)
2026-05-27 00:45:25 +00:00
tobtoht 0d631acd51 Merge pull request #10241
108244c Add wire::json_writer, and use in some of ZMQ-PUB functions. (Lee *!* Clagett)
2026-05-25 18:47:39 +00:00
jeffro256andselsta 7704a194f0 contrib: fix unaligned&aliased levin buffer reads
Co-authored-by: selsta <selsta@users.noreply.github.com>
2026-05-21 21:16:45 -05:00
Lee *!* Clagett 108244cdf5 Add wire::json_writer, and use in some of ZMQ-PUB functions. 2026-05-21 17:19:52 -04:00
tobtoht b745be7235 Merge pull request #10587
2c327aa fix spelling in comments and docs (Thomas)
2026-05-19 19:53:51 +00:00
tobtoht 802194711a Merge pull request #10594
aa3abe2 net_ssl: Use EVP API to create EVP_PKEYs when available (jeffro256)
2026-05-19 16:28:05 +00:00
jeffro256 aa3abe2c03 net_ssl: Use EVP API to create EVP_PKEYs when available
The following functions are deprecated in OpenSSL 3.0 and used in net_ssl.cpp: `RSA_free`, `EC_KEY_free`, `RSA_new`, `RSA_generate_key_ex`, `EC_KEY_set_group`, `EC_KEY_generate_key`.

Since EVP_RSA_gen was added in OpenSSL 3.0 and since the aforementioned functions were deprecated in OpenSSL 3.0, I check if the OpenSSL version >= 3.0, and use EVP_RSA_gen instead of everything else up to assigning the private key to the certificate in `create_rsa_ssl_certificate`.

I also deleted `create_ec_ssl_certificate` since it wasn't used.
2026-05-18 23:47:46 -05:00
tobtoht b90dd8d3b1 Merge pull request #10549
5a3f57d epee: skip IPv4 TOS option for non-IPv4 peers (iuyua9)
2026-05-15 11:29:30 +00:00
Thomas 2c327aa325 fix spelling in comments and docs 2026-05-13 21:20:05 +02:00
tobtoht b7e777412e Merge pull request #10536
681ea9f epee: remove LOCAL_ASSERT (jeffro256)
2026-05-13 11:06:54 +00:00
tobtoht 66f95b537a Merge pull request #10540
8419a91 net_service: fix broken log formatting (jpk68)
2026-05-13 11:05:57 +00:00
selsta 642e6369d5 epee: avoid memcpy in rolling median move 2026-05-11 02:57:36 +02:00
selsta 6460917cab serialization: avoid blob memcpy of secret_key vector 2026-05-09 23:42:51 +02:00
iuyua9 5a3f57d6c3 epee: skip IPv4 TOS option for non-IPv4 peers 2026-05-09 20:46:42 +08:00
jpk68andselsta 8419a91e5a net_service: fix broken log formatting 2026-05-07 20:53:07 +02:00
jeffro256 681ea9f1e9 epee: remove LOCAL_ASSERT
LOCAL_ASSERT was only defined on Windows,
only used in the `CHECK_AND_ASSERT` macro,
and was disabled in unit tests anyways,
but only in the main translation unit,
which didn't have local asserts,
since get_set_enable_assert was inline,
so the disabling didn't even do anything.
2026-05-07 13:03:13 -05:00
tobtoht 49ea802139 Merge pull request #9899
05ab316 epee: better scope leaver (jeffro256)
2026-05-06 19:34:39 +00:00
jeffro256 05ab316853 epee: better scope leaver
1. Doesn't allocate a `boost::shared_ptr`
2. Doesn't use a vtable
3. Doesn't use `std::function` wrapper
4. Doesn't necessarily copy functional object
5. Doesn't need a factory function for simple declaration (yay CTAD)
6. Isolated to its own header
7. Name doesn't suck as much
2026-05-06 11:59:00 -05:00