Commit Graph

42203 Commits

Author SHA1 Message Date
MarcoFalke
3df2624ee9 test: Add imports for util bpf_cflags
This is required for the next commit.

Github-Pull: #32336
Rebased-From: fa0c1baaf8
2025-04-24 15:22:24 +01:00
Sjors Provoost
e65676216c build: use make < 3.82 syntax for define directive
From the GNU make 3.82 release announcement:

* The 'define' make directive now allows a variable assignment operator
  after the variable name, to allow for simple, conditional, or appending
  multi-line variable assignment.

macOS ships with 3.81. This caused the multiprocess config options
to be ignored.

Fixes #32068

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>

Github-Pull: #32070
Rebased-From: 9157d9e449
2025-04-17 15:18:34 +01:00
MarcoFalke
2d6c14efba refactor: Remove spurious virtual from final ~CZMQNotificationInterface
Github-Pull: #32187
Rebased-From: fa69c42fdf
2025-04-17 15:14:39 +01:00
Brandon Odiwuor
9b15b20cb1 test: Handle empty string returned by CLI as None in RPC tests 2025-04-17 13:08:38 +01:00
glozow
dbc450c1b5 Merge bitcoin/bitcoin#31648: [28.x] Backports
e57359c7dd doc: Update release notes (fanquake)
51fbcba682 depends: Fix compiling `libevent` package on NetBSD (Hennadii Stepanov)
2829588882 tracing: Rename the `MIN` macro to `_TRACEPOINT_TEST_MIN` in log_raw_p2p_msgs (0xb10c)
f676da82fa depends: Fix spacing issue (Hennadii Stepanov)
4e7dd0ac20 doc: upgrade license to 2025. (Kay)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/31500
  * https://github.com/bitcoin/bitcoin/pull/31611
  * https://github.com/bitcoin/bitcoin/pull/31623
  * https://github.com/bitcoin/bitcoin/pull/31627

ACKs for top commit:
  stickies-v:
    ACK e57359c7dd
  willcl-ark:
    ACK e57359c7dd

