1
1
mirror of https://github.com/bitcoin/bitcoin synced 2025-10-06 02:22:43 +02:00

2450 Commits

Author SHA1 Message Date
merge-script
86eaa4d6cd Merge bitcoin/bitcoin#33482: contrib: fix macOS deployment with no translations
7b5261f7ef contrib: fix using macdploy script without translations. (amisha)

Pull request description:

  **Description**
  From what I deciphered reading the line https://github.com/bitcoin/bitcoin/blob/master/contrib/macdeploy/macdeployqtplus#L390 is that qt translations are optional to have hence we should be able to build without it but the case where the flag translations_dir falls back to its default Null value it raises this error.

  The config comments also mentioned that adding translation file is optional.

  ```
  ./macdeployqtplus --help
  usage: macdeployqtplus [-h] [-verbose [VERBOSE]] [-no-plugins] [-no-strip] [-translations-dir path] [-zip zip] app-bundle

  Improved version of macdeployqt. Outputs a ready-to-deploy app in a folder "dist" and optionally wraps it in a .zip file. Note, that the "dist" folder will be deleted before deploying on each run. Optionally, Qt translation files
  (.qm) can be added to the bundle.
  ```

  **Steps to reproduce**
  So I was following the general steps to set up app on macos however I didn't download any qt translations presuming it was optional from the comment linkedin in PR, so to reproduce if you have translation directories in place ull need to delete them and then try to build the file, otherwise don't download it at all and try to build it. It should fail on that flag as translations dir was never downloaded.

  **Approach taken**
  I have moved the code which adds language files under the if statement that first checks if the value of the flag is not Null before referencing it.

ACKs for top commit:
  ismaelsadeeq:
    ACK 7b5261f7ef

Tree-SHA512: 8d51b17569e42c9feb95e1be17b1551c708a05eb44b82c74db0b25e07006b4ee223d64484f8bdb2ee1420f6e571686561ae1c09bd3362f77dcbb507bc5085f86
2025-10-03 15:40:38 +01:00
merge-script
007900ee9b Merge bitcoin/bitcoin#33434: depends: static libxcb-cursor
eca50854e1 depends: static libxcb_cursor (fanquake)

Pull request description:

  Remove the runtime requirement of `libxcb-cursor`. This library is no-longer present on modern Ubuntu.
  Fixes #33432.
  Also related to #32097.

ACKs for top commit:
  davidgumberg:
    Addendum ACK eca50854e1
  willcl-ark:
    Code review ACK eca50854e1

Tree-SHA512: d545a03baf5030de64874b79add87b6ef5f95eb5ca31aa66007ee03554103d2eda5e56dfd4395d0a12e24b2e489457e4f19ed9e6d390351c72a0da630f03cc42
2025-10-03 15:26:20 +01:00
amisha
7b5261f7ef contrib: fix using macdploy script without translations.
QT translations are optional, but the script would error when
'translations_dir' falls back to its default value NULL.

This PR fixes it by moving the set-up of QT translations under
the check for 'translations_dir' presence.
2025-09-26 10:09:30 +05:30
merge-script
5ae8edbc30 Merge bitcoin/bitcoin#33158: macdeploy: avoid use of Bitcoin Core in Linux cross build
8e434a8499 macdeploy: rename macOS output to bitcoin-macos-app.zip (fanquake)
05353d9cf0 macdeploy: combine appname & -zip arguments (fanquake)

Pull request description:

  Output `bitcoin-macos-app.zip`, similar to what we do for Windows: `bitcoin-win64-setup.exe`.

ACKs for top commit:
  hodlinator:
    re-ACK 8e434a8499
  willcl-ark:
    ACK 8e434a8499

Tree-SHA512: e762c9866630c4f8c577027ee9492d74a5c7f4b194df73876d702703b9100c356a30986c2f209ba3f3e2d483017f5e61596a2a7cdfae0a684f8dc244420cd108
2025-09-24 09:59:45 -04:00
fanquake
eca50854e1 depends: static libxcb_cursor
Modern Ubuntu isn't shipping with this library installed by default.
Staticly link it to remove the need for end-users to install it.

