Commit graph

129 commits

Author SHA1 Message Date
ivanlele
1feddba6f7
Merge 0f6d20e43f into merged_master (Bitcoin PR bitcoin/bitcoin#31163) 2026-04-02 15:30:57 +00:00
Tom Trevethan
e684f06327 Merge 6c13b1375f into merged_master (Bitcoin PR bitcoin/bitcoin#29421) 2026-02-23 00:42:08 +00:00
Byron Hambly
b5859dc083
Merge 0b768746ef into merged_master (Bitcoin PR bitcoin/bitcoin#28170) 2025-11-29 13:46:08 +02:00
Byron Hambly
6c136ca1a2
Merge 8992a34ee4 into merged_master (Bitcoin PR bitcoin/bitcoin#28857) 2025-11-06 11:42:56 +02:00
Byron Hambly
70ba481063
Merge 6f882e6f86 into merged_master (Bitcoin PR bitcoin/bitcoin#28331) 2025-08-06 15:02:59 +02:00
Byron Hambly
61847fc900 Merge 1e9d367d0d into merged_master (Bitcoin PR bitcoin/bitcoin#28423) 2025-07-21 14:48:23 +02:00
Byron Hambly
c288d2f62a Merge 355bbcba01 into merged_master (Bitcoin PR bitcoin/bitcoin#28066) 2025-07-02 17:41:52 +02:00
Byron Hambly
edc585d157 Merge 9564f98fee into merged_master (Bitcoin PR bitcoin/bitcoin#27636) 2025-06-25 11:40:46 +02:00
Byron Hambly
5ac82e15a9 Merge 669af32632 into merged_master (Bitcoin PR bitcoin/bitcoin#27419) 2025-05-09 11:47:45 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Byron Hambly
5f2567f887 Merge 027b6729bc into merged_master (Bitcoin PR bitcoin/bitcoin#25888) 2024-11-04 12:09:28 +02:00
Sebastian Falbesoner
4120c7543e scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp}
-BEGIN VERIFY SCRIPT-
sed -i s/COMMAND_SIZE/MESSAGE_TYPE_SIZE/g $(git grep -l COMMAND_SIZE)
sed -i s/pszCommand/msg_type/g $(git grep -l pszCommand)
sed -i s/pchCommand/m_msg_type/g $(git grep -l pchCommand)
sed -i s/GetCommand/GetMessageType/g ./src/net.cpp ./src/protocol.cpp ./src/protocol.h ./src/test/fuzz/protocol.cpp
sed -i s/IsCommandValid/IsMessageTypeValid/g $(git grep -l IsCommandValid)
sed -i "s/command/message type/g" ./src/protocol.h ./src/protocol.cpp
-END VERIFY SCRIPT-
2024-10-26 23:44:15 +02:00
Vasil Dimov
b3efb48673
protocol: make message types constexpr
As a side effect the names of the constants do not have to be
repeated in `src/protocol.cpp`.
2024-02-28 18:03:23 +01:00
Vasil Dimov
2fa9de06c2
net: make the list of known message types a compile time constant
Turn the `std::vector` to `std::array` because it is cheaper and
allows us to have the number of the messages as a compile time
constant: `ALL_NET_MESSAGE_TYPES.size()` which can be used in
future code to build other `std::array`s with that size.
2024-02-28 18:03:22 +01:00
furszy
27f260aa6e
net: remove now unused global 'g_initial_block_download_completed' 2024-01-23 10:25:16 -03:00
furszy
9f36e591c5
net: move state dependent peer services flags
No behavior change. Just an intermediate refactoring.

By relocating the peer desirable services flags into the peer
manager, we allow the connections acceptance process to handle
post-IBD potential stalling scenarios.

In the follow-up commit(s), the desirable service flags will be
dynamically adjusted to detect post-IBD stalling scenarios (such
as a +48-hour inactive node that must prefer full node connections
instead of limited peer connections because they cannot provide
historical blocks). Additionally, this encapsulation enable us
to customize the connections decision-making process based on
new user's configurations in the future.
2024-01-15 10:28:20 -03:00
TheCharlatan
d49d198840
refactor: Initialize magic bytes in constructor initializer
Also remove an assert that is already enforced by the compiler checking
that the length of the std::array matches.
2023-11-13 14:17:59 +01:00
Pieter Wuille
abf343b320 net: advertise NODE_P2P_V2 if CLI arg -v2transport is on
Co-authored-by: Dhruv Mehta <856960+dhruv@users.noreply.github.com>
2023-10-02 18:09:53 -04:00
TheCharlatan
9be330b654
[refactor] Define MessageStartChars as std::array 2023-09-12 22:49:49 +02:00
MarcoFalke
fa1471e575
refactor: Remove duplicate allNetMessageTypesVec
With C++11 (and later), the duplicate variable is no longer needed.

Also, run clang-format on the namespace, as the script in the next
commit relies on a specific format. This prevents a clang-format run in
the future from breaking the script. (Review hint: --ignore-all-space).
2023-07-11 19:26:52 +02:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
TheCharlatan
7d3b35004b
refactor: Move system from util to common library
Since the kernel library no longer depends on the system file, move it
to the common library instead in accordance to the diagram in
doc/design/libraries.md.
2023-05-20 12:08:13 +02:00
Byron Hambly
7925c2a451 Merge 224e90d9fd into merged_master (Bitcoin PR bitcoin/bitcoin#23336) 2023-05-15 12:27:08 +00:00
TheCharlatan
be55f545d5
move-only: Extract common/args and common/config.cpp from util/system
This is an extraction of ArgsManager related functions from util/system
into their own common file.

Config file related functions are moved to common/config.cpp.

The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager. The ArgsManager belongs
into the common library, since the kernel library should not depend on
it. See doc/design/libraries.md for more information on this rationale.
2023-04-19 10:48:30 +02:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
Gleb Naumenko
3fcf78ee6a p2p: Announce reconciliation support
If we're connecting to the peer which might support
transaction reconciliation, we announce we want to reconcile
with them.

We store the reconciliation salt so that when the peer
responds with their salt, we are able to compute the
full reconciliation salt.

This behavior is enabled with a CLI flag.
2022-10-17 12:35:43 +03:00
Sebastian Falbesoner
706c8e0969 refactor: use strprintf for creating unknown-service-flag string
No need to use a stringstream here.
2022-08-20 15:11:28 +02:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
MarcoFalke
fa4ec1c0bd
Make GenTxid boolean constructor private 2021-10-22 12:32:16 +02:00
Andrew Poelstra
e8f85e9062 Merge b34bf2b42c into merged_master (Bitcoin PR bitcoin/bitcoin#21939) 2021-07-10 05:28:53 +00:00
Andrew Poelstra
a7702d6ab5 Merge 6b49d88a5d into merged_master (Bitcoin PR bitcoin/bitcoin#21905) 2021-07-09 18:45:07 +00:00
Andrew Poelstra
89db5e68a5 Merge cd66d8b1d8 into merged_master (Bitcoin PR #20429) 2021-06-24 02:44:14 +00:00
Andrew Poelstra
27930edc9c Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
Andrew Poelstra
a9503e8d53 Merge 42ed7f51fa into merged_master (Bitcoin PR #20606) 2021-06-13 17:11:52 +00:00
João Barbosa
1c9255c7dd refactor: Replace memset calls with array initialization 2021-05-13 12:42:21 +01:00
eugene
9c891b64ff net: initialize nMessageSize to max uint32_t instead of -1
nMessageSize is uint32_t and is set to -1. This will warn with
-fsanitize=implicit-integer-sign-change.
2021-05-11 11:21:29 -04:00
Sebastian Falbesoner
365539c846 refactor: init vectors via std::{begin,end} to avoid pointer arithmetic 2021-01-31 17:35:01 +01:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
MarcoFalke
fa40168ab3
Remove unused bits from service flags enum 2020-12-08 18:36:51 +01:00
Andrew Poelstra
4cb66aae97 Merge 0b2abaa666 into merged_master (Bitcoin PR #19954) 2020-11-30 17:12:23 +00:00
Andrew Poelstra
7c68cb4fb0 Merge 6af9b31bfc into merged_master (Bitcoin PR #19107) 2020-11-29 23:52:21 +00:00
Andrew Poelstra
eec76f80cc Merge 68d1f1698f into merged_master (Bitcoin PR #19890) 2020-11-28 23:47:58 +00:00
Andrew Poelstra
897f8be4ef Merge bd60a9a8ed into merged_master (Bitcoin PR #19818) 2020-11-28 22:14:15 +00:00
Andrew Poelstra
1aea27d291 Merge b4d0366b47 into merged_master (Bitcoin PR #19070) 2020-11-27 17:48:36 +00:00
Andrew Poelstra
0ddf4fafae Merge f7c73b03d9 into merged_master (Bitcoin PR #19569) 2020-11-26 23:15:28 +00:00
Andrew Poelstra
e547a98b54 Merge ccef10261e into merged_master (Bitcoin PR #18044) 2020-11-26 17:01:52 +00:00
Andrew Poelstra
9324c8c542 Merge 365f1082e1 into merged_master (Bitcoin PR #19112) 2020-11-26 01:08:58 +00:00
Andrew Poelstra
927a580a42 Merge 07d0e0d59f into merged_master (Bitcoin PR #19044) 2020-11-26 01:08:55 +00:00
Andrew Poelstra
ea6e25d012 Merge 8ad5f1c376 into merged_master (Bitcoin PR #19106) 2020-11-26 01:08:54 +00:00