Tree-SHA512: 2ddc7e5cf1b84846b5b066509074a475bdce6ba70938c5100c985b1135ae0662568654c4053aeddb4a022c7c2c38c49f6ed42f9cc2ff68a3057236202fae141c
2025-03-05 12:34:27 -05:00
fanquake
e57359c7dd doc: Update release notes 2025-03-05 13:49:49 +00:00
Hennadii Stepanov
51fbcba682 depends: Fix compiling libevent package on NetBSD
Github-Pull: #31500
Rebased-From: f89f16846e
2025-03-05 13:48:47 +00:00
0xb10c
2829588882 tracing: Rename the MIN macro to _TRACEPOINT_TEST_MIN in log_raw_p2p_msgs
Inspired by: 00c1dbd26d (#31419)

Github-Pull: #31623
Rebased-From: f93f0c9396
2025-01-10 17:10:38 +00:00
Hennadii Stepanov
f676da82fa depends: Fix spacing issue
This change resolves an issue where a missing space caused the value of
the `build_AR` variable to be concatenated with the "NM=" string. This
resulted in subsequent calls to `${AR}` and `${NM}` failing.

Github-Pull: #31627
Rebased-From: 8a46286da6
2025-01-10 17:10:38 +00:00
Kay
4e7dd0ac20 doc: upgrade license to 2025.
Github-Pull: #31611
Rebased-From: b537a2c02a
2025-01-10 17:10:38 +00:00
Ava Chow
32efe85043 Merge bitcoin/bitcoin#31594: [28.x] 28.1 backports and final changes
36314b8da2 doc: Update 28.1 release notes (MarcoFalke)
58910279dc doc: generate 28.1 manpages (Ava Chow)
6a68ef9bfb build: bump to 28.1 (Ava Chow)
5b368f88a9 depends: Fix CXXFLAGS on NetBSD (Hennadii Stepanov)
05cd448e33 test: generateblocks called by multiple threads (MarcoFalke)
621c634b7f rpc: Extend scope of validation mutex in generateblock (MarcoFalke)

Pull request description:

  Backports:

  - #31502
  - #31563

ACKs for top commit:
  glozow:
    reACK 36314b8da2
  achow101:
    ACK 36314b8da2

Tree-SHA512: c7a624b4c166f4322011d98d1ca814ae98eaf5fd2481a507cd65a50216f1abbb91f8643508ce81f64f8b10fa2210db1722254c343253f2a950b9c64667735e9b
v28.1
2025-01-07 13:32:56 -05:00
MarcoFalke
36314b8da2 doc: Update 28.1 release notes 2025-01-06 11:04:28 +01:00
Ava Chow
58910279dc doc: generate 28.1 manpages 2025-01-02 20:53:02 +01:00
Ava Chow
6a68ef9bfb build: bump to 28.1 2025-01-02 20:53:02 +01:00
Hennadii Stepanov
5b368f88a9 depends: Fix CXXFLAGS on NetBSD
This change corrects an issue where CXXFLAGS were mistakenly overridden
by CFLAGS.

Github-Pull: 31502
Rebased-From: a10bb400e8
2025-01-02 14:18:28 +01:00
MarcoFalke
05cd448e33 test: generateblocks called by multiple threads
Co-Authored-By: David Gumberg <davidzgumberg@gmail.com>

Github-Pull: 31563
Rebased-From: fa63b8232f
2025-01-02 14:17:02 +01:00
MarcoFalke
621c634b7f rpc: Extend scope of validation mutex in generateblock
The mutex (required by TestBlockValidity) must be held after creating
the block, until TestBlockValidity is called. Otherwise, it is possible
that the chain advances in the meantime and leads to a crash in
TestBlockValidity:

 Assertion failed: pindexPrev && pindexPrev == chainstate.m_chain.Tip() (validation.cpp: TestBlockValidity: 4338)

The diff can be reviewed with the git options
--ignore-all-space --function-context

Github-Pull: 31563
Rebased-From: fa62c8b1f0
2025-01-02 14:16:50 +01:00
Ava Chow
6db725662d Merge bitcoin/bitcoin#31469: [28.x] 28.1rc2 backports
5576618152 doc: update release notes for 28.1rc2 (Ava Chow)
01fe07a2ce examples: Generate example bitcoin.conf (Ava Chow)
7ddfcf32da doc: Generate manpages (Ava Chow)
e0b27b234c build: Bump to 28.1rc2 (Ava Chow)
bdc6b3e531 Add release note for #31223 (Martin Zumsande)
a0585b6087 test: add functional test for -port behavior (Martin Zumsande)
bbde830b97 net, init: derive default onion port if a user specified a -port (Martin Zumsande)
227642d5af test: fix MIN macro-redefinition (0xb10c)
b8112cf422 util: use explicit cast in MultiIntBitSet::Fill() (Vasil Dimov)
2835158be0 fuzz: add cstdlib to FuzzedDataProvider (fanquake)

Pull request description:

  Backports:

  * #31223
  * #31448
  * #31431
  * #31419

ACKs for top commit:
  hodlinator:
    re-ACK 5576618152

Tree-SHA512: f99f3c5960f18f6894832c5f9a827f97fd3c6e086670341760ce1b77c304d53136492371c59148f3b4bbcfe2d5428c835fe632c61b229b40f1f6f6cf2b72cdca
v28.1rc2
2024-12-17 13:06:08 -05:00
Ava Chow
5576618152 doc: update release notes for 28.1rc2 2024-12-13 21:27:57 -05:00
Ava Chow
01fe07a2ce examples: Generate example bitcoin.conf 2024-12-13 21:20:23 -05:00
Ava Chow
7ddfcf32da doc: Generate manpages 2024-12-13 21:19:41 -05:00
Ava Chow
e0b27b234c build: Bump to 28.1rc2 2024-12-13 21:16:24 -05:00
Martin Zumsande
bdc6b3e531 Add release note for #31223
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: bitcoin/bitcoin#31223
Rebased-From: 1dd3af8fbc
2024-12-13 21:15:29 -05:00
Martin Zumsande
a0585b6087 test: add functional test for -port behavior
Github-Pull: bitcoin/bitcoin#31223
Rebased-From: 997757dd2b
2024-12-13 21:15:26 -05:00
Martin Zumsande
bbde830b97 net, init: derive default onion port if a user specified a -port
After port collisions are no longer tolerated but lead to
a startup failure in v28.0, local setups of multiple nodes,
each with a different -port value would not be possible anymore
due to collision of the onion default port - even if the nodes
were using tor or not interested in receiving onion inbound connections.

Fix this by deriving the onion listening port to be -port + 1.
(idea by vasild / laanwj)

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: bitcoin/bitcoin#31223
Rebased-From: 0e2b12b92a
2024-12-13 21:15:23 -05:00
0xb10c
227642d5af test: fix MIN macro-redefinition
Renames the `MIN` macro to `_TRACEPOINT_TEST_MIN`.

From #31418:

```
stderr:
/virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined]
   70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
      |         ^
include/linux/minmax.h:329:9: note: previous definition is here
  329 | #define MIN(a,b) __cmp(min,a,b)
      |         ^
1 warning generated.
```

fixes: https://github.com/bitcoin/bitcoin/issues/31418

Github-Pull: bitcoin/bitcoin#31419
Rebased-From: 00c1dbd26d
2024-12-11 11:41:49 -05:00
Vasil Dimov
b8112cf422 util: use explicit cast in MultiIntBitSet::Fill()
The current code does not have a bug, but is implicitly casting -1 to
65535 and the sanitizer has no way to know whether we intend that or
not.

```
FUZZ=bitset src/test/fuzz/fuzz /tmp/fuz

error: implicit conversion from type 'int' of value -1 (32-bit, signed)
to type 'value_type' (aka 'unsigned short') changed the value to 65535
(16-bit, unsigned)

Base64: Qv7bX/8=
```

Github-Pull: bitcoin/bitcoin#31431
Rebased-From: edb41e4814
2024-12-11 11:41:39 -05:00
fanquake
2835158be0 fuzz: add cstdlib to FuzzedDataProvider
Same as https://github.com/llvm/llvm-project/pull/113951.

Avoids compile failures under clang-20 &
`D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`:
```bash
In file included from /bitcoin/src/test/fuzz/addition_overflow.cpp:5:
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:209:5: error: use of undeclared identifier 'abort'
  209 |     abort();
      |     ^
/bitcoin/src/test/fuzz/FuzzedDataProvider.h:250:5: error: use of undeclared identifier 'abort'
  250 |     abort();
```

Github-Pull: bitcoin/bitcoin#31448
Rebased-From: bb7e686341
2024-12-11 11:41:27 -05:00
merge-script
d6b225f165 Merge bitcoin/bitcoin#31104: [28.x] Backports & 28.1rc1
8fef83a0a0 doc: update manual pages for 28.1rc1 (fanquake)
df7764621e build: bump version to 28.1rc1 (fanquake)
9add853b65 doc: update release notes for 28.1rc1 (fanquake)
1025090fbe build: disable compiling fuzz/utxo_snapshot.cpp with MSVC (fanquake)
446f5d20d6 refactor: Drop deprecated space in operator""_mst (MarcoFalke)
9976162a0e addrman: change nid_type from int to int64_t (Martin Zumsande)
1d0411dc8f addrman, refactor: introduce user-defined type for internal nId (Martin Zumsande)
7fec638222 depends: For mingw cross compile use -gcc-posix to prevent library conflict (laanwj)
f998ac6286 key: clear out secret data in `DecodeExtKey` (Sebastian Falbesoner)
0773560abf ci: add LLVM_SYMBOLIZER_PATH to Valgrind fuzz job (fanquake)
b917334208 test: add missing sync to feature_fee_estimation.py (Martin Zumsande)
f072721181 doc: add testnet4 section header for config file (Marnix)
6643fd2145 doc: Archive 28.0 release notes (Ava Chow)

Pull request description:

  Backports:
  * #30568
  * #31007
  * #31013
  * #31016
  * #31035
  * #31166

  Contains:
  * A commit to do the same as #31307.

ACKs for top commit:
  willcl-ark:
    ACK 8fef83a0a0

Tree-SHA512: 58f0c6cb9e5b7ac17ad20141acdc5423dbe8e79cc3a2cf1c4e503d289b75940632c9838c64e3ac733b1a55e65723fc1071ccdd9a860a710256cc88e29f42ccdb
v28.1rc1
2024-12-04 13:36:28 +00:00
fanquake
8fef83a0a0 doc: update manual pages for 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
df7764621e build: bump version to 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
9add853b65 doc: update release notes for 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
1025090fbe build: disable compiling fuzz/utxo_snapshot.cpp with MSVC
This is a backport of #31307 / b2d5361002
for 28.x.
2024-12-02 14:20:15 +00:00
MarcoFalke
446f5d20d6 refactor: Drop deprecated space in operator""_mst
Github-Pull: #31267
Rebased-From: faf2162565
2024-12-02 14:20:14 +00:00
Martin Zumsande
9976162a0e addrman: change nid_type from int to int64_t
With nId being incremented for each addr received,
an attacker could cause an overflow in the past.
(https://bitcoincore.org/en/2024/07/31/disclose-addrman-int-overflow/)
Even though that attack was made infeasible by
rate-limiting (PR #22387), to be on the safe side change the
type to an int64_t.

Github-Pull: #30568
Rebased-From: 51f7668d31
2024-12-02 14:19:59 +00:00
Martin Zumsande
1d0411dc8f addrman, refactor: introduce user-defined type for internal nId
This makes it easier to track which spots refer to an nId
(as opposed to, for example, bucket index etc. which also use int)

Co-authored-by: Pieter Wuille <pieter@wuille.net>

Github-Pull: #30568
Rebased-From: 051ba3290e
2024-11-04 16:27:06 +00:00
laanwj
7fec638222 depends: For mingw cross compile use -gcc-posix to prevent library conflict
CMake parses some paths from the spec of the C compiler, assuming it
will be the linker, resulting in the link to end up with
`-L/usr/lib/gcc/x86_64-w64-mingw32/12-win32` on debian bookworm if both
-win32 and -posix variants are installed, and -win32 is the default
alternative.

This results in the wrong C++ library being linked, missing
std::threads::hardware_concurrency and other threading functions.

To fix this, use the -posix variant of gcc as well when available. This
fixes a regression compared to autotools, where this scenario worked.

Github-Pull: #31013
Rebased-From: ae56b3230b
2024-10-31 15:07:51 +00:00
Sebastian Falbesoner
f998ac6286 key: clear out secret data in DecodeExtKey
Same as in `DecodeSecret`, we should also clear out the secret data from
the vector resulting from the Base58Check parsing for xprv keys. Note
that the if condition is needed in order to avoid UB, see #14242 (commit
d855e4cac8).

Github-Pull: #31166
Rebased-From: 559a8dd9c0
2024-10-31 14:48:56 +00:00
fanquake
0773560abf ci: add LLVM_SYMBOLIZER_PATH to Valgrind fuzz job
Otherwise:
```bash
	NEW_FUNC[1/23]: ==4710==WARNING: invalid path to external symbolizer!
==4710==WARNING: Failed to use and restart external symbolizer!
0xb72010  (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0xa6a010) (BuildId: 2087ad415cb752eea259ed750f3b78a7fcb0b43b)
	NEW_FUNC[2/23]: 0xb72240  (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0xa6a240) (BuildId: 2087ad415cb752eea259ed750f3b78a7fcb0b43b)

```

Github-Pull: #30961
Rebased-From: c1832584bf
2024-10-22 16:06:06 +01:00
Martin Zumsande
b917334208 test: add missing sync to feature_fee_estimation.py
Fixes a race between node 1 catching up with the chain and mining a
new block in the sanity_check_rbf_estimates subtest.

Github-Pull: #31016
Rebased-From: a1576edab3
2024-10-22 16:04:14 +01:00
Marnix
f072721181 doc: add testnet4 section header for config file
Github-Pull: #31007
Rebased-From: 61cdb1c9d8
2024-10-22 16:04:04 +01:00
Ava Chow
6643fd2145 doc: Archive 28.0 release notes
Github-Pull: #31035
Rebased-From: f019fcec41
2024-10-16 16:25:33 +01:00
Ava Chow
89522379d1 Merge bitcoin/bitcoin#31034: [28.x] doc: Sync 28.0 release notes with website
89d34cffed doc: Sync 28.0 release notes with website (Ava Chow)

Pull request description:

  Since there were some changes to the release notes after the tagging, update the in branch release notes to match those that ended up on the website.

ACKs for top commit:
  tdb3:
    ACK 89d34cffed

Tree-SHA512: 1feeafb0f604d36c1817e8bf38cbaef5d41f958dd823c99a19a1a9f7f1f1d38f917872c84b536dd784d7a672904ed2399369693f200a2837cd5707a686d3e634
2024-10-05 11:17:41 -04:00
Ava Chow
89d34cffed doc: Sync 28.0 release notes with website 2024-10-04 19:25:24 -04:00
Ava Chow
1101837461 Merge bitcoin/bitcoin#30959: [28.x] backports and finalize
5de225f5c1 doc: 28.0 Release Notes (Ava Chow)
98745e03ff doc: generate manpages (Ava Chow)
5feef9ce7e build: Bump to 28.0 (Ava Chow)
7fcd7b85c6 validation: Disable CheckForkWarningConditions for background chainstate (Martin Zumsande)
e24a25d882 test: Use shell builtins in run_command test case (Ava Chow)

Pull request description:

  * #30952
  * #30962
  * Finalize 28.0 (or rc3 if additional backports are needed)

ACKs for top commit:
  sipa:
    utACK 5de225f5c1

Tree-SHA512: b42948a04d4250f2c9ef3331a39a4c3d7de9ceb9f4f294dd283599d08f3e2b7147297ef9ec1c4276e291a015fc2daa5a72c1f1c33fb517e8ea5c740c4459bf32
v28.0
2024-10-01 13:30:02 -04:00
Ava Chow
5de225f5c1 doc: 28.0 Release Notes 2024-09-30 17:13:20 -04:00
Ava Chow
98745e03ff doc: generate manpages 2024-09-25 14:34:31 -04:00
Ava Chow
5feef9ce7e build: Bump to 28.0 2024-09-25 14:34:29 -04:00
Martin Zumsande
7fcd7b85c6 validation: Disable CheckForkWarningConditions for background chainstate
The comparison of m_best_invalid with the tip of the respective chainstate
makes no sense for the background chainstate, and can lead to incorrect
error messages.

Github-Pull: bitcoin/bitcoin#30962
Rebased-From: c0a0c72b4d
2024-09-25 14:34:26 -04:00
Ava Chow
e24a25d882 test: Use shell builtins in run_command test case
Github-Pull: bitcoin/bitcoin#30952
Rebased-From: 7bd3ee62f6
2024-09-24 11:40:27 -04:00