Closes #33432.
2025-09-23 10:43:55 -04:00
fanquake
f5887a8de4 contrib: add bitcoin binary to gen-manpages 2025-09-09 11:25:11 +01:00
fanquake
3cceda9f48 guix: strip binaries in libexec
31679 moved some internal binaries to libexec/, but the Guix build
wasn't updated to stip these binaries of their debug symbols.
2025-09-08 16:21:28 +01:00
merge-script
3eea9fd395 Merge bitcoin/bitcoin#33308: doc: fix LIBRARY_PATH comment
a2a35b58cb doc: fix LIBRARY_PATH comment (fanquake)

Pull request description:

  Now that we build capnp, qt isn't the only native package.

ACKs for top commit:
  l0rinc:
    code review ACK a2a35b58cb
  willcl-ark:
    ACK a2a35b58cb

Tree-SHA512: 7b4a54b53b4c673e31dea011e569c6ef9e7238a56a7f09c7f5a7bc521fb0ffdda3794f2b65764908005333a30f7c8c7b4d6b45d985bc92a70dc2daf8c3d1ff3d
2025-09-08 14:31:15 +01:00
fanquake
a2a35b58cb doc: fix LIBRARY_PATH comment
Now that we build capnp, qt isn't the only native package.
2025-09-04 17:30:11 +01:00
fanquake
8e434a8499 macdeploy: rename macOS output to bitcoin-macos-app.zip
We were naming this "Bitcoin-Core.zip", just to immediately rename it.
Similar to what we do with Windows, i.e `bitcoin-win64-setup.exe`.
2025-09-03 13:00:38 +01:00
fanquake
05353d9cf0 macdeploy: combine appname & -zip arguments
appname is only used by -zip.
2025-09-03 13:00:35 +01:00
fanquake
939678940f contrib: update fixed seeds 2025-09-03 11:23:30 +01:00
fanquake
6cdd8ee676 contrib: update makeseeds minblocks 2025-09-03 11:23:30 +01:00
fanquake
b8da9f4034 contrib: update makeseeds UA regex 2025-09-03 11:23:30 +01:00
fanquake
943de66b50 kernel: update headersync params 2025-09-02 11:59:48 +01:00
fanquake
decc3671c8 guix: remove libxcb-xinerama.so.0 from allowed libs 2025-08-20 23:04:20 +01:00
Antoine Poinsot
b3f781a0ef contrib: adapt max reject string size in tracing demo
The Script errors were last touched in 2020. This value was calculated after that
in 2022 (commit 4b7aec2951). The previous commit
made the size of the largest reject reason string 4 characters smaller ("mandatory"
became "block"), so adapt the constant.
2025-08-13 11:06:01 -04:00
Antoine Poinsot
9a04635432 scripted-diff: validation: rename mandatory errors into block errors
Using "block" or "mempool" as the prefix in place of "mandatory" or "non-mandatory" is clearer
to a user. "non-mandatory" was renamed into "mempool" as part of #33050. This takes care of the
other half of this renaming as a scripted diff.

-BEGIN VERIFY SCRIPT-
sed -i 's/mandatory-script-verify/block-script-verify/g' $(git grep -l mandatory-script-verify)
-END VERIFY SCRIPT-
2025-08-13 11:05:54 -04:00
fanquake
776a163374 guix: increase maximum allowed (runtime) GCC to 7
Fixes:
```bash
/distsrc-base/distsrc-d3b8a54a8120-x86_64-linux-gnu/build/bin/bitcoind: symbol __divmodti4 from unsupported version GCC_7.0.0(14)
/distsrc-base/distsrc-d3b8a54a8120-x86_64-linux-gnu/build/bin/bitcoind: failed IMPORTED_SYMBOLS
```

which is occuring after #32750. I can't see any supported distro that is
shipping a new enough glibc (2.31), but a GCC older than 7.0.
2025-08-12 14:45:03 +01:00
fanquake
4bff4ce561 contrib: drop bitcoin-util exception from FORTIFY check
It's got memcpy_chk.
2025-08-08 08:47:44 +01:00
merge-script
2bb06bcaf2 Merge bitcoin/bitcoin#31679: cmake: Install internal binaries to <prefix>/libexec/
f49840dd90 doc: Fix typo in files.md (Ryan Ofsky)
f5cf0b1ccc bitcoin wrapper: improve help output (Ryan Ofsky)
c810b168b8 doc: Add description of installed files to files.md (Ryan Ofsky)
94ffd01a02 doc: Add release notes describing libexec/ binaries (Ryan Ofsky)
cd97905ebc cmake: Move internal binaries from bin/ to libexec/ (Ryan Ofsky)

