Commit Graph

45453 Commits

Author SHA1 Message Date
Hennadii Stepanov
1df96f5931 doc: Update Qt 6 packages on FreeBSD 2025-06-12 18:20:19 +01:00
josibake
d7c37906e7 build: patch cmake min version on freetype
Patch cmake_minimum_required version for freetype, using the version from
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/352/diffs

This fixes a failure when building with CMake 4, where compatibility
with CMake versions < 3.5 has been removed (see https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features)
2025-06-12 12:31:26 +02:00
MarcoFalke
fa946520d2 refactor: Use structured binding for-loop 2025-06-12 11:37:02 +02:00
MarcoFalke
eeeec1579e rpc: Use type-safe exception to pass RPC help 2025-06-12 11:36:43 +02:00
Ava Chow
5757de4ddd Merge bitcoin/bitcoin#32673: clang-tidy: Apply modernize-deprecated-headers
fa9ca13f35 refactor: Sort includes of touched source files (MarcoFalke)
facb152697 scripted-diff: Bump copyright headers after include changes (MarcoFalke)
fae71d30f7 clang-tidy: Apply modernize-deprecated-headers (MarcoFalke)

Pull request description:

  Bitcoin Core is written in C++, so it is confusing to sometimes use the deprecated C headers (with the `.h` extension). For example, it is less clear whether `string.h` refers to the file in this repo or the cstring stdlib header (https://github.com/bitcoin/bitcoin/pull/31308#discussion_r2121492797).

  The check is currently disabled for headers, to exclude subtree headers.

ACKs for top commit:
  l0rinc:
    ACK fa9ca13f35
  achow101:
    ACK fa9ca13f35
  janb84:
    ACK fa9ca13f35
  stickies-v:
    ACK fa9ca13f35

Tree-SHA512: 6639608308c598d612e24435aa519afe92d71b955874b87e527245291fb874b67f3ab95d3a0a5125c6adce5eb41c0d62f6ca488fbbfd60a94f2063d734173f4d
2025-06-11 15:08:23 -07:00
Ava Chow
1473f69924 Merge bitcoin/bitcoin#32421: test: refactor: overhaul (w)txid determination for CTransaction objects
4ef6253017 test: avoid unneeded (w)txid hex -> integer conversions (Sebastian Falbesoner)
472f3770ae scripted-diff: test: rename CTransaction `.getwtxid()` -> `wtxid_hex` for consistency (Sebastian Falbesoner)
81af4334e8 test: rename CTransaction `.sha256` -> `.txid_int` for consistency (Sebastian Falbesoner)
ce83924237 test: rename CTransaction `.rehash()`/`.hash` -> `.txid_hex` for consistency (Sebastian Falbesoner)
e9cdaefb0a test: introduce and use CTransaction `.wtxid_int` property (Sebastian Falbesoner)
9b3dce24a3 test: remove bare CTransaction `.rehash()`/`.calc_sha256()` calls (Sebastian Falbesoner)
a2724e3ea3 test: remove txid caching in CTransaction class (Sebastian Falbesoner)

Pull request description:

  In the functional test framework, determining a (w)txid for a `CTransaction` instance is currently rather confusing and footgunny due to inconsistent naming/interfaces (see table below) and statefulness involved. This PR aims to improve that by:
  * removing the (w)txid caching mechanism, in order to avoid the need to call additional rehashing functions (`.rehash()`/`.calculate_sha256()`, see first two commits and https://github.com/bitcoin/bitcoin/pull/32050#discussion_r1993286997). This change in theory decreases the performance, as the involved serialization and hashing involved might be called more often than previously, but I couldn't find a functional test where this leads to a measurable run-time increase on my machine.
  * introduce consistent naming that shows the type of the returned txid, i.e. hex string vs. test-framework-internal representation [currently integers] (see remaining commits)

  Summary table showing (w)txid determaination before/after this PR:

  | Task                   | master                 | PR           |
  |:-----------------------|:-----------------------|:-------------|
  | get TXID (hex string)  | `.rehash()` / `.hash`[1] | `.txid_hex`  |
  | get TXID (integer)     | `.sha256`[1]             | `.txid_int`  |
  | get WTXID (hex string) | `.getwtxid()`          | `.wtxid_hex` |
  | get WTXID (integer)    | `.calc_sha256(True)`   | `.wtxid_int` |

  Unfortunately, most renames can't be done with a scripted-diff, as the property names (`.hash`, `.sha256`) are also used for blocks and other message types. The PR is rather invasive and touches a lot of files, but I think it's worth to do it, also to make life easier for new contributors. Future tasks like e.g. doing the same overhaul for block (header) objects or getting rid of the integer representation (see https://github.com/bitcoin/bitcoin/pull/32050) become easier should become easier after this one.

  [1] = returned value might be out-of-date, if rehashing function wasn't called after modification

ACKs for top commit:
  maflcko:
    re-ACK 4ef6253017 🏈
  achow101:
    ACK 4ef6253017
  marcofleon:
    code review ACK 4ef6253017

Tree-SHA512: 4b472c31d169966b6f6878911a8404d25bf3e503b6e8ef30f36a7415d21ad4bc1265083af2d3ead6edfcd9fac9ccb0a8be57e1b0739ad431b836413070d7d583
2025-06-11 14:21:11 -07:00
Ryan Ofsky
7c0cfce20d Merge bitcoin/bitcoin#31405: validation: stricter internal handling of invalid blocks
f6b782f3aa doc: Improve m_best_header documentation (Martin Zumsande)
ee673b9aa0 validation: remove m_failed_blocks (Martin Zumsande)
ed764ea2b4 validation: Add more checks to CheckBlockIndex() (Martin Zumsande)
9a70883002 validation: in invalidateblock, calculate m_best_header right away (Martin Zumsande)
8e39f2d20d validation: in invalidateblock, mark children as invalid right away (Martin Zumsande)
4c29326183 validation: cache all headers with enough PoW in invalidateblock (Martin Zumsande)
15fa5b5a90 validation: call InvalidBlockFound also from AcceptBlock (Martin Zumsande)

Pull request description:

  Some fields in validation are set opportunistically by "best effort":
  - The `BLOCK_FAILED_CHILD` status (which means that the block index has an invalid predecessor)
  - `m_best_header` (the most-work header not known to be invalid).

  This means that there are known situations in which these fields are not set when they should be, or set to wrong values. This is tolerated because the fields are not used for anything consensus-critical and triggering these situations involved creating invalid blocks with valid PoW header, so would have a cost attached. Also, having stricter guarantees for these fields requires iterating over the entire block index, which has some DoS potential, especially with any header above the checkpoint being accepted int he past (see e.g. #11531).

  However, there are reasons to change this now:
  - RPCs use these fields and can report wrong results
  - There is the constant possibility that someone could add code that expects these fields to be correct, especially because it is not well documented that these fields cannot always be relied upon.
  - DoS concerns have become less of an issue after #25717 - now an attacker would need to invest much more work because they can't fork off the last checkpoint anymore

  This PR continues the work from #30666 to ensure that `BLOCK_FAILED_CHILD` status and `m_best_header` are always correct:
  - it adds a call to `InvalidChainFound()` in `AcceptBlock()`.
  - it adds checks for `BLOCK_FAILED_CHILD` and `m_best_header`  to `CheckBlockIndex()`. In order to be able to do this, the existing cache in the RPC-only `InvalidateBlock()` is adjusted to handle these as well. These are performance optimizations with the goal of avoiding having a call of `InvalidChainFound()` / looping over the block index after each disconnected block.
  I also wrote a fuzz test to find possible edge cases violating `CheckBlockIndex`, which I will PR separately soon.
  - it removes the `m_failed_blocks` set, which was a heuristic necessary when we couldn't be sure if a given block index had an invalid predecessor or not. Now that we have that guarantee, the set is no longer needed.

ACKs for top commit:
  stickies-v:
    re-ACK f6b782f3aa
  achow101:
    reACK f6b782f3aa
  ryanofsky:
    Code review ACK f6b782f3aa with only minor code & comment updates
  TheCharlatan:
    Re-ACK f6b782f3aa

Tree-SHA512: 1bee324216eeee6af401abdb683abd098b18212833f9600dbc0a46244e634cb0e6f2a320c937a5675a12af7ec4a7d10fabc1db9e9bc0d9d0712e6e6ca72d084f
2025-06-11 16:17:22 -04:00
merge-script
851f540d0e Merge bitcoin/bitcoin#32703: test: Explain how to reproduce zmq:: upstream race
fa0b766f43 test: Remove intermittent and presumed fixed tsan race suppressions (MarcoFalke)
fa4b659dcd test: Explain how to reproduce zmq:: upstream race (MarcoFalke)

Pull request description:

  An explanation makes it easier to reproduce, if needed.

ACKs for top commit:
  fanquake:
    ACK fa0b766f43

Tree-SHA512: 4857cc1e2c97e3d8c194fd12d0bb2a3293136c51ae1b89e0320161d1b8f22ef5122519e099288e52e42bb828ee4a56bfdfbe80717d95178748b76dd7209e12db
2025-06-11 16:55:55 +01:00
merge-script
5af5e9791d Merge bitcoin/bitcoin#32690: depends: fix multiprocess build on OpenBSD (apply capnp patch, correct SHA256SUM command)
8713e8060d depends: fix SHA256SUM command on OpenBSD (use GNU mode output) (Sebastian Falbesoner)
2d938720bd depends: add patch to fix capnp build on OpenBSD (Sebastian Falbesoner)

Pull request description:

  This PR fixes the multiprocess depends build for OpenBSD by applying upstream patch https://github.com/capnproto/capnproto/pull/2308 and switching the SHA256SUM command to output hash sums in the expected format (the default is BSD format [1], but we need GNU format [2], see commit message for details). Note that the hashing issue is only prevailing for packages defining the `$(package)_local_dir` variable (introduced in 5d105fb8c3, part of #31741), where the following line of the `fetch_local_dir_sha256` function leads to the wrong output:
  ae024137bd/depends/funcs.mk (L57)

  The first commit can be replaced with a simple capnp version bump once this is available in a release.

  Tested on OpenBSD 7.7 (x86_64) via
  ```
  $ gmake -C depends MULTIPROCESS=1 NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_QR=1 NO_WALLET=1 NO_ZMQ=1 NO_USDT=1
  ```

  [1] example output: `SHA256 (/home/thestack/.vimrc) = 6ba69d100e8c5ca0488ded6293d4e5f740a6a5d5ace96cbcf0599c18d27389e4`
  [2] example output: `6ba69d100e8c5ca0488ded6293d4e5f740a6a5d5ace96cbcf0599c18d27389e4 /home/thestack/.vimrc`

ACKs for top commit:
  Sjors:
    ACK 8713e8060d
  hebasto:
    ACK 8713e8060d.
  fanquake:
    ACK 8713e8060d

Tree-SHA512: 178b8b41156e1f1eea101849110167d2636c3093b6a68c88a91a994f0750831aa02e415eb2793c522682c92cb3085de025300e0e2dee894e112dd7e1f495cc08
2025-06-11 16:04:47 +01:00
merge-script
fed41b75fb Merge bitcoin/bitcoin#32431: deps: Bump lief to 0.16.6
4f56c9145a refactor: contrib: Move FORTIFY check to BASE_ELF (David Gumberg)
f6d25e8a2d contrib: Re-enable FORTIFY check for RISCV (David Gumberg)
765922d802 deps: bump lief to 0.16.6 (David Gumberg)

Pull request description:

  Partially resolves https://github.com/bitcoin/bitcoin/issues/30520, updating `lief` to 0.16.6.

ACKs for top commit:
  fanquake:
    ACK 4f56c9145a

Tree-SHA512: f88dde626975044cee6c78f019dffe063d466c59d81bae0c1aee8a4964eb94d84e5197242e0ae05f130b3925955ac7406f47f8a222a128be7b5865f16ce7bdb6
2025-06-11 12:41:02 +01:00
Sjors Provoost
578ea3eedb test: round difficulty and networkhashps
Both are rational numbers. Client software should only use them to
display information to humans. Followup calculations should use the
underlying values such as target.

Therefore it's not necessary to test the handling of these floating
point values. Round them down to avoid spurious test failures.

Fixes #32515
2025-06-11 11:37:24 +02:00
Hennadii Stepanov
c8abd97281 Merge bitcoin/bitcoin#32719: doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project"
239fc4d62e doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project" (Hodlinator)

Pull request description:

  Brings Windows executables in line with */share/setup.nsi.in:14* used by the installer.

  Discovered while reviewing tangential PR: https://github.com/bitcoin/bitcoin/pull/32634#discussion_r2112641918

ACKs for top commit:
  maflcko:
    lgtm ACK 239fc4d62e
  Sjors:
    utACK 239fc4d62e
  janb84:
    utACK 239fc4d62e
  hebasto:
    ACK 239fc4d62e.

Tree-SHA512: 5855e78c32e15a1e4e9b1a6bdefd29c45676a64b3eb4470cb98fa0eea02701edadbde7153143757b525e9a66eb3b49bbba926e8e322307ae6ea4a44ac23eeffb
2025-06-11 10:26:07 +01:00
furszy
029ba1a21d index: remove CBlockIndex access from CustomAppend()
Moved CBlockUndo disk read lookups from child index classes to
the base index class.

The goal is for child index classes to synchronize only through
events, without directly accessing the chain database.

This change will enable future parallel synchronization mechanisms,
reduce database access (when batched), and contribute toward the
goal of running indexes in a separate process (with no chain
database access).

Besides that, this commit also documents how NextSyncBlock() behaves.
It is not immediately clear this function could return the first
block after the fork point during a reorg.
2025-06-10 20:22:18 -04:00
furszy
91b7ab6c69 refactor: index, simplify CopyHeightIndexToHashIndex to process single block
The function previously handled a range of heights but now copies only a
single entry. This change simplifies the code to match its current usage.
2025-06-10 20:22:18 -04:00
David Gumberg
4f56c9145a refactor: contrib: Move FORTIFY check to BASE_ELF 2025-06-10 17:13:57 -07:00
David Gumberg
f6d25e8a2d contrib: Re-enable FORTIFY check for RISCV
Skipping this check is no longer necessary since ab85865f27
resolved the issue.
2025-06-10 17:13:57 -07:00
David Gumberg
765922d802 deps: bump lief to 0.16.6
Some of the primary changes are:
- lief.EXE_FORMATS became lief.Binary.FORMATS IN 0.14.0
        - 494f116c6b/doc/sphinx/changelog.rst (L702)
- lief.ARCHITECTURES became lief.Header.ARCHITECTURES in 0.16.0
        - 494f116c6b/doc/sphinx/changelog.rst (L226C18-L227C18)
- lief.ELF.ARCH.x86_64 became lief.ELF.ARCH.X86_64

This commit includes a workaround for the bug fixed in
https://github.com/lief-project/LIEF/pull/1218, but the workaround can
be kept, since it makes `has_nx` checks stricter by enforcing both heap
and stack are non-executable.

This change also requires a patch to partially revert a commit to LIEF
(f23ced2f4f)
which broke compatibility with versions of scikit-build-core <= 0.10.x.

This patch can be dropped once the guix time machine advances to or
beyond 35c5f07e96,
which bumps the scikit-build-core version in guix from 0.9.3 to 0.10.7.

Co-authored-by: willcl-ark <will8clark@gmail.com>
Co-authored-by: fanquake <fanquake@gmail.com>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-06-10 17:13:57 -07:00
Ava Chow
4b8ac9eacd Merge bitcoin/bitcoin#32680: ci: Rewrite test-each-commit as py script
fa9cfdf3be ci: [doc] fix url redirect (MarcoFalke)
fac60b9c48 ci: Rewrite test-each-commit as py script (MarcoFalke)

Pull request description:

  This was requested in https://github.com/bitcoin/bitcoin/pull/32573#issuecomment-2897546693, as it is currently not possible to catch this type of error in a Bash linter (https://github.com/bitcoin/bitcoin/pull/32573#pullrequestreview-2857077463). Also, reviewers are not familiar with it and didn't catch the above bug either. (Thus, it is discouraged in the dev notes: https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#scripts)

  So just use a simple python script.

ACKs for top commit:
  achow101:
    ACK fa9cfdf3be
  janb84:
    ACK fa9cfdf3be
  ryanofsky:
    Code review ACK fa9cfdf3be

Tree-SHA512: d884795a1db6c0b762a514acfab200e8dead05fc60d2147d988198d0cdb468a24081bb143d505c51fa34207c52685d227496988503e5828a75e667dda7efef63
2025-06-10 16:58:05 -07:00
Sebastian Falbesoner
4ef6253017 test: avoid unneeded (w)txid hex -> integer conversions
Rather than determining a CTransaction's (w)txid as an integer by
converting it's hex value, it can be directly accessed via the
introduced `.{w,}txid_int` property.
2025-06-11 00:52:25 +02:00
Sebastian Falbesoner
472f3770ae scripted-diff: test: rename CTransaction .getwtxid() -> wtxid_hex for consistency
-BEGIN VERIFY SCRIPT-

sed -i "s|def getwtxid|@property\n    def wtxid_hex|g" ./test/functional/test_framework/messages.py
sed -i "s|getwtxid()|wtxid_hex|g" $(git grep -l getwtxid)

-END VERIFY SCRIPT-
2025-06-11 00:52:25 +02:00
Sebastian Falbesoner
81af4334e8 test: rename CTransaction .sha256 -> .txid_int for consistency
Note that we unfortunately can't use a scripted diff here, as the same
property name is also used for `CBlockHeader`/`CBlock` instances.
2025-06-11 00:52:25 +02:00
Sebastian Falbesoner
ce83924237 test: rename CTransaction .rehash()/.hash -> .txid_hex for consistency
Note that we unfortunately can't use a scripted diff here, as the same
property and method name is also used for `CBlockHeader`/`CBlock` instances.
2025-06-11 00:49:10 +02:00
Cory Fields
6efbd1e1dc refactor: CTransaction equality should consider witness data
It is not at all obvious that two transactions with differing witness data
should test equal to each other.

There was only a single instance of a caller relying on this behavior, and that
one appears accidental (left-over from before segwit). That caller (in the
wallet) has been fixed.

Change the definition of transaction equality (and inequality) to use the wtxid
instead.
2025-06-10 22:10:05 +00:00
Cory Fields
cbf9b2dab1 mempool: codify existing assumption about duplicate txids during removal
Also explicitly check for txid equality rather than transaction equality as the
former is a tighter constraint if witness data is included when comparing the
full transactions.

Co-authored-by: glozow <gloriajzhao@gmail.com>
2025-06-10 22:10:05 +00:00
Ava Chow
c3fe85e2d6 wallet, rpc, test: Remove deprecated getunconfirmedbalance 2025-06-10 15:07:11 -07:00
Ava Chow
0ec255139b wallet, rpc: Remove deprecated balances from getwalletinfo 2025-06-10 14:49:02 -07:00
Cory Fields
e9331cd6ab wallet: IsEquivalentTo should strip witness data in addition to scriptsigs 2025-06-10 21:25:14 +00:00
merge-script
157bbd0a07 Merge bitcoin/bitcoin#32425: config: allow setting -proxy per network
e98c51fcce doc: update tor.md to mention the new -proxy=addr:port=tor (Vasil Dimov)
ca5781e23a config: allow setting -proxy per network (Vasil Dimov)

Pull request description:

  `-proxy=addr:port` specifies the proxy for all networks (except I2P). Previously only the Tor proxy could have been specified separately via `-onion=addr:port`.

  Make it possible to specify separately the proxy for IPv4, IPv6, Tor and CJDNS by e.g. `-proxy=addr:port=ipv6`. Or remove the proxy for a given network, e.g. `-proxy=0=cjdns`.

  Resolves: https://github.com/bitcoin/bitcoin/issues/24450

ACKs for top commit:
  pinheadmz:
    ACK e98c51fcce
  caesrcd:
    reACK e98c51fcce
  danielabrozzoni:
    Code Review ACK e98c51fcce
  1440000bytes:
    ACK e98c51fcce

Tree-SHA512: 0cb590cb72b9393cc36357e8bd7861514ec4c5bc044a154e59601420b1fd6240f336ab538ed138bc769fca3d17e03725d56de382666420dc0787895d5bfec131
2025-06-10 15:57:09 -04:00
merge-script
ebec7bf389 Merge bitcoin/bitcoin#32572: doc: Remove stale sections in dev notes
fac00d4ed3 doc: Move CI-must-pass requirement into readme section (MarcoFalke)
fab79c1a25 doc: Clarify and move "hygienic commit" note (MarcoFalke)
fac8b05197 doc: Clarify strprintf size specifier note (MarcoFalke)
faaf34ad72 doc: Remove section about RPC alias via function pointer (MarcoFalke)
2222d61e1c doc: Remove section about RPC arg names in table (MarcoFalke)
fa00b8c02c doc: Remove section about include guards (MarcoFalke)
fad6cd739b doc: Remove dev note section on includes (MarcoFalke)
fa6623d85a doc: Remove file name section (MarcoFalke)
7777fb8bc7 doc: Remove shebang section (MarcoFalke)
faf65f0531 doc: Remove .gitignore section (MarcoFalke)
faf2094f25 doc: Remove note about removed ParsePrechecks (MarcoFalke)
fa69c5b170 doc: Remove -disablewallet from dev notes (MarcoFalke)

Pull request description:

  This removes sections that I've been collecting as stale or overly redundant over the years. The rationale for each removal is in the commit message.

ACKs for top commit:
  yuvicc:
    ACK fac00d4ed3
  janb84:
    LGTM ACK fac00d4ed3
  glozow:
    ACK fac00d4ed3, all lgtm

Tree-SHA512: 17a5b4277fb30d265959d1230a705b36d8501a64c0f4a7f272ea5d9c22031421f95c491144f6d6f714dc7927df667d96ece9ceb43e0a07317d76fdcc4769aaa7
2025-06-10 15:41:11 -04:00
pablomartin4btc
ce90f0c99f rpc, wallet, refactor: Remove non-descriptor errors
It is not possible to load a legacy/ non-descriptor wallet anymore
so no need to check for WALLET_FLAG_DESCRIPTORS in RPC calls, even when
passing -rpcwallet/ JSON `/wallet/<walletname>/` endpoint, that searches
for the wallets loaded already in the context.
2025-06-10 16:34:17 -03:00
pablomartin4btc
573bcd75d7 wallet, refactor: Remove unused SetupGeneration
SetupGeneration was supposed to be the function that all SPKMs used
to setup automatic generation, but it didn't work out that way and
ended up being legacy only. It should be deleted at this point.
2025-06-10 16:34:17 -03:00
pablomartin4btc
5431f2dc21 wallet, refactor: Remove Legacy warnings and errors
Remove dead code due to legacy wallet removal.
2025-06-10 16:27:42 -03:00
Ryan Ofsky
6f1392cc42 indexes, refactor: Remove remaining CBlockIndex* uses in index Rewind methods
Move ReadBlock code from CoinStatsIndex::CustomRewind to BaseIndex::Rewind

Move ReadUndo code from CoinStatsIndex::ReverseBlock to BaseIndex::Rewind

This commit does change behavior slightly. Since the new CustomRemove
methods only take a single block at a time instead of a range of
disconnected blocks, when they call CopyHeightIndexToHashIndex they will
now do an index seek for each removed block instead of only seeking once
to the height of the earliest removed block. Seeking instead of scanning
is a little worse for performance if there is a >1 block reorg, but
probably not noticeable unless the reorg is very deep.
2025-06-10 12:57:15 -04:00
Ryan Ofsky
0a248708dc indexes, refactor: Stop requiring CBlockIndex type to call IsBIP30Unspendable
This commit does not change behavior in any way.
2025-06-10 12:57:15 -04:00
merge-script
011a8c5f01 Merge bitcoin/bitcoin#32696: doc: make -DWITH_ZMQ=ON explicit on build-unix.md
32d4e92b9a doc: make `-DWITH_ZMQ=ON` explicit on `build-unix.md` (Luis Schwab)

Pull request description:

  ZMQ support is not built by default on Linux, and the docs don't make that clear. This PR makes it explicit that the `-DWITH_ZMQ=ON` flag is required to build with ZMQ support on `build-unix.md`.

ACKs for top commit:
  maflcko:
    lgtm ACK 32d4e92b9a

Tree-SHA512: 322d0dd86bb80aa5a5640a5510cbeeec29f490c33b8f7360e3a202147a02c303064e6761ceb42e38e26982c61f35c9b048804c705a0d95c5737ebd2109febead
2025-06-10 17:26:04 +01:00
merge-script
fe39050a66 Merge bitcoin/bitcoin#32678: guix: warn and abort when SOURCE_DATE_EPOCH is set
5c4a0f8009 guix: warn and abort when SOURCE_DATE_EPOCH is set (will)

Pull request description:

  Fixes: #29935

  Current behaviour will by-default use SOURCE_DATE_EPOCH from the environment without warning. This breaks the default reproducibility from a guix build.

  Warn when and exit when this variable is set, and
  FORCE_SOURCE_DATE_EPOCH is unset.

ACKs for top commit:
  maflcko:
    lgtm ACK 5c4a0f8009
  fanquake:
    ACK 5c4a0f8009

Tree-SHA512: fdd6095a91bd87ffdc22918dc43869edc2380501d1b047e95caadd8a6624928691bfe5b7af9693177cbc28e69366e3397e43a06f2f346cc3a9fe233b7fb9588f
2025-06-10 15:22:03 +01:00
merge-script
692fe280c2 Merge bitcoin/bitcoin#32713: doc: fuzz: fix AFL++ link
a39b7071cf doc: fuzz: fix AFL++ link (brunoerg)

Pull request description:

  Fix link about selecting the best AFL compiler.

ACKs for top commit:
  maflcko:
    lgtm ACK a39b7071cf

Tree-SHA512: 6366f18767f6c60f806faa374bd4a6a3bb71a1c74b7040867177ca9ded946707a75b4f39bf698530ba9c5ff708394d88f5b29f4a92f9e95aaca7b37c62b72093
2025-06-10 15:18:32 +01:00
Greg Sanders
28299ce776 p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED 2025-06-10 10:07:56 -04:00
Greg Sanders
bac9ee4830 p2p: Add witness mutation check inside FillBlock
Since #29412, we have not allowed mutated blocks to continue
being processed immediately the block is received, but this
is only done for the legacy BLOCK message.

Extend these checks as belt-and-suspenders to not allow
similar mutation strategies to affect relay by honest peers
by applying the check inside
PartiallyDownloadedBlock::FillBlock, immediately before
returning READ_STATUS_OK.

This also removes the extraneous CheckBlock call.
2025-06-10 10:07:56 -04:00
Hennadii Stepanov
4f10a57671 depends: Override host compilers for FreeBSD and OpenBSD
When building depends on FreeBSD/OpenBSD `aarch64`, the host compilers
default to `default_host_{CC,CXX}`, which resolves to `gcc`/`g++`. This
is incorrect on these systems, where Clang is the default system
compiler.
2025-06-10 14:59:46 +01:00
Hodlinator
239fc4d62e doc, windows: CompanyName "Bitcoin" => "Bitcoin Core project"
Matches /share/setup.nsi.in:14
2025-06-10 15:14:24 +02:00
merge-script
c1d4253d31 Merge bitcoin/bitcoin#32711: doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md
89526deddf doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md (Sebastian Falbesoner)

Pull request description:

  Suggested initially only for OpenBSD and cmake (see https://github.com/bitcoin/bitcoin/pull/32690#issuecomment-2949660658, https://github.com/bitcoin/bitcoin/pull/32690#issuecomment-2949729126), this PR adds missing package recommendations for other BSDs as well in order to build depends. I tested this only on OpenBSD, but found the package names for the other BSDs on the ports search engines:
  * FreeBSD: https://ports.freebsd.org/cgi/ports.cgi
  * NetBSD: https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/index-all.html

  At least on OpenBSD, curl is a [dependency of git](879e73073b/devel/git/Makefile (L49-L50)), so most users will not need to install it explicitly. But as git is not the only way to obtain the source code, I think it doesn't hurt to list it, and we also do it already for Ubuntu & Debian:
  f3bbc74664/depends/README.md (L9-L11)

ACKs for top commit:
  maflcko:
    lgtm ACK 89526deddf
  Sjors:
    re-utACK 89526deddf
  hebasto:
    ACK 89526deddf.

Tree-SHA512: ba8b540f902b924740c81c5d874f9525d214b75c5892cd1234db2207e9ca96c2bc80e8b743e0d924a55f40a91894cbb4a6635f1561998a7e0ba26d9f68e0e1a4
2025-06-10 13:28:27 +01:00
Sebastian Falbesoner
89526deddf doc: add missing packages for BSDs (cmake, gmake, curl) to depends/README.md 2025-06-10 13:04:25 +02:00
brunoerg
a39b7071cf doc: fuzz: fix AFL++ link
Co-authored-by: eugene <elzeigel@gmail.com>
2025-06-09 18:51:17 -03:00
Ava Chow
dff208bd5a Merge bitcoin/bitcoin#32708: rpc, doc: update listdescriptors RCP help
b44514b876 rpc, doc: update `listdescriptors` RCP help (rkrux)

Pull request description:

  This RPC lists all the descriptors present in the wallet, not only the ones that were imported, but also the ones generated when a new wallet is created.

  It can be verified by creating a new wallet and calling the `listdescriptors` RPC, which will contain 8 ranged descriptors that are created for every new wallet.

  Also, update the description to get rid of "descriptor-enabled" because this is the only wallet type available now after removal of legacy wallets.

ACKs for top commit:
  maflcko:
    lgtm ACK b44514b876
  achow101:
    ACK b44514b876
  pablomartin4btc:
    ACK b44514b876
  theStack:
    ACK b44514b876

Tree-SHA512: d1018dd42fc4de12793f3e4f3be79ecb3fdee46fbc93ec8adb62b29a86e74aba2605d9908632107061f48ef8ee6f39ef6d0e34cc5e91acd93bc02242a2cee3eb
2025-06-09 14:38:14 -07:00
Ava Chow
d978a43d05 Merge bitcoin/bitcoin#32408: tests: Expand HTTP coverage to assert libevent behavior
f16c8c67bf tests: Expand HTTP coverage to assert libevent behavior (Matthew Zipkin)

Pull request description:

  These commits are cherry-picked from #32061  and part of a project to [remove libevent](https://github.com/bitcoin/bitcoin/issues/31194).

  This PR only adds functional tests to `interface_http` to cover some HTTP server behaviors we inherit from libevent, in order to maintain those behaviors when we replace libevent with our own HTTP server.

  1. Pipelining: The server must respond to requests from a client in the order in which they were received [RFC 7230 6.3.2](https://www.rfc-editor.org/rfc/rfc7230#section-6.3.2)
  2. `-rpcservertimeout` config option which sets the amount of time the server will keep an idle client connection alive
  3. "Chunked" Transfer-Encoding: Allows a client to send a request in pieces, without the `Content-Length` header [RFC 7230 4.1](https://www.rfc-editor.org/rfc/rfc7230#section-4.1)

ACKs for top commit:
  achow101:
    ACK f16c8c67bf
  vasild:
    ACK f16c8c67bf
  polespinasa:
    ACK f16c8c67bf
  fjahr:
    utACK f16c8c67bf

Tree-SHA512: 405b59431b4d2bf118fde04b270865dee06ef980ab120d9cc1dce28e5d65dfd880a57055b407009d22f4de614bc3eebdb3e203bcd39e86cb14fbfd62195ed06a
2025-06-09 13:08:25 -07:00
Sebastian Falbesoner
e9cdaefb0a test: introduce and use CTransaction .wtxid_int property
This commits removes the `.calc_sha256` method from the CTransaction
and introduces a property `.wtxid_int` property as replacement.
2025-06-09 17:28:28 +02:00
Sebastian Falbesoner
9b3dce24a3 test: remove bare CTransaction .rehash()/.calc_sha256() calls
Since the previous commit, CTransaction object calls to the
methods `.rehash()` and `.calc_sha256()` are effectively no-ops
if the returned value is not used, so we can just remove them.
2025-06-09 17:28:24 +02:00
Sebastian Falbesoner
a2724e3ea3 test: remove txid caching in CTransaction class
Rather than txids (represented by the fields `.sha256` and `.hash`)
being stateful, simply compute them on-the-fly. This ensures that
the correct values are always returned and takes the burden of
rehashing from test writers, making the code shorter overall.
In a first step, the fields are kept at the same name with @property
functions as drop-in replacements, for a minimal diff. In later commits,
the names are changed to be more descriptive and indicating the return
type of the txid.
2025-06-09 16:55:04 +02:00
MarcoFalke
fa0b766f43 test: Remove intermittent and presumed fixed tsan race suppressions
LoadWallet was added in commit d77170d526, which
points to a traceback with BerkeleyBatch in it. Now that BDB is removed,
this can be removed as well.

The race in DatabaseBatch was added in commit
fd59670642, which does not point to a
traceback. This was likely also fixed with the BDB removal.

If not, the suppressions should be added back, mentioning that they are
intermittent and including a traceback and possibly steps to reproduce.
2025-06-09 16:28:48 +02:00