Commit Graph
356 Commits
Author SHA1 Message Date
selsta 44493becb7 p2p, rpc: group public IPv6 connection limits by /64 2026-08-01 17:23:05 +02:00
selsta 9268681a6f p2p: reject IPv4-mapped IPv6 peers 2026-07-31 00:45:08 +02:00
tobtoht 43fd7fb8dd Merge pull request #10747
d2e6f9b p2p: fix IPv4 subnet arithmetic (Ap4sh)

ACKs: selsta, jpk68
2026-07-30 21:27:32 +00:00
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 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 17410620a8 Merge pull request #10908
4f73cfe epee: fix build with OpenSSL 4.0 (weifanglab)

ACKs: iamamyth, selsta, jpk68, jeffro256
2026-07-20 08:54:15 +00: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
weifanglab 4f73cfea6d epee: fix build with OpenSSL 4.0 2026-07-14 00:11:41 +08:00
tobtoht 1d2c866f3e Merge pull request #10843
be7a5ec epee: allow shared Windows file reads (selsta)

ACKs: tobtoht, plowsof
2026-07-08 11:00:42 +00:00
tobtoht a434e19138 Merge pull request #10808
b305c44 escape control characters in json string serialiser (alhudz)

ACKs: vtnerd*, selsta
2026-07-08 09:30:20 +00:00
tobtoht d6aa5ce38f Merge pull request #10851
7eb70c7 chore: remove msvc remnants (jpk68)

ACKs: selsta, tobtoht
2026-07-08 09:26:40 +00:00
alhudzand“rootvector2” b305c44fc1 escape control characters in json string serialiser 2026-07-08 13:02:50 +05:30
Ap4sh d2e6f9bb57 p2p: fix IPv4 subnet arithmetic 2026-06-30 20:40:44 +02:00
selsta be7a5ecc4e epee: allow shared Windows file reads
Opening a file with a zero sharing mode makes read-only access exclusive
on Windows. Allow read and write sharing so callers can inspect files
that are already open, such as active log files.
2026-06-30 19:35:28 +02: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
Thomas 02db831d01 Fix spelling typos 2026-06-18 09:30:42 +02:00
jpk68 63089717ed epee: narrow included asio headers 2026-06-04 10:13:12 -04:00
alhudz 524b0d07f2 fix off-by-one over-read in match_string2 unicode escape parsing 2026-06-01 18:22:34 +05:30
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
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
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
Thomas 2c327aa325 fix spelling in comments and docs 2026-05-13 21:20:05 +02:00
tobtoht fb5b06bd3b Merge pull request #10520
a5ab8e5 net: replace deprecated boost::asio::strand::wrap with bind_executor (ryurt46)
2026-05-13 11:08:59 +00:00
tobtoht 43cb148952 Merge pull request #10517
a5abe71 epee: fix memory leak with readline (ComputeryPony)
2026-05-10 17:43:09 +00:00
ComputeryPony a5abe71486 epee: fix memory leak with readline 2026-05-09 16:30:13 -05:00
ryurt46 a5ab8e5709 net: replace deprecated boost::asio::strand::wrap with bind_executor 2026-05-04 19:10:06 +02:00
tobtoht 8b79bfc836 Merge pull request #10485
5723d6b epee: remove save_limit_to_file (tobtoht)
2026-05-04 16:39:19 +00:00
tobtoht 0617f433be fix: warning: ignored-attributes 2026-04-29 10:21:40 +02:00
tobtoht 5723d6b6f1 epee: remove save_limit_to_file 2026-04-28 19:21:12 +02:00
Lee *!* Clagett 3d6b9fb568 Harden HTTP client auth 2026-03-13 13:41:15 -04:00
selsta ca484323c3 epee: only parse valid port
Reported by hacksandhops and Ada Logic.
2025-08-29 11:45:02 +02:00
Michael Cho f61294dc6b epee: include math header for upcoming Boost 1.89
When building on Ubuntu 22.04 with GCC 11.4.0 and Boost 1.89.0.beta1,
the build failed with:
```
error: ‘floor’ was not declared in this scope
     41 |       num_char = (int)floor((float)num_char / (float)radix);
        |                       ^~~~~
```

Signed-off-by: Michael Cho <michael@michaelcho.dev>
2025-08-12 20:07:49 -04:00
tobtoht c572e1ad00 Merge pull request #9908
9891fe8 epee: fix string_tools on Windows (0xFFFC0000)
2025-06-14 18:59:52 +00:00
0xFFFC0000 9891fe8238 epee: fix string_tools on Windows 2025-04-22 13:22:02 +00:00
jeffro256 18376ca57d epee: remove reg_exp_definer.h
Locking to initialize static block variables isn't necessary since C++11:
https://en.cppreference.com/w/cpp/language/storage_duration#Static_block_variables
2025-03-31 14:02:15 -05:00
woodser 02e2a4f4cd assign default port for http and https clients 2025-02-17 08:11:44 -05:00
tobtoht 0e253622b2 Merge pull request #9459
7e766e13c Cleanup TCP throttling code (performance) + move connection checks (Lee *!* Clagett)
2025-01-22 22:39:57 +00:00
tobtoht 8c08863d60 Merge pull request #9663
978f1d7 Fix get_database_size on Windows (iamamyth)
2025-01-14 14:32:20 +00:00
Lee *!* Clagett 4344f97255 Fix build with boost ASIO 1.87. Support boost 1.66+ 2025-01-06 18:05:25 -05:00
iamamyth 978f1d7d41 Fix get_database_size on Windows
Replace all calls to epee::file_io::get_file_size with
boost::filesystem::file_size in order to avoid lossy conversions from
paths to strings, which tend to break filename resolution. This commit
fixes a bug on Windows where the get_info RPC call reported a zero
database size because BlockchainLMBD::get_database_size returned zero.
2025-01-06 10:38:12 -08:00
luigi1111 b95aae5f2c Merge pull request #9585
c744496 epee: Drop unused in-tree MD5 (Bastian Germann)
0bc5969 Replace in-tree MD5 with OpenSSL (Bastian Germann)
2024-12-23 11:00:30 -05:00
Lee *!* Clagett 7e766e13c3 Cleanup TCP throttling code (performance) + move connection checks 2024-12-19 20:47:44 -05:00
Bastian Germann 0bc5969755 Replace in-tree MD5 with OpenSSL
This uses OpenSSL's non-deprecated EVP digest facility to calculate MD5
in HTTP digest authentication.
2024-11-22 12:24:22 +01:00
Lee *!* Clagett 92de47fd37 Fix memcpy in byte_slice constructor 2024-11-21 17:22:52 -05:00
tobtoht 89ad8ac8b1 epee: string_tools: keep full path in cut_off_extension 2024-08-14 19:51:12 +02:00
tobtoht c51ca53daa 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:59:09 +02:00
luigi1111 caa62bc9ea Merge pull request #9392
b894042 epee: fix mlog filename compare bug. (0xFFFC0000)
2024-07-16 19:02:24 -04:00