Pull request description:

  This change moves binaries that are not typically invoked directly by users from the `bin/` directory to the `libexec/` directory in CMake installs and binary releases. The goal of the PR is to introduce a distinction between internal and external binaries so starting with #31802, we can use IPC to implement features in new binaries without adding those binaries to the CLI. The change also helps reduce clutter in `bin/`, making it easier for users to identify useful tools to run. Summary of changes:

  - For **source builds** (i.e. developer builds) — There are no changes.
  - For **source installs** (i.e. `cmake --install` result) — `test_bitcoin`, `test_bitcoin-qt`, and `bench_bitcoin` are installed in `${CMAKE_PREFIX_PATH}/libexec` instead of `${CMAKE_PREFIX_PATH}/bin`, so they are no longer on the system `PATH`. However, they can still be invoked from the `libexec/` directory, or from the CLI as `bitcoin test`, `bitcoin test-gui`, and `bitcoin bench`, respectively.
  - For **binary releases** — Since `test_bitcoin` is the only test binary enabled in releases, the only change is moving `test_bitcoin` from `bin/` to `libexec/`.

  <details><summary>Details</summary>
  <p>

   The table below shows the install location of each binary after this change, and the availability of each binary.

  | Binary               | Location     | Availability         | Change                        |
  |----------------------|--------------|----------------------|-------------------------------|
  | `bitcoin`            | `bin/`       | 📦 Binary release (since #31375) | Unchanged                     |
  | `bitcoin-cli`        | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bitcoind`           | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bitcoin-qt`         | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bitcoin-tx`         | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bitcoin-util`       | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bitcoin-wallet`     | `bin/`       | 📦 Binary release     | Unchanged                     |
  | `bench_bitcoin`      | `libexec/`   | 🛠 Source build only  | Moved from `bin/`             |
  | `bitcoin-chainstate` | `libexec/`   | 🛠 Source build only  | Newly installed (was built)   |
  | `bitcoin-gui`        | `libexec/`   | 🛠 Source build only (until #31802) | Moved from `bin/`             |
  | `bitcoin-node`       | `libexec/`   | 🛠 Source build only (until #31802) | Moved from `bin/`             |
  | `test_bitcoin`       | `libexec/`    | 📦 Binary release     | Moved from `bin/`             |
  | `test_bitcoin-qt`    | `libexec/`   | 🛠 Source build only  | Moved from `bin/`             |

  </p>
  </details>

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).

ACKs for top commit:
  l0rinc:
    re-ACK f49840dd90
  Sjors:
    re-ACK f49840dd90
  achow101:
    ACK f49840dd90
  janb84:
    re ACK f49840dd90
  BrandonOdiwuor:
    Tested ACK f49840dd90
  hodlinator:
    re-ACK f49840dd90
  willcl-ark:
    utACK f49840dd90

Tree-SHA512: 858a2e1a53db11ee3c5c759bfdeea566f242b9ce5e8a898fa435222e41662b8184577c0dc2c4c058294b4de41d8cb3ba3e5d24c748c280efa4a3f84e3ec4344d
2025-08-07 14:53:26 +01:00
Florian Schmaus
18d1071dd1 init: replace deprecated PermissionsStartOnly systemd directive
PermissionsStartOnly is deprecated [1]. This removes the directives
and instead we prefixes the value of the ExecStartPre directive with
'!', which means the executable, 'chgrp' in this case, is run with
full privileges and able to change the group of /etc/bitcoin.

1: 60b45a80c1/NEWS (L2434)
2025-08-01 14:41:07 +01:00
Florian Schmaus
1caaf65043 init: remove Group= as it will default to the user's default group
Setting Group=bitcoin is redundant. It is typically the default group
of the user and if not explicitly specified, systemd will run the
service with the default group of the user.
2025-08-01 14:40:52 +01:00
merge-script
932e993b37 Merge bitcoin/bitcoin#33073: guix: warn SOURCE_DATE_EPOCH set in guix-codesign
1bed0f734b guix: warn SOURCE_DATE_EPOCH set in guix-codesign (will)

Pull request description:

  #32678 added a sanity check for this environment variable when running `guix-build` but missed that `guix-codesign` also relies on `SOURCE_DATE_EPOCH`, which can result in non-determinism in the codesigning step: https://github.com/bitcoin-core/guix.sigs/pull/1720#issuecomment-3124332676

  To avoid repeating the logic move common functionality into the prelude and call the function in both guix actions.

ACKs for top commit:
  fanquake:
    ACK 1bed0f734b

Tree-SHA512: ad3de8ab06e7f4ffcee5c02e8185b20879d63a02a614a706ea54da5087cca4ba75817ca1aa95301572c34723317fcc44e4478261ac73dd223ee9fa827e6b35b3
2025-07-29 16:33:52 +01:00
deadmanoz
0ce041ea88 tracing: fix pointer argument handling in mempool_monitor.py
The BPF code was incorrectly passing pointer variables by value to
bpf_usdt_readarg(), causing the function to fail silently and resulting
in transaction hashes and reason strings displaying as zeros or garbage.

This fix adds the missing reference operator (&) when passing pointer
variables to bpf_usdt_readarg(), allowing the function to properly
write the pointer values and enabling correct display of transaction
hashes and removal/rejection reasons.

Fixes the regression introduced in ec47ba349d where bpf_usdt_readarg_p
was replaced with bpf_usdt_readarg but the calling convention wasn't
properly updated for pointer arguments.
2025-07-29 08:24:47 +00:00
will
1bed0f734b guix: warn SOURCE_DATE_EPOCH set in guix-codesign
Currently there is a warning for this in guix-build, but we also need
one in guix-codesign, otherwise the codesigned hashes are not
reproducible.

Move common functionality into prelude and call the function in both
guix actions.
2025-07-27 21:51:39 +01:00
nervana21
b59dc21847 doc: Fix typos in asmap README 2025-07-24 01:24:42 -04:00
Sebastian Falbesoner
2118301d77 test: rename CBlockHeader .hash -> .hash_hex for consistency
Note that we unfortunately can't use a scripted diff here, as the
`.hash` symbol is also used for other instances (e.g. CInv).
2025-07-17 12:45:35 +02:00
Sebastian Falbesoner
8b09cc350a test: remove bare CBlockHeader .rehash()/.calc_sha256() calls
Since the previous commit, CBlockHeader/CBlock 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-07-17 11:59:09 +02:00
fanquake
7b420ca834 guix: configure with -Werror=dev 2025-07-11 13:59:29 +01:00
leopardracer
6bb38bf37f Update p2p_monitor.py 2025-06-26 13:06:14 +03:00
David Gumberg
3473986fe1 contrib: tracing: Correctly read msg type in p2p_monitor.py 2025-06-18 11:35:06 -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
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
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
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
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
will
5c4a0f8009 guix: warn and abort when SOURCE_DATE_EPOCH is set
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.
2025-06-04 12:24:08 +01:00
fanquake
e50312eab0 doc: fix typos
Co-authored-by: Ragnar <rodiondenmark@gmail.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
2025-06-03 08:09:28 +01:00
Ava Chow
2d819fa4df Merge bitcoin/bitcoin#29032: signet: omit commitment for some trivial challenges
6ee32aaaca test: signet tool genpsbt and solvepsbt commands (Sjors Provoost)
0a99d99fe4 signet: miner skips PSBT step for OP_TRUE (Sjors Provoost)
cdfb70e5a6 signet: split decode_psbt miner helper (Sjors Provoost)

Pull request description:

  [BIP325](https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki) mentions the following rule:

  > In the special case where an empty solution is valid (ie scriptSig and scriptWitness are both empty) this additional commitment can optionally be left out. This special case is to allow non-signet-aware block generation code to be used to test a custom signet chain where the challenge is trivially true.

  Such a signet can be created using e.g. `-signetchallenge=51` (`OP_TRUE`). However `contrib/signet/miner` won't omit the commitment.

  This PR improves the miner by skipping the PSBT for known trivial scripts (just `OP_TRUE` and trivial pushes for now). This prevents it from appending the 4 byte signet header to the witness commitment, as allowed by the above rule.

  ---

  Previously the script would fail with `PSBT signing failed`, making it difficult to mine. This is no longer the case.

ACKs for top commit:
  achow101:
    ACK 6ee32aaaca
  theStack:
    re-ACK 6ee32aaaca
  danielabrozzoni:
    ACK 6ee32aaaca

Tree-SHA512: e47fbf471f2909286a6c1c073799ea388b9c19551afcce96cf9af45cc48d25c02f1e48e08861a88b604361e2c107a759d5baf393da8a37360de419f31651758a
2025-06-02 15:24:34 -07:00
Ryan Ofsky
cd97905ebc cmake: Move internal binaries from bin/ to libexec/
This change moves binaries that are not typically invoked directly by users
from the `bin/` directory to the `libexec/` directory in CMake installs and
binary releases. The goal is to simplify the contents of `bin/` for end users
while still making all binaries available when needed. After this change, the
binaries remaining in `bin/` are:

- bitcoin
- bitcoin-cli
- bitcoind
- bitcoin-qt
- bitcoin-tx
- bitcoin-util
- bitcoin-wallet

And the binaries that are moved to `libexec/` are:

- bench_bitcoin
- bitcoin-chainstate(*)
- bitcoin-gui(***)
- bitcoin-node(***)
- test_bitcoin(**)
- test_bitcoin-qt

(*) bitcoin-chainstate was previously missing an install rule and was actually
not installed even when it was enabled.

(**) test_bitcoin is the only libexec/ binary that is currently included in
bitcoin binary releases. The others are only installed when building from
source with relevant cmake options enabled.

(***) bitcoin-node and bitcoin-gui are not currently built by default or
included in binary releases but both of these changes are planned and
implemented in #31802
2025-05-29 07:51:08 -05:00
Ava Chow
012f347685 Merge bitcoin/bitcoin#31375: multiprocess: Add bitcoin wrapper executable
a5ac43d98d doc: Add release notes describing bitcoin wrapper executable (Ryan Ofsky)
258bda80c0 doc: Mention bitcoin wrapper executable in documentation (Ryan Ofsky)
d2739d75c9 build: add bitcoin.exe to windows installer (Sjors Provoost)
ba649c0006 ci: Run multiprocess tests through wrapper executable (Ryan Ofsky)
29bdd743bb test: Support BITCOIN_CMD environment variable (Ryan Ofsky)
9c8c68891b multiprocess: Add bitcoin wrapper executable (Ryan Ofsky)
5076d20fdb util: Add cross-platform ExecVp and GetExePath functions (Ryan Ofsky)

Pull request description:

  Intended to make bitcoin command line features more discoverable and allow installing new multiprocess binaries in libexec/ instead of bin/ so they don't cause confusion.

  Idea and implementation of this were discussed in https://github.com/bitcoin/bitcoin/issues/30983.

  ---

  Initial implementation of this feature is deliberately minimal so the UX can evolve in response to feedback and there are not too many details to debate and discuss in a single PR. But many improvements are possible or planned:

  - Adding manpage and bash completions.
  - Showing nicer error messages that detect if an executable isn't installed and suggest how to fix [(comment)](https://github.com/bitcoin/bitcoin/pull/31375#discussion_r2073194474)
  - Showing wrapper command lines in subcommand in help output [(comment)](https://github.com/bitcoin/bitcoin/pull/31375#discussion_r2077800405). This could be done conditionally as suggested in the comment or be unconditional.
  - Showing wrapper command lines in subcommand error output. There is a bitcoin-cli error pointed out in [(comment)](https://github.com/bitcoin/bitcoin/pull/31375#discussion_r2091152243) that is needlessly confusing.
  - Integrating help so `bitcoin help subcommand` invokes `bitcoin subcommand -h`. `bitcoin -h subcommand` should also be supported and be equivalent [(comment)](https://github.com/bitcoin/bitcoin/pull/31375#discussion_r2093116725)
  - Adding support for `bitcoin-util` subcommands. Ideal interface would probably be more like `bitcoin grind` not `bitcoin util grind` but this has been punted for now. Supporting subcommands directly would require some ArgsManager modifications
  - Adding a dedicated python functional test for the wrapper. Right now there is some CI coverage by setting the `BITCOIN_CMD` variable, but this doesn't cover things like the help output and version output, and support for different directory layouts.
  - Better `--multiprocess` (`-m`) / `--monolithic` (`-M`) default selection. Right now, default is monolithic but it probably makes sense to chose more intelligently depending on whether -ipc options are enabled and what binaries are available.
  - Maybe parsing `bitcoin.conf` and supporting options to control wrapper behavior like custom locations or preferences or aliases.
  - Better command command line usability. Allow combining short options like (`-ah`). Allow fuzzy matching of subcommands or suggestions if you misspell. (suggested by stickies in review club)
  - Not directly related to this PR but `bitcoin-cli named` implementation used by the wrapper should do a better job disambiguating named arguments from base64 arguments ending in = as pointed out in [(comment)](https://github.com/bitcoin/bitcoin/pull/31375#discussion_r2091886628)

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722). A review club meeting for it took place in https://bitcoincore.reviews/31375

ACKs for top commit:
  Sjors:
    utACK a5ac43d98d
  achow101:
    ACK a5ac43d98d
  vasild:
    ACK a5ac43d98d
  theStack:
    ACK a5ac43d98d
  ismaelsadeeq:
    fwiw my last review implied an ACK a5ac43d98d
  hodlinator:
    ACK a5ac43d98d

Tree-SHA512: 570e6a4ff8bd79ef6554da3d01f36c0a7c6d2dd7dace8f8732eca98f4a8bc2284474a9beadeba783114fe2f3dd08b2041b3da7753bae0b7f881ec50668cb821f
2025-05-27 12:38:19 -07:00
fanquake
c8d9baae94 guix: accomodate migration to codeberg
See https://guix.gnu.org/blog/2025/migrating-to-codeberg/.

When interacting with the old repo you may now also see:
```bash
warning: redirecting to https://codeberg.org/guix/guix/
```
2025-05-27 11:34:03 +01:00
merge-script
35bf3f8839 Merge bitcoin/bitcoin#32400: random: Use modern Windows randomness functions
6b4bcc1623 random: Use modern Windows randomness functions (David Gumberg)

Pull request description:

  This change resolves #32391 and is a follow-up to #14089.

  The old randomness API has been deprecated and will be removed at some point according to Microsoft.[^1] This PR removes all uses of that API from Bitcoin Core code, but the deprecated API is still invoked in Bitcoin Core binaries compiled after this PR because of upstream use, see this comment: https://github.com/bitcoin/bitcoin/pull/32400#issuecomment-2846972614.

  For reference on `BCryptGenRandom`, see: https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom.

  [`STATUS_SUCCESS`](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55) gets defined here since including `ntstatus.h` is [more trouble](70f149b9a1/examples/examples_util.h (L19-L28)) than it's worth.

  [^1]: https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontextw & https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom

ACKs for top commit:
  laanwj:
    re-ACK 6b4bcc1623
  fanquake:
    ACK 6b4bcc1623

Tree-SHA512: ddd9093669dfd6ff0eee7e5e6a9c7dce798d03dd9a81dcc2e668e9b84779b7adab3105a7f0c8038e54accf28f19fe211628e13b3fc2200caa5b423f766725e37
2025-05-22 12:12:57 +01:00
fanquake
f667000c83 contrib: remove outdated entries from copyright_header.py 2025-05-20 09:30:41 +01:00
fanquake
6854497b47 contrib: remove GPL-3+ from debian/copyright
This is unused.
2025-05-20 09:30:41 +01:00
Sjors Provoost
0a99d99fe4 signet: miner skips PSBT step for OP_TRUE 2025-05-19 09:45:35 +02:00
Sjors Provoost
cdfb70e5a6 signet: split decode_psbt miner helper 2025-05-19 09:40:41 +02:00