Commit Graph
26 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
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
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
tobtoht 5723d6b6f1 epee: remove save_limit_to_file 2026-04-28 19:21:12 +02:00
Lee *!* Clagett 4344f97255 Fix build with boost ASIO 1.87. Support boost 1.66+ 2025-01-06 18:05:25 -05:00
copyCat 341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
mj-xmrandmj-xmr 5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
Jeffrey 12b1b74d32 Trimming Fat
Remove unused include statements or unused definitions.
2022-04-18 09:55:20 -05:00
mj-xmr da9aa1f7f8 Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
anonimal 2825f07d95 epee: connection_basic: resolve CID 203916 (UNINIT_CTOR) 2019-09-06 23:18:00 +00:00
anonimal 3a816398b3 epee: connection_basic: resolve CID 203920 (UNINIT_CTOR) 2019-09-06 22:48:16 +00:00
Lee Clagett 3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
moneromooo-monero 6abaaaa994 remove obsolete save_graph skeleton code 2019-05-10 14:17:18 +00:00
Lee Clagett 21eb1b0725 Pass SSL arguments via one class and use shared_ptr instead of reference 2019-04-07 00:44:37 -04:00
Riccardo Spagni 5259dd7a14 Merge pull request #5259
9141a0a1 connection_basic: remove debug exception ^_^ (moneromooo-monero)
2019-03-21 14:49:09 +02:00
moneromooo-monero 17769db946 epee: fix build with boost 1.70.0
get_io_service was deprecated, and got removed
2019-03-21 11:02:02 +00:00
moneromooo-monero 9141a0a1ef connection_basic: remove debug exception ^_^ 2019-03-08 20:13:51 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero 2456945408 epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-02-02 20:05:33 +00:00
Lee Clagett 973403bc9f Adding initial support for broadcasting transactions over Tor
- Support for ".onion" in --add-exclusive-node and --add-peer
  - Add --anonymizing-proxy for outbound Tor connections
  - Add --anonymous-inbounds for inbound Tor connections
  - Support for sharing ".onion" addresses over Tor connections
  - Support for broadcasting transactions received over RPC exclusively
    over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28 23:56:33 +00:00
Martijn Otto bd98e99c80 Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
moneromooo-monero 758d768486 connection_basic: remove unused floating time start time 2018-10-02 17:28:46 +00:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 40ab12a773 epee: remove dependency on common 2018-01-10 01:57:51 +00:00
moneromooo-monero bb89ae8b20 move connection_basic and network_throttle from src/p2p to epee
These even had the epee namespace.
This fixes some ugly circular dependencies.
2017-12-16 23:28:43 +00:00