Skip to content

Add bitcoin-{node,gui} to release binaries for IPC #31802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Feb 5, 2025

Have depends make libmultiprocess by default. This PR causes the following behavior changes:

  1. bitcoin-node and bitcoin-gui binaries are included in releases, due to ENABLE_IPC option being switched on by default in depends builds
  2. ENABLE_IPC is also switched on by default in non-depends builds
  3. Various changes to CI: switching on ENABLE_IPC on in most configurations and using bitcoin-node binary for functional tests in two of them.
  4. The bitcoin-node and bitcoin-gui are added to Maintenance.cmake (since they're now in the release)
  5. macOS and Linux installation instructions are updated to install capnp by default

This PR doesn't need to do all of 3 things at once. However it's is simpler, avoids code churn (especially in CI), and probably less confusing to make all these changes in the same PR.

Windows and OpenBSD are not supported yet, the latter due to a fairly trivial upstream issue. Therefore for those platforms ENABLE_IPC is off by default.

The initial main use case for IPC is to enable experimental support for the Mining IPC interface. A working example of a Stratum v2 Template Provider client using this interface can be found here: Sjors#48.

See #31756 for discussion of when this should happen. Supersedes #30975.

Guix hashes:

...

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 5, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31802.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK TheCharlatan
Stale ACK ryanofsky

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #32586 (ci: Downgrade DEBUG=1 to -D_GLIBCXX_ASSERTIONS in centos task by maflcko)
  • #32262 (build: Restore cross-compilation for Android by hebasto)
  • #32162 (depends: Switch from multilib to platform-specific toolchains by hebasto)
  • #31375 (multiprocess: Add bitcoin wrapper executable by ryanofsky)
  • #31349 (ci: detect outbound internet traffic generated while running tests by vasild)
  • #30595 (kernel: Introduce initial C header API by TheCharlatan)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

| [Cap'n Proto](../depends/packages/capnp.mk) | [link](https://capnproto.org) | [0.6.1](https://capnproto.org/install.html) | 0.5.3 | -> The table header and separator require an additional column | to match this row's 4 columns [Markdown table formatting error breaking layout].

@sipa
Copy link
Member

sipa commented Feb 7, 2025

Some chatter from IRC:

17:21:41 < darosior> It might be confusing to release both a bitcoin-wallet utility and a bitcoin-wallet binary as part of multiprocess?
17:24:08 < darosior> We could rename the utility, but then it would be nice to at least have one deprecation cycle. Given recent momentum i estimate it's possible we might release multiprocess in 
                     30.0, which means if we want to deprecate the bitcoin-wallet utility name we should do it.. now?
17:33:31 < sipa> bitcoin-wallet-util ?
...
23:38:57 < _aj_> darosior: bitcoin-wallet-process, bitcoin-gui-process, etc? it's multi *-process!
03:04:34 < Sjors[m]> darosior: at the moment there is no wallet binary if were to enable multiprocess. That won't happen until #19460.
...
03:05:18 < Sjors[m]> Or maybe already in #10102
...
03:05:50 < Sjors[m]> In any case #31802 only adds bitcoin-node and bitcoin-gui.
...
03:07:19 < Sjors[m]> Though if we want to rename the utility eventually, it's always better to do it early.

@Sjors
Copy link
Member Author

Sjors commented Feb 8, 2025

@sipa I opened #31827

onlinesipahimithu

This comment was marked as spam.

@Sjors Sjors force-pushed the 2025/02/ipc-yea branch from 8b73630 to 5032cac Compare May 7, 2025 14:52
ryanofsky added a commit to ryanofsky/libmultiprocess that referenced this pull request May 12, 2025
Reported by Sjors Provoost <[email protected]>
bitcoin/bitcoin#31802 (comment)

/ci_container_base/include/mp/proxy-io.h:252:16: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/proxy-io.h:336:18: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/util.h:186:12: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
https://cirrus-ci.com/task/6187773452877824?logs=ci#L4712
@ryanofsky
Copy link
Contributor

re: Sjors #31802 (comment)

@ryanofsky CI complains about std::move in libmultiprocess: https://cirrus-ci.com/task/6187773452877824, e.g.:

Thanks for catching this. I implemented a fix for that error and the other errors in bitcoin-core/libmultiprocess#172

If you wanted to test the fix here you could do:

git fetch https://github.com/bitcoin-core/libmultiprocess 8d8e9f65f1d9faaafe91ca90910c1f96da9d094d
git subtree merge --prefix=src/ipc/libmultiprocess --squash 8d8e9f65f1d9faaafe91ca90910c1f96da9d094d

I'll also try to open a subtree update PR in the next week or so that this PR could be rebased on.

@Sjors Sjors force-pushed the 2025/02/ipc-yea branch from 5032cac to 27956b3 Compare May 13, 2025 09:03
@Sjors
Copy link
Member Author

Sjors commented May 13, 2025

@ryanofsky I added your libmultiprocess patch (and rebased).

Sjors and others added 6 commits May 15, 2025 18:48
This causes IPC binaries (bitcoin-node, bitcoin-gui) to be included
in releases.

The effect on CI is that this causes more depends builds to build IPC
binaries, but still the only build running functional tests with them
is the i686_multiprocess one.

Except for Windows and OpenBSD.
The bitcoin-node binary is built on all platforms which have
multiprocess enabled, but for functional tests it's only used in
CentOS native (depends) job. The next commit will also add a
non-depends job.
Install capnp on non-depends CI jobs.

Use the bitcoin-node binary in the macOS native non-depends job.

Co-authored-by: Ryan Ofsky <[email protected]>
@Sjors Sjors force-pushed the 2025/02/ipc-yea branch from 27956b3 to 7163d44 Compare May 15, 2025 16:51
@Sjors
Copy link
Member Author

Sjors commented May 15, 2025

Rebased after #31895. Also marking draft given the dependency on bitcoin-core/libmultiprocess#172.

@Sjors Sjors marked this pull request as draft May 15, 2025 16:53
ryanofsky added a commit to ryanofsky/libmultiprocess that referenced this pull request May 15, 2025
Reported by Sjors Provoost <[email protected]>
bitcoin/bitcoin#31802 (comment)

/ci_container_base/include/mp/proxy-io.h:252:16: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/proxy-io.h:336:18: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/util.h:186:12: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
https://cirrus-ci.com/task/6187773452877824?logs=ci#L4712
ryanofsky added a commit to ryanofsky/libmultiprocess that referenced this pull request May 15, 2025
Reported by Sjors Provoost <[email protected]>
bitcoin/bitcoin#31802 (comment)

/ci_container_base/include/mp/proxy-io.h:252:16: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/proxy-io.h:336:18: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
/ci_container_base/include/mp/util.h:186:12: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
https://cirrus-ci.com/task/6187773452877824?logs=ci#L4712
Sjors added 2 commits May 16, 2025 09:31
a5bff37ad8 clang-tidy: Suppress bitcoin-nontrivial-threadlocal error
e922bb8f6a clang-tidy: Fix bugprone-move-forwarding-reference error
c1e8c1a028 clang-tidy: Fix bugprone-move-forwarding-reference errors
0d8012f656 Merge bitcoin-core/libmultiprocess#165: clang-tidy: fix warnings introduced in version 19
aa19285303 use ranges transform
a78137ca73 make member function const
ca3226ec8a replace custom tuple unpacking code with `std::apply`
949fe85fc9 replace SFINAE trick with `if constexpr`

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: a5bff37ad8f5630a738eb1b0bfa60cf01bedbcdf
@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants