Commit Graph
428 Commits
Author SHA1 Message Date
ryurt46 a5ab8e5709 net: replace deprecated boost::asio::strand::wrap with bind_executor 2026-05-04 19:10:06 +02:00
tobtoht d4732d6fdb Merge pull request #10440
b4ba1ec cryptonote_protocol: cleanup_handle_incoming_blocks on scope exit (j-berman)
2026-04-22 18:07:38 +00:00
tobtoht 519b26375c Merge pull request #10438
94089a8 cryptonote_basic: pruned hash return bool (j-berman)
2026-04-22 18:05:34 +00:00
j-berman b4ba1ec69c cryptonote_protocol: cleanup_handle_incoming_blocks on scope exit 2026-04-21 12:07:59 -07:00
j-berman 94089a8788 cryptonote_basic: pruned hash return bool 2026-04-21 12:04:31 -07:00
j-berman 0150d45e39 connection: try-catch handles 2026-04-21 12:00:56 -07:00
tobtoht 50da8bf8a5 Merge pull request #10186
0673c95 tx_memory_pool: speedup get_complement() for large requests (jeffro256)
2026-03-28 19:45:05 +00:00
tobtoht 55abb977b2 Merge pull request #10312
c93c4fc Misc clang 21 fixes (jeffro256)
2026-02-18 22:18:09 +00:00
jeffro256 c93c4fc829 Misc clang 21 fixes
* Use -O3 and other flags instead of -Ofast
  - https://discourse.llvm.org/t/rfc-deprecate-ofast/78687
  - https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
* Find libunwind library based on C++ compiler type, not C compiler type
* In stack_trace.cpp, pass stream modifiers to `std::stringstream` first, then send string to log
* In stack_trace.cpp, remove dead code related to `stack_trace_log` path
* Remove `virtual` method attributues from `final` class `cryptonote::core`
* Remove unused `this` capture in cryptonote protocol handler
* Remove unused variable `bad` in net node
* Use `std::make_unsigned` instead of `boost::make_unsigned`
  - https://github.com/boostorg/type_traits/issues/171
  - https://github.com/boostorg/type_traits/issues/202
  - https://github.com/boostorg/type_traits/pull/199
* Cleanup `include`s in pair serialization
* Test convergence b/t `std::make_unsigned` and `boost::make_unsigned`

Fixes compilation and silences warnings on:
clang version 21.1.6
Linux 6.18.8-3-cachyos
2026-02-09 09:42:32 -07:00
Navid Rahimiandnahuhh 508b6ee8fb src: dynamic span, to calculate span limit dynamically
Co-authored-by: nahuhh
    - jberman review
    - cryptonote_protocol: don't arbitrarily download 1000 blocks ahead
    - further restrict `proceed` to require `queue_proceed` in all cases.
      ensure queue_proceed is true if we need the next block, even if we
      already exceed the span and size limits

cryptonote_protocol: improved logging + const usage in span downloader
2026-02-04 08:54:23 +00:00
tobtoht 20ef991839 Merge pull request #9494
2a1a489 src: dynamic block sync size Co-authored-by: nahuhh (0xFFFC0000)
2026-02-03 21:25:04 +00:00
j-berman d7c5f95704 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.
2025-12-11 21:36:42 -08:00
jeffro256 0673c957af tx_memory_pool: speedup get_complement() for large requests
Changes complexity from M*N to (2*N+M)*log2(M). The FCMP++ stressnet recently hit mempool sizes of ~55k txs.
If the requesting node's mempool is populated, this results in an average of (55000*55000)/2
(about 1.5 billion) comparisons for the responding node. Under this commit, this would be reduced to
(55000+55000)*log2(55000) comparisons (about 2.6 million), a 99.83% reduction.
2025-11-26 13:40:33 -06:00
tobtoht cdaca019fc Merge pull request #10201
52b4c73 cryptonote_protocol: accurate next_needed_height when there is an overlap (0xFFFC0000)
2025-11-11 22:41:41 +00:00
j-berman c01e1fa288 Fix logging deadlock 2025-11-11 10:43:39 -08:00
0xFFFC0000 52b4c73ab4 cryptonote_protocol: accurate next_needed_height when there is an overlap 2025-11-11 00:29:23 +03:30
tobtoht c7046302d4 cmake: don't redefine project 2025-06-24 08:01:37 +02:00
0xFFFC0000andnahuhh 2a1a4897cb src: dynamic block sync size
Co-authored-by: nahuhh
2025-05-13 13:51:42 +00:00
0xFFFC0000 d106e21b74 src: fix clangd warnings 2025-05-01 05:27:35 +00: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
jeffro256 528664b1c8 cryptonote_protocol: fix handling of pruned blocks during sync 2025-03-17 09:09:25 -05: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
tobtoht e87c16dd3e Merge pull request #9582
16b5c11f7 Some cleanup in span/connection_context + few more checks (Lee *!* Clagett)
2025-02-13 17:36:19 +00:00
Lee *!* Clagett 4344f97255 Fix build with boost ASIO 1.87. Support boost 1.66+ 2025-01-06 18:05:25 -05:00
Lee *!* Clagett 16b5c11f74 Some cleanup in span/connection_context + few more checks 2024-11-19 18:30:34 -05:00
jeffro256 ed955bf751 build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions
3. Removed reimplementation of `std::hash` for `boost::uuids::uuid
4. Removed `<<` operator overload for `crypto::secret_key`
5. Removed instances in code where private view key was dumped to the log in plaintext
2024-09-06 11:46:22 -05:00
luigi1111 66c5917876 Merge pull request #9353
32f3245 cryptonote_protocol: prevent duplicate txs in fluff queue (0xFFFC0000)
2024-07-16 18:51:30 -04:00
0xFFFC0000andBoog900 32f32453f1 cryptonote_protocol: prevent duplicate txs in fluff queue
1. Fix duplicate transaction #9335
2. Add test for cases where there are duplicate transaction in fluff

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-06-05 16:33:15 +00:00
copyCat 341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
Lee *!* Clagett 463228b961 Skip privacy networks (on tx sends) that don't have outgoing connections 2024-03-29 13:01:58 -04:00
jeffro256 e191083bed epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
jeffro256 192d87cd24 remove more 'using namespace' statements from headers 2023-07-18 22:46:43 -05:00
luigi1111 0fbe21e9e9 Merge pull request #8862
9f80797 protocol: drop peers sending duplicate txes (moneromooo-monero)
2023-06-27 11:44:58 -05:00
luigi1111 57c58fd5bd Merge pull request #8703
c90c1c3 Show IPv6 addresses in connection list (Guillaume Le Vaillant)
2023-06-27 11:28:24 -05:00
moneromooo-monero 9f80797086 protocol: drop peers sending duplicate txes 2023-06-07 06:56:21 +00:00
luigi1111 9bf06ea75d Merge pull request #8698
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-04-25 11:12:56 -04:00
Guillaume Le Vaillant c90c1c3fe1 Show IPv6 addresses in connection list 2023-04-14 13:34:30 +02:00
jeffro256andSChernykh caa7561705 cryptonote core/protocol: don't drop peers for soft offenses
Also: txs with tx_extra which is too large will not get published to ZMQ

Co-authored-by: SChernykh <sergey.v.chernykh@gmail.com>
2023-03-29 02:05:43 -05: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
Lee Clagett a7bf3aff2c Fix dandelion++ fluff/stem bug with local txes 2022-10-25 16:09:55 -04:00
SChernykh 8e7c7af05f Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:04:50 +02:00
j-berman 2dab31f62f Don't exclusively drop tor/i2p outgoing cxns in idle loop 2022-05-18 09:54:21 -07:00
Jeffrey 12b1b74d32 Trimming Fat
Remove unused include statements or unused definitions.
2022-04-18 09:55:20 -05:00
luigi1111 bb093ec9a8 Merge pull request #8223
17772ef Eliminate dependence on boost::interprocess #8223 (Jeffrey)
2022-04-06 00:19:59 -04:00
Jeffrey 17772ef53e Eliminate dependence on boost::interprocess #8223
In this repo, `boost::interprocess` was being used soley to make `uint32_t` operations atomic. So I replaced each instance of
`boost::interprocess::ipcdetail::atomic(...)32` with `std::atomic` methods. I replaced member declarations as applicable. For example,
when I needed to change a `volatile uint32_t` into a `std::atomic<uint32_t>`. Sometimes, a member was being used a boolean flag, so
I replaced it with `std::atomic<bool>`.

You may notice that I didn't touch `levin_client_async.h`. That is because this file is entirely unused and will be deleted in PR monero-project#8211.

Additional changes from review:
* Make some local variables const
* Change postfix operators to prefix operators where value was not need
2022-03-30 13:18:32 -05:00
mj-xmr da9aa1f7f8 Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
moneromooo-monero 1f81f5f5c1 protocol: fix spurious rejection of downloaded blocks
when kicking a peer for inactivity, clear the set of requested blocks,
or next time we requests blocks from it, we'll probably reject the
incoming blocks due to missing the previous requested blocks
2021-10-21 20:34:06 +00:00
anon 9154883f3e node_server: fix race condition 2021-09-20 20:58:23 +00:00
moneromooo-monero d689b946f9 protocol: fix delayed "you are now synchronized..." message 2021-06-21 15:37:40 +00:00