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

pull Sjors wants to merge 6 commits into bitcoin:master from Sjors:2025/02/ipc-yea changing 20 files +36 −33
  1. Sjors commented at 4:04 pm on February 5, 2025: member

    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 (bitcoin -m) 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 is not supported yet, so ENABLE_IPC is off by default for it. It can be enabled after #32387.

    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: https://github.com/Sjors/bitcoin/pull/48.

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

    Guix hashes:

     0a33e468f7c89cc00a57d229845f37c44581d83ea3d9a22367c0a7943c2a640f0  guix-build-5a66729744db/output/aarch64-linux-gnu/SHA256SUMS.part
     1fe9092dfea69183e79ec0010c0a7021de14f2c5fca3be9090944712d3d98e94a  guix-build-5a66729744db/output/aarch64-linux-gnu/bitcoin-5a66729744db-aarch64-linux-gnu-debug.tar.gz
     2974acac87a4713f0be6f6e6c217ded130c4710b7f2806eaddc6c9fd465b98164  guix-build-5a66729744db/output/aarch64-linux-gnu/bitcoin-5a66729744db-aarch64-linux-gnu.tar.gz
     3369e26f4bcebb9de816c7762c205fcaa8dfb17640860077cb17a862076f63d08  guix-build-5a66729744db/output/arm-linux-gnueabihf/SHA256SUMS.part
     4f625a8765462826e87863f0f00193b39abb5e29354821881adac61b58e3c2d8b  guix-build-5a66729744db/output/arm-linux-gnueabihf/bitcoin-5a66729744db-arm-linux-gnueabihf-debug.tar.gz
     58a0b50e0d126393145bdeba3b2593945fad8eefd6ca1281f033eafd42e702be6  guix-build-5a66729744db/output/arm-linux-gnueabihf/bitcoin-5a66729744db-arm-linux-gnueabihf.tar.gz
     697c1f39a430e1b1246ff750e7f773608241af6cdad2552d50773aecdf056f61e  guix-build-5a66729744db/output/arm64-apple-darwin/SHA256SUMS.part
     7fb425c62edab2164d5d7163f357f3f83a4caa3cc1d45a22882ff62b9b90ed3ed  guix-build-5a66729744db/output/arm64-apple-darwin/bitcoin-5a66729744db-arm64-apple-darwin-codesigning.tar.gz
     8115eb7adf41b3ac821f225978eeb2e1574d9151ff3cb3a287705b53ec5d6b6fd  guix-build-5a66729744db/output/arm64-apple-darwin/bitcoin-5a66729744db-arm64-apple-darwin-unsigned.tar.gz
     9e348c1caa8fcc6dd26a995524c88ddcaed110f7ded8c35197503113e9b4bbce0  guix-build-5a66729744db/output/arm64-apple-darwin/bitcoin-5a66729744db-arm64-apple-darwin-unsigned.zip
    10feb5585be5745340828a6379c9b2df0d3e0161359c827e8b2f1528d8c8d23653  guix-build-5a66729744db/output/dist-archive/bitcoin-5a66729744db.tar.gz
    11a5a129621e694a840e866c3b76a619461c005eb2d1b2474989716033e7e0ad63  guix-build-5a66729744db/output/powerpc64-linux-gnu/SHA256SUMS.part
    1276a02bebc7f6e557c34edde405ca98366a4dd8de528b9521300b710b619d29e2  guix-build-5a66729744db/output/powerpc64-linux-gnu/bitcoin-5a66729744db-powerpc64-linux-gnu-debug.tar.gz
    132c8207ad97bf2c794659b58f85235454d9b6c4fe472ea0039cea4c6960bb851a  guix-build-5a66729744db/output/powerpc64-linux-gnu/bitcoin-5a66729744db-powerpc64-linux-gnu.tar.gz
    140cc31c02fee219cb3cdd6945928ae9ca18909a64732004f73bca564b70f1ac8d  guix-build-5a66729744db/output/riscv64-linux-gnu/SHA256SUMS.part
    158943b074f312e00ede3eeaa6e38e4d203bd85ee48a6a3c2f88b51a130de1aee5  guix-build-5a66729744db/output/riscv64-linux-gnu/bitcoin-5a66729744db-riscv64-linux-gnu-debug.tar.gz
    16a4d8142fd5a2b39f414d426832bf06d110ac310f340c01f7c141fb22ca1f7019  guix-build-5a66729744db/output/riscv64-linux-gnu/bitcoin-5a66729744db-riscv64-linux-gnu.tar.gz
    17a566b2e272f2795a8e853c83ceb2f570c544b504fe404f001d9185550a0267a4  guix-build-5a66729744db/output/x86_64-apple-darwin/SHA256SUMS.part
    18e2efcc3f4d241c62bc87a67b938e9e95aea2d53905911abd544ad2e505d140f7  guix-build-5a66729744db/output/x86_64-apple-darwin/bitcoin-5a66729744db-x86_64-apple-darwin-codesigning.tar.gz
    194c7f988105562ccff1f57f1857561c87807a6ee3fa101c058392fe62a3416ee2  guix-build-5a66729744db/output/x86_64-apple-darwin/bitcoin-5a66729744db-x86_64-apple-darwin-unsigned.tar.gz
    20d4c08e7767f7916370c3e97baef28ef82462a039760391c60202605ff1dd9442  guix-build-5a66729744db/output/x86_64-apple-darwin/bitcoin-5a66729744db-x86_64-apple-darwin-unsigned.zip
    21f1fcb6cc6396a3992c544d450982988c3cfbadaa28c3e73a4bfe295b64e49a9e  guix-build-5a66729744db/output/x86_64-linux-gnu/SHA256SUMS.part
    2217614a25c9b6eeeec90451e30fee3d6d1c44b4375d397d038ae0042eca859188  guix-build-5a66729744db/output/x86_64-linux-gnu/bitcoin-5a66729744db-x86_64-linux-gnu-debug.tar.gz
    230b1fdcaab302e8179f5f0aa41a6e32ec5a999b30ed22cd941e6900611f5b9cab  guix-build-5a66729744db/output/x86_64-linux-gnu/bitcoin-5a66729744db-x86_64-linux-gnu.tar.gz
    24d0b09c23c85d9cf285952fff624abbd6fe74412f5ff4cc13e008516ed5845ea2  guix-build-5a66729744db/output/x86_64-w64-mingw32/SHA256SUMS.part
    251b158b31a3b66a4e18320afb71717bb1e0ebc2e3df32d377afd3340a60f8f401  guix-build-5a66729744db/output/x86_64-w64-mingw32/bitcoin-5a66729744db-win64-codesigning.tar.gz
    26f6ab26042033d39bbbc9220f7ca5daf270a30e34db4a515ed2e64d87c4909cf5  guix-build-5a66729744db/output/x86_64-w64-mingw32/bitcoin-5a66729744db-win64-debug.zip
    27c1f0a9ac8fecc8cc81e20a05fd60bb9c3fe8880e6e0f64f78aca2f77256b9273  guix-build-5a66729744db/output/x86_64-w64-mingw32/bitcoin-5a66729744db-win64-setup-unsigned.exe
    28fd6677989199ddeb066bb09ac19919ae9509808e1248a314abc85f06060f6621  guix-build-5a66729744db/output/x86_64-w64-mingw32/bitcoin-5a66729744db-win64-unsigned.zip
    
  2. DrahtBot commented at 4:04 pm on February 5, 2025: contributor

    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
    ACK ryanofsky, vasild
    Concept ACK TheCharlatan

    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:

    • #32262 (build: Restore cross-compilation for Android by hebasto)
    • #32162 (depends: Switch from multilib to platform-specific toolchains by hebasto)
    • #31349 (ci: detect outbound internet traffic generated while running tests by vasild)

    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.

  3. DrahtBot added the label Needs rebase on Feb 6, 2025
  4. Sjors force-pushed on Feb 7, 2025
  5. Sjors force-pushed on Feb 7, 2025
  6. sipa commented at 9:03 pm on February 7, 2025: member

    Some chatter from IRC:

     017:21:41 < darosior> It might be confusing to release both a bitcoin-wallet utility and a bitcoin-wallet binary as part of multiprocess?
     117: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 
     2                     30.0, which means if we want to deprecate the bitcoin-wallet utility name we should do it.. now?
     317:33:31 < sipa> bitcoin-wallet-util ?
     4...
     523:38:57 < _aj_> darosior: bitcoin-wallet-process, bitcoin-gui-process, etc? it's multi *-process!
     603:04:34 < Sjors[m]> darosior: at the moment there is no wallet binary if were to enable multiprocess. That won't happen until [#19460](/bitcoin-bitcoin/19460/).
     7...
     803:05:18 < Sjors[m]> Or maybe already in [#10102](/bitcoin-bitcoin/10102/)
     9...
    1003:05:50 < Sjors[m]> In any case [#31802](/bitcoin-bitcoin/31802/) only adds bitcoin-node and bitcoin-gui.
    11...
    1203:07:19 < Sjors[m]> Though if we want to rename the utility eventually, it's always better to do it early.
    
  7. Sjors commented at 10:58 am on February 8, 2025: member
    @sipa I opened #31827
  8. onlinesipahimithu commented at 1:26 am on February 9, 2025: none
    GOOD lesson from
  9. bitcoin deleted a comment on Feb 9, 2025
  10. Sjors force-pushed on Feb 10, 2025
  11. Sjors force-pushed on Feb 13, 2025
  12. DrahtBot removed the label Needs rebase on Feb 13, 2025
  13. Sjors force-pushed on Feb 17, 2025
  14. Sjors force-pushed on Feb 17, 2025
  15. DrahtBot added the label Needs rebase on Feb 20, 2025
  16. ryanofsky referenced this in commit 83e40d3b52 on Feb 24, 2025
  17. ryanofsky referenced this in commit 8619f03ec2 on Feb 24, 2025
  18. ryanofsky referenced this in commit cbb7b41c20 on Feb 24, 2025
  19. fanquake referenced this in commit 01f7715766 on Feb 25, 2025
  20. fanquake referenced this in commit ba0a4391ff on Feb 25, 2025
  21. pablomartin4btc referenced this in commit bd2453d134 on Feb 26, 2025
  22. pablomartin4btc referenced this in commit 75d5d235a6 on Feb 26, 2025
  23. Sjors force-pushed on Feb 27, 2025
  24. DrahtBot removed the label Needs rebase on Feb 27, 2025
  25. ngn999 referenced this in commit fd12bfb763 on Feb 27, 2025
  26. DrahtBot added the label Needs rebase on Mar 5, 2025
  27. Sjors force-pushed on Mar 11, 2025
  28. DrahtBot removed the label Needs rebase on Mar 11, 2025
  29. DrahtBot added the label Needs rebase on Mar 12, 2025
  30. Sjors force-pushed on Mar 12, 2025
  31. DrahtBot removed the label Needs rebase on Mar 12, 2025
  32. DrahtBot added the label Needs rebase on Mar 14, 2025
  33. Sjors force-pushed on Mar 17, 2025
  34. DrahtBot removed the label Needs rebase on Mar 17, 2025
  35. DrahtBot added the label Needs rebase on Mar 18, 2025
  36. Sjors force-pushed on Mar 18, 2025
  37. DrahtBot removed the label Needs rebase on Mar 18, 2025
  38. DrahtBot added the label Needs rebase on Mar 29, 2025
  39. Sjors force-pushed on Mar 31, 2025
  40. DrahtBot removed the label Needs rebase on Mar 31, 2025
  41. Sjors force-pushed on Mar 31, 2025
  42. DrahtBot added the label Needs rebase on Apr 2, 2025
  43. Sjors force-pushed on Apr 2, 2025
  44. DrahtBot removed the label Needs rebase on Apr 2, 2025
  45. DrahtBot added the label Needs rebase on Apr 4, 2025
  46. Sjors commented at 4:32 pm on April 10, 2025: member
    As discussed in IRC, I’ll turn on IPC in the default cmake build (not just the dev preset). Either here on in the previous PR.
  47. ryanofsky commented at 5:53 pm on April 10, 2025: contributor

    As discussed in IRC, I’ll turn on IPC in the default cmake build (not just the dev preset). Either here on in the previous PR.

    In case it helps I actually have an old commit implementing this: a6d9db48249d5d9bd63ea0d99e15066a1299e5c3 (branch) since I was originally thinking of including it in #31741

  48. Sjors force-pushed on Apr 11, 2025
  49. DrahtBot removed the label Needs rebase on Apr 11, 2025
  50. Sjors marked this as ready for review on Apr 11, 2025
  51. Sjors commented at 7:32 pm on April 11, 2025: member
    Marked this as ready for review, but see discussion here: #30975 (comment)
  52. ryanofsky commented at 8:49 pm on April 11, 2025: contributor

    Code review 1ed02d5bf4a4bcf58cad0addaaaf9c171e29d8c6

    • It seems like there are some MULTIPROCESS=1 settings added earlier in this PR that are not removed later and become ignored, so these would be good to clean up
    • It could be good to simplify this PR and avoid churn by moving the two CI commits last (if they are still needed) after changing the cmake and depends ENABLE_IPC defaults from true to false.
    • It could make sense to rename the NO_MULTIPROCESS depends option to NO_IPC to be consistent with the cmake ENABLE_IPC option. There are some other depends/cmake options that seem to share the same names like NO_WALLET/ENABLE_WALLET, NO_ZMQ/WITH_ZMQ, NO_USDT/WITH_USDT, etc
  53. Sjors force-pushed on Apr 11, 2025
  54. Sjors commented at 9:58 pm on April 11, 2025: member

    I moved the ci commits last and removed the unneeded stuff. So this PR is now independent of #30975, although it overlaps.

    Hopefully didn’t break anything…


    Does anyone have a strong preference which CI job(s) should build without multiprocess? Right now the Windows and one i686 cirrus job are.

    Any which CI job(s) should use bitcoin-node in the functional tests? I picked CentOS (depends) and macOS native (no depends).

    Except for Windows, these choices are fairly arbitrary.

  55. Sjors force-pushed on Apr 11, 2025
  56. DrahtBot added the label Needs rebase on Apr 14, 2025
  57. Sjors force-pushed on Apr 15, 2025
  58. DrahtBot removed the label Needs rebase on Apr 15, 2025
  59. in depends/README.md:121 in 9b46b7d582 outdated
    117@@ -118,7 +118,7 @@ The following can be set when running make: `make FOO=bar`
    118 - `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite)
    119 - `NO_BDB`: Don't download/build/cache BerkeleyDB
    120 - `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
    121-- `MULTIPROCESS`: Build libmultiprocess (experimental)
    122+- `NO_IPC`: Don't build experimental libmultiprocess (default on Windows and OpenBSD)
    


    ryanofsky commented at 5:17 pm on April 15, 2025:

    In commit “build: depends makes libmultiprocess by default” (9b46b7d582edcf61bbec5b01c8e661af804e22d6)

    Think it would be good if this description described the full effects of this option. Would maybe say “NO_IPC: don’t build Cap’n Proto and libmultiprocess packages, and disable building IPC binaries (bitcoin-node, bitcoin-gui)”

    Also, since this is the most significant commit in the PR, which controls whether IPC binaries are included in releases, it would be good to mention the effect this has on releases in the commit description.

    Commit description could also mention effect this has on CI builds: it cause more depends builds to build IPC binaries, but still the only build running functional tests with them is the i686_multiprocess one.


    Sjors commented at 12:42 pm on April 17, 2025:
    Expanded the comment and commit description.
  60. ryanofsky approved
  61. ryanofsky commented at 5:35 pm on April 15, 2025: contributor

    Code review ACK 5d96e656d72abee468f5f49759b1b08eab445d4d. Changes seem pretty clean and simple now. I think it might be good for PR to clearly mention the 3 changes in behavior it causes:

    1 - Causes bitcoin-node and bitcoin-gui binaries to be included in releases and ENABLE_IPC option to be switched on by default in depends builds. 2 - Also causes ENABLE_IPC option to be switched on by default in both non-depends builds 3 - Makes various changes to CI: switching on ENABLE_IPC on in most configurations and using bitcoin-node binary for functional tests in two of them.

    It would also be good to point out that that this PR doesn’t need to do all of 3 things at once. It is simpler and probably less confusing to make all these changes in the same PR, but if we want to isolate any of these things and make them separate, that’s possible.


    re: #31802 (comment)

    All the choices you made about CI jobs options seem reasonable, and seem to test everything we would want. But @maflcko has best understanding of CI jobs and might have input.

  62. DrahtBot added the label Needs rebase on Apr 17, 2025
  63. Sjors force-pushed on Apr 17, 2025
  64. Sjors commented at 12:42 pm on April 17, 2025: member
    Rebased after #32271, updated PR description, commit description and comment as suggested here: #31802 (review)
  65. Sjors force-pushed on Apr 17, 2025
  66. DrahtBot added the label CI failed on Apr 17, 2025
  67. in doc/multiprocess.md:19 in 341b2a99e6 outdated
    15@@ -16,11 +16,11 @@ Specifying `-DENABLE_IPC=ON` requires [Cap'n Proto](https://capnproto.org/) to b
    16 
    17 ### Depends installation
    18 
    19-Alternately the [depends system](../depends) can be used to avoid need to install local dependencies. A simple way to get started is to pass the `MULTIPROCESS=1` [dependency option](../depends#dependency-options) to make:
    20+Alternatively the [depends system](../depends) can be used to avoid needing to local install dependencies:
    


    DrahtBot commented at 2:02 pm on April 17, 2025:

    (✨ LLM generated, experimental)

    Alternatively the depends system can be used to avoid needing to local install dependencies: —> …avoid needing to install local dependencies:

  68. DrahtBot removed the label Needs rebase on Apr 17, 2025
  69. DrahtBot removed the label CI failed on Apr 17, 2025
  70. Sjors commented at 7:32 am on April 18, 2025: member
    This or a followup needs to update doc/dependencies.md and update the build instructions to change opt-in wording to opt-out. I’ll update that here if #32293 (comment) lands earlier.
  71. ryanofsky approved
  72. ryanofsky commented at 6:12 pm on April 21, 2025: contributor

    Code review ACK 341b2a99e646246a9e4d3aa283b2b59442cfad27. Only change since last review is making various improvements to comments and rebasing.

    Would be nice to update doc/dependencies.md here since #32293 is no longer doing that but not important.

  73. Sjors force-pushed on Apr 23, 2025
  74. Sjors commented at 8:19 am on April 23, 2025: member
    Rebased after #32293, updated the documentation it introduced, and added Cap’n Proto to doc/dependencies.md. Also took the LLM fix.
  75. in doc/dependencies.md:39 in ce415e06b1 outdated
    35@@ -36,3 +36,4 @@ Bitcoin Core requires one of the following compilers.
    36 | [SQLite](../depends/packages/sqlite.mk) (wallet) | [link](https://sqlite.org) | [3.38.5](https://github.com/bitcoin/bitcoin/pull/25378) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | No |
    37 | Python (scripts, tests) | [link](https://www.python.org) | N/A | [3.10](https://github.com/bitcoin/bitcoin/pull/30527) | No |
    38 | [systemtap](../depends/packages/systemtap.mk) ([tracing](tracing.md)) | [link](https://sourceware.org/systemtap/) | [4.8](https://github.com/bitcoin/bitcoin/pull/26945)| N/A | No |
    39+| [Cap'n Proto](../depends/packages/capnp.mk) | [link](https://capnproto.org) | [0.6.1](https://capnproto.org/install.html) | 0.5.3 | Yes |
    


    fanquake commented at 8:56 am on April 23, 2025:
    0| [Cap'n Proto](../depends/packages/capnp.mk) | [link](https://capnproto.org) | [0.6.1](https://capnproto.org/install.html) | 0.5.3 | No |
    

    Sjors commented at 9:54 am on April 23, 2025:
    Fixed. @TheCharlatan why was this set to Yes in the original?

    TheCharlatan commented at 8:23 pm on April 29, 2025:

    Fixed. @TheCharlatan why was this set to Yes in the original?

    It did not make that much sense to include since it was not part of the release binaries yet, but I thought it could be considered a runtime dependency in case it is not linked statically through depends or some other method.

  76. Sjors force-pushed on Apr 23, 2025
  77. in doc/build-osx.md:132 in 1eedff84d7 outdated
    133-Skip if you do not need IPC functionality.
    134-
    135-```bash
    136-brew install capnp
    137-```
    138+The depedency on `capnp` can be avoided by compiling without IPC-enabled binaries
    


    maflcko commented at 9:58 am on April 23, 2025:
    depedency → dependency
  78. Sjors commented at 9:59 am on April 23, 2025: member
    An alternative approach could be to make Cap’n Proto optional and have -DENABLE_IPC default to ON only if its present. Though I vaguely recall that with CMake we wanted to move away from enabling config options depending on whether a library is found.
  79. Sjors force-pushed on Apr 23, 2025
  80. TheCharlatan commented at 8:25 pm on April 29, 2025: contributor

    Concept ACK

    An alternative approach could be to make Cap’n Proto optional and have -DENABLE_IPC default to ON only if its present. Though I vaguely recall that with CMake we wanted to move away from enabling config options depending on whether a library is found.

    Yeah, this is intentionally not done anymore since the cmake migration. I think the current approach is fine.

  81. DrahtBot added the label Needs rebase on May 6, 2025
  82. Sjors force-pushed on May 7, 2025
  83. Sjors commented at 9:04 am on May 7, 2025: member
    Rebased after #32086.
  84. DrahtBot removed the label Needs rebase on May 7, 2025
  85. DrahtBot added the label CI failed on May 7, 2025
  86. DrahtBot commented at 10:38 am on May 7, 2025: contributor

    🚧 At least one of the CI tasks failed. Task tidy: https://github.com/bitcoin/bitcoin/runs/41784006413 LLM reason (✨ experimental): The CI failed due to clang-tidy errors related to incorrect use of std::move and thread_local.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  87. Sjors commented at 11:34 am on May 7, 2025: member

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

    0/ci_container_base/src/ipc/libmultiprocess/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]
    1[05:29:23.932]   252 |         m_fn = std::move(fn);
    2[05:29:23.932]       |                ^~~~~~~~~
    3[05:29:23.932]       |                std::forward<Fn>
    
  88. DrahtBot added the label Needs rebase on May 7, 2025
  89. Sjors commented at 2:52 pm on May 7, 2025: member
    Rebased after #28710.
  90. Sjors force-pushed on May 7, 2025
  91. DrahtBot removed the label Needs rebase on May 7, 2025
  92. ryanofsky referenced this in commit 28632dc782 on May 12, 2025
  93. ryanofsky commented at 6:10 pm on May 12, 2025: 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 https://github.com/bitcoin-core/libmultiprocess/pull/172

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

    0git fetch https://github.com/bitcoin-core/libmultiprocess 8d8e9f65f1d9faaafe91ca90910c1f96da9d094d
    1git 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.

  94. Sjors force-pushed on May 13, 2025
  95. Sjors commented at 9:03 am on May 13, 2025: member
    @ryanofsky I added your libmultiprocess patch (and rebased).
  96. DrahtBot removed the label CI failed on May 13, 2025
  97. DrahtBot added the label Needs rebase on May 15, 2025
  98. Sjors force-pushed on May 15, 2025
  99. Sjors commented at 4:52 pm on May 15, 2025: member
    Rebased after #31895. Also marking draft given the dependency on https://github.com/bitcoin-core/libmultiprocess/pull/172.
  100. Sjors marked this as a draft on May 15, 2025
  101. DrahtBot removed the label Needs rebase on May 15, 2025
  102. ryanofsky referenced this in commit c1e8c1a028 on May 15, 2025
  103. ryanofsky referenced this in commit 867a3fa894 on May 15, 2025
  104. Sjors force-pushed on May 16, 2025
  105. DrahtBot added the label CI failed on May 16, 2025
  106. DrahtBot removed the label CI failed on May 16, 2025
  107. DrahtBot added the label Needs rebase on May 22, 2025
  108. Sjors force-pushed on May 28, 2025
  109. Sjors force-pushed on May 28, 2025
  110. Sjors commented at 8:11 am on May 28, 2025: member
  111. DrahtBot added the label CI failed on May 28, 2025
  112. Sjors force-pushed on May 28, 2025
  113. DrahtBot removed the label Needs rebase on May 28, 2025
  114. DrahtBot removed the label CI failed on May 28, 2025
  115. ryanofsky referenced this in commit 27c7e8e5a5 on May 29, 2025
  116. fanquake referenced this in commit 9393aeeca4 on May 30, 2025
  117. Sjors force-pushed on May 30, 2025
  118. Sjors commented at 9:59 am on May 30, 2025: member

    https://github.com/bitcoin-core/libmultiprocess/pull/172 landed and the subtree was updated in #32641.

    Marking ready to review again.

    Although #31679 is orthogonal, it’s also worth reviewing. There should be no impact in user experience, because thanks to #31375 the recommended invocation bitcoin -m will find bitcoin-node whether it’s in /usr/local/bin or /usr/local/libexec. But an upgrade would leave a stale version of bitcoin-node in bin, so it’s nicer to get that PR in the same release as this one. Merge order shouldn’t matter.

  119. Sjors marked this as ready for review on May 30, 2025
  120. TheCharlatan commented at 1:26 pm on May 30, 2025: contributor

    Concept ACK

    Guix builds (aarch64)

     0eb7c84cea8ea007cba8605b256f176cfc2c4ee0229fd93a80fca0e0d5fe2f71d  guix-build-af227a0e7d97/output/aarch64-linux-gnu/SHA256SUMS.part
     1b41de2faee47dee6947724e0bbe0dfb69fd91f7a1eb571956b03adda51c73f73  guix-build-af227a0e7d97/output/aarch64-linux-gnu/bitcoin-af227a0e7d97-aarch64-linux-gnu-debug.tar.gz
     2dfff9d1b7989a31dfa762195c65e09b6427d99bf97bc774fcadf6ed86be4ddbc  guix-build-af227a0e7d97/output/aarch64-linux-gnu/bitcoin-af227a0e7d97-aarch64-linux-gnu.tar.gz
     34ca85165f3d6e9ea19d93a509facbea15a2afc6b20193926259949f29eacaad1  guix-build-af227a0e7d97/output/arm-linux-gnueabihf/SHA256SUMS.part
     4f70b60bfddc99c2931f4bd094ea745f76474e75bdd2c07b1b2108c660358ac7f  guix-build-af227a0e7d97/output/arm-linux-gnueabihf/bitcoin-af227a0e7d97-arm-linux-gnueabihf-debug.tar.gz
     5730365f5e1cc2bfdf819aebbb068c919856688c64a3db771d7158d6e0721f901  guix-build-af227a0e7d97/output/arm-linux-gnueabihf/bitcoin-af227a0e7d97-arm-linux-gnueabihf.tar.gz
     6342d908b806510abf0a18656a2ce206cf69173b502ebfeaa3022e49cc3eed8ac  guix-build-af227a0e7d97/output/arm64-apple-darwin/SHA256SUMS.part
     7cb9e0874c73cbbe480120ddd6cfd88ed062e1470b121a1e1a7c4ec29e13d185d  guix-build-af227a0e7d97/output/arm64-apple-darwin/bitcoin-af227a0e7d97-arm64-apple-darwin-codesigning.tar.gz
     86732df9d0a3a862c5cce023519115777550d8605aa9a90cf103ffffb94a8be9e  guix-build-af227a0e7d97/output/arm64-apple-darwin/bitcoin-af227a0e7d97-arm64-apple-darwin-unsigned.tar.gz
     922a85d49cf3782518f966e65c9c12ed89ea2e238a5459091516950a31f32f8e6  guix-build-af227a0e7d97/output/arm64-apple-darwin/bitcoin-af227a0e7d97-arm64-apple-darwin-unsigned.zip
    1090e7f0c5ca1a6dae5b557f41525007e36257eb9aad4e708a79ddefb3a3389522  guix-build-af227a0e7d97/output/dist-archive/bitcoin-af227a0e7d97.tar.gz
    116c84fa2221a1ac7e669ae1d974e720ad466b17f72845e56badf37f2eff7bd39c  guix-build-af227a0e7d97/output/powerpc64-linux-gnu/SHA256SUMS.part
    12dc39d5dd4b563b93b9a5a05397f6d3bfddc49a00d5c00f81e7c1b25c6b68951c  guix-build-af227a0e7d97/output/powerpc64-linux-gnu/bitcoin-af227a0e7d97-powerpc64-linux-gnu-debug.tar.gz
    1315c2d480a533c1eced517874594b34b27bbf4fef03f1ff3bf31e6766097bc4a8  guix-build-af227a0e7d97/output/powerpc64-linux-gnu/bitcoin-af227a0e7d97-powerpc64-linux-gnu.tar.gz
    14e90c649bd1c3a29084bf510c28cdc3e6bed4882932136b35f4c128913ea08c14  guix-build-af227a0e7d97/output/riscv64-linux-gnu/SHA256SUMS.part
    152a225c922c69a17c34170ca100cfc050dec58cd86545864ba511cbe8ae2b7556  guix-build-af227a0e7d97/output/riscv64-linux-gnu/bitcoin-af227a0e7d97-riscv64-linux-gnu-debug.tar.gz
    162bde0da717b4d77d35bd8f2f1f8e163d75001fc2237dac2caee3e30617674e5e  guix-build-af227a0e7d97/output/riscv64-linux-gnu/bitcoin-af227a0e7d97-riscv64-linux-gnu.tar.gz
    174a332e4d6759a1eb7cef550149e638d28b08bd3a4a642acc151326e407830316  guix-build-af227a0e7d97/output/x86_64-apple-darwin/SHA256SUMS.part
    180f5d65f51213e2c66ffea4e47ff92153d4035c0d3b35d14775c0b57dc538c6c3  guix-build-af227a0e7d97/output/x86_64-apple-darwin/bitcoin-af227a0e7d97-x86_64-apple-darwin-codesigning.tar.gz
    19eebe0079f64b5d5708e36cd09d5141bfa2b09e8dc0faad865bd72f692f80d825  guix-build-af227a0e7d97/output/x86_64-apple-darwin/bitcoin-af227a0e7d97-x86_64-apple-darwin-unsigned.tar.gz
    20a06697c8343f8955e5b2cc9b4bb3da10930dd47201f3b6370469a4852ae96d88  guix-build-af227a0e7d97/output/x86_64-apple-darwin/bitcoin-af227a0e7d97-x86_64-apple-darwin-unsigned.zip
    21b11d8d67e90ace3deae3b8bd161e946672f69edf79d0815fbfc7752ba66c4d9d  guix-build-af227a0e7d97/output/x86_64-linux-gnu/SHA256SUMS.part
    22ef01795c3840d64de9e21f5acf34f0ffc6d50a025904f7b796cb5953356ef111  guix-build-af227a0e7d97/output/x86_64-linux-gnu/bitcoin-af227a0e7d97-x86_64-linux-gnu-debug.tar.gz
    235143788025534ccc34b52184b64dfe7c694e8ee0e42dbd023cf29fdc62c89a19  guix-build-af227a0e7d97/output/x86_64-linux-gnu/bitcoin-af227a0e7d97-x86_64-linux-gnu.tar.gz
    247ba6f281343b8dbe17a0fdd2b5dff59dc524fe479916ca464b0bb515fb603e79  guix-build-af227a0e7d97/output/x86_64-w64-mingw32/SHA256SUMS.part
    257d1b633fb621ed089d348d8094c60b47e03d410797bd6f42287955b7c5e8e249  guix-build-af227a0e7d97/output/x86_64-w64-mingw32/bitcoin-af227a0e7d97-win64-codesigning.tar.gz
    2671bd5c688f19c318181dce8e5db3ab41ea0f93cffe2b6b27370a1c8329ec73da  guix-build-af227a0e7d97/output/x86_64-w64-mingw32/bitcoin-af227a0e7d97-win64-debug.zip
    270f93e9553ba09f70f2d31cd2683ec17703463907da9bc00c0468d753f15bd202  guix-build-af227a0e7d97/output/x86_64-w64-mingw32/bitcoin-af227a0e7d97-win64-setup-unsigned.exe
    2823af1025e881279fb507a79bf5ba3860fc471a0cbeb60872ca3cf307be26676c  guix-build-af227a0e7d97/output/x86_64-w64-mingw32/bitcoin-af227a0e7d97-win64-unsigned.zip
    
  121. fanquake commented at 1:39 pm on May 30, 2025: member

    OpenBSD are not supported yet, the latter due to a fairly trivial upstream issue.

    If it’s trivial, I’d say you should pull the patch into depends, rather than opting into a different default behaviour for an entire platform?

  122. fanquake commented at 1:42 pm on May 30, 2025: member
    cc @theStack ^
  123. theStack commented at 3:05 pm on May 30, 2025: contributor

    OpenBSD are not supported yet, the latter due to a fairly trivial upstream issue.

    If it’s trivial, I’d say you should pull the patch into depends, rather than opting into a different default behaviour for an entire platform?

    Looks like there is no working patch available yet, as the currently proposed PR (https://github.com/capnproto/capnproto/pull/1907) has some blocking issues that are still untackled (https://github.com/capnproto/capnproto/pull/1907#discussion_r1452594740, https://github.com/capnproto/capnproto/pull/1907#discussion_r1452600300). The proposed solution of falling back to the poll()-implementation seems simple enough though, will take a deeper look next week. (Fwiw, I reached out to the author asking if they are still working on this just in case, though the chance after more than a year is close to zero.)

  124. Sjors commented at 3:15 pm on May 30, 2025: member

    I dropped the word “trivial” from the description and instead linked to the PR mentioned by @theStack.

    Also cc @vasild.

  125. hebasto commented at 12:08 pm on June 2, 2025: member

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

    0/ci_container_base/src/ipc/libmultiprocess/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]
    1[05:29:23.932]   252 |         m_fn = std::move(fn);
    2[05:29:23.932]       |                ^~~~~~~~~
    3[05:29:23.932]       |                std::forward<Fn>
    

    My apologies for missing this in d4bc5639829f0c98bd2faeddba9be4e8c6667875. We should treat the libmultiprocess subtree the same as all other subtrees and disable the EXPORT_COMPILE_COMMANDS property for all its targets.

  126. in depends/Makefile:165 in adc1bcf784 outdated
    163@@ -161,7 +164,7 @@ qt_native_packages_$(NO_QT) = $(qt_native_packages)
    164 wallet_packages_$(NO_WALLET) = $(sqlite_packages)
    165 
    166 zmq_packages_$(NO_ZMQ) = $(zmq_packages)
    167-multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
    168+multiprocess_packages_$(NO_IPC) = $(multiprocess_packages)
    


    ryanofsky commented at 7:38 pm on June 2, 2025:

    In commit “build: depends makes libmultiprocess by default” (adc1bcf784ae9763246f1f143ebc225214bf1730)

    Not important, but might be nice to replace multiprocess_packages with ipc_packages to be more consistent.


    Sjors commented at 5:15 am on June 3, 2025:
    Will do if I need to retouch.

    Sjors commented at 10:05 am on June 12, 2025:
    Done
  127. ryanofsky approved
  128. ryanofsky commented at 7:46 pm on June 2, 2025: contributor

    Code review ACK af227a0e7d9754623d36925c56599f9b921f5cb3, just rebased due to various conflicts since last review.


    re: #31802 (comment)

    We should treat the libmultiprocess subtree the same as all other subtrees and disable the EXPORT_COMPILE_COMMANDS property for all its targets.

    This could be reasonable, though I’m not very sure what the benefits of disabling linting here would be. Also, I think even with EXPORT_COMPILE_COMMANDS disabled, errors similar to #31802 (comment) could still happen because that error comes from a header file included via -I, not -isystem

  129. DrahtBot requested review from TheCharlatan on Jun 2, 2025
  130. fanquake commented at 4:02 pm on June 5, 2025: member
    https://github.com/capnproto/capnproto/pull/2308 - has landed, so you can pull that in here.
  131. theStack commented at 0:24 am on June 6, 2025: contributor

    capnproto/capnproto#2308 - has landed, so you can pull that in here.

    Opened #32690 since it turned out that only applying the patch was not enough, as another issue regarding the SHA256SUM command was revealed.

  132. fanquake commented at 3:57 pm on June 11, 2025: member

    OpenBSD can be enabled after #32690.

    This is now merged.

  133. Sjors force-pushed on Jun 11, 2025
  134. Sjors commented at 5:10 pm on June 11, 2025: member

    Rebased after #32690 and dropped the OpenBSD exception.

    I ran the functional test suite for this PR on my OpenBSD vm.

  135. Sjors force-pushed on Jun 12, 2025
  136. in depends/README.md:83 in 5f21cb59a9 outdated
    79@@ -80,7 +80,7 @@ The following can be set when running make: `make FOO=bar`
    80 - `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
    81 - `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite)
    82 - `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
    83-- `MULTIPROCESS`: Build libmultiprocess (experimental)
    84+- `NO_IPC`: Don't build Cap’n Proto and libmultiprocess packages, and disable building IPC binaries (bitcoin-node, bitcoin-gui). Default on Windows.
    


    fanquake commented at 10:35 am on June 12, 2025:
    0- `NO_IPC`: Don't build Cap’n Proto and libmultiprocess packages
    

    I don’t think we need to list binaries, it’s another list to sync, and we don’t do it for other options (i.e bitcoin-wallet) and NO_WALLET.


    Sjors commented at 12:03 pm on June 12, 2025:
    I did keep the Windows mention.
  137. in ci/test/00_setup_env_mac_native.sh:15 in 5f21cb59a9 outdated
    10@@ -11,7 +11,12 @@ export LC_ALL=C.UTF-8
    11 export PIP_PACKAGES="--break-system-packages zmq"
    12 export GOAL="install deploy"
    13 export CMAKE_GENERATOR="Ninja"
    14-export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
    15+export BITCOIN_CONFIG="\
    16+ -DBUILD_GUI=ON \
    


    fanquake commented at 10:35 am on June 12, 2025:
    Unrelated CI formatting changes, in a cmake: commit?

    Sjors commented at 12:00 pm on June 12, 2025:

    It seems unavoidable to change ci in the same commit.

    Previous iterations were changing BUILD_CONFIG, hence the formatting change. But I’ll just drop them now.

  138. Sjors force-pushed on Jun 12, 2025
  139. DrahtBot added the label CI failed on Jun 12, 2025
  140. DrahtBot commented at 12:05 pm on June 12, 2025: contributor

    🚧 At least one of the CI tasks failed. Task tidy: https://github.com/bitcoin/bitcoin/runs/43960756779 LLM reason (✨ experimental): The CI failure is caused by errors in clang-tidy checks related to deprecated header includes, which are treated as fatal errors.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  141. Sjors commented at 2:37 pm on June 12, 2025: member

    @ryanofsky looks like Tidy got more strict again…

    0[10:33:51.654] /ci_container_base/src/ipc/capnp/protocol.cpp:20:10: error: inclusion of deprecated C++ header 'errno.h'; consider using 'cerrno' instead [modernize-deprecated-headers,-warnings-as-errors]
    1[10:33:51.654]    20 | #include <errno.h>
    2[10:33:51.654]       |          ^~~~~~~~~
    3[10:33:51.654]       |          <cerrno>
    4[10:33:51.654] 919 warnings generated.
    

    https://github.com/bitcoin/bitcoin/pull/31802/checks?check_run_id=43968493627

  142. fanquake commented at 3:23 pm on June 12, 2025: member

    looks like Tidy got more strict again…

     0diff --git a/src/ipc/capnp/protocol.cpp b/src/ipc/capnp/protocol.cpp
     1index 691bdf5f92..3326f70931 100644
     2--- a/src/ipc/capnp/protocol.cpp
     3+++ b/src/ipc/capnp/protocol.cpp
     4@@ -16,8 +16,8 @@
     5 #include <mp/util.h>
     6 #include <util/threadnames.h>
     7 
     8-#include <assert.h>
     9-#include <errno.h>
    10+#include <cassert>
    11+#include <cerrno>
    12 #include <future>
    13 #include <memory>
    14 #include <mutex>
    15diff --git a/src/ipc/interfaces.cpp b/src/ipc/interfaces.cpp
    16index 33555f05d4..1d9c399260 100644
    17--- a/src/ipc/interfaces.cpp
    18+++ b/src/ipc/interfaces.cpp
    19@@ -15,10 +15,10 @@
    20 
    21 #include <cstdio>
    22 #include <cstdlib>
    23+#include <cstring>
    24 #include <functional>
    25 #include <memory>
    26 #include <stdexcept>
    27-#include <string.h>
    28 #include <string>
    29 #include <unistd.h>
    30 #include <utility>
    31diff --git a/src/ipc/process.cpp b/src/ipc/process.cpp
    32index 33667883b7..6c9ec21665 100644
    33--- a/src/ipc/process.cpp
    34+++ b/src/ipc/process.cpp
    35@@ -13,11 +13,11 @@
    36 
    37 #include <cstdint>
    38 #include <cstdlib>
    39-#include <errno.h>
    40+#include <cstring>
    41+#include <cerrno>
    42 #include <exception>
    43 #include <iostream>
    44 #include <stdexcept>
    45-#include <string.h>
    46 #include <sys/socket.h>
    47 #include <sys/un.h>
    48 #include <unistd.h>
    
  143. fanquake commented at 3:54 pm on June 12, 2025: member

    For reference, the failure in the test-each-commit CI (re-run) was (https://github.com/bitcoin/bitcoin/actions/runs/15610014963/job/43981198408#step:7:1986):

     0  node0 2025-06-12T12:34:42.336592Z (mocktime: 2025-06-12T12:34:46Z) [net] [net.cpp:2041] [InactivityCheck] [net] version handshake timeout, disconnecting peer=0 
     1 test  2025-06-12T12:34:43.290505Z TestFramework.utils (ERROR): wait_until() failed. Predicate: '''' 
     2                                           def test_function():
     3                                               if check_connected:
     4                                                   assert self.is_connected
     5                                               return test_function_in()
     6                                   '''
     7 node0 2025-06-12T12:34:44.168910Z (mocktime: 2025-06-12T12:34:46Z) [net] [net.cpp:2041] [InactivityCheck] [net] version handshake timeout, disconnecting peer=1 
     8 node0 2025-06-12T12:34:44.168933Z (mocktime: 2025-06-12T12:34:46Z) [net] [net.cpp:2041] [InactivityCheck] [net] version handshake timeout, disconnecting peer=2 
     9 node0 2025-06-12T12:34:44.168948Z (mocktime: 2025-06-12T12:34:46Z) [net] [net.cpp:558] [CloseSocketDisconnect] [net] Resetting socket for peer=0 
    10 test  2025-06-12T12:34:44.169006Z TestFramework (ERROR): Assertion failed 
    11                                   Traceback (most recent call last):
    12                                     File "/home/runner/work/bitcoin/bitcoin/test/functional/test_framework/test_framework.py", line 190, in main
    13                                       self.run_test()
    14                                     File "/home/runner/work/bitcoin/bitcoin/build/test/functional/p2p_timeouts.py", line 100, in run_test
    15                                       no_verack_node.wait_for_disconnect(timeout=1)
    16                                     File "/home/runner/work/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 609, in wait_for_disconnect
    17                                       self.wait_until(test_function, timeout=timeout, check_connected=False)
    18                                     File "/home/runner/work/bitcoin/bitcoin/test/functional/test_framework/p2p.py", line 601, in wait_until
    19                                       wait_until_helper_internal(test_function, timeout=timeout, lock=p2p_lock, timeout_factor=self.timeout_factor, check_interval=check_interval)
    20                                     File "/home/runner/work/bitcoin/bitcoin/test/functional/test_framework/util.py", line 321, in wait_until_helper_internal
    21                                       raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
    22                                   AssertionError: Predicate ''''
    23                                           def test_function():
    24                                               if check_connected:
    25                                                   assert self.is_connected
    26                                               return test_function_in()
    27                                   ''' not true after 1 seconds
    28 node0 2025-06-12T12:34:44.169056Z (mocktime: 2025-06-12T12:34:46Z) [net] [net.cpp:558] [CloseSocketDisconnect] [net] Resetting socket for peer=1 
    
  144. DrahtBot removed the label CI failed on Jun 13, 2025
  145. Sjors commented at 11:30 am on June 16, 2025: member

    Added the commit from #32760 to see if bumping capnp (depends) reveals any issues. Marking draft, will rebase after it lands.

    I tested this with OpenBSD (x86, as well as aarch64 with 4f10a57671c19cacca630b2401e42a213aacff1b from #32716).

  146. Sjors marked this as a draft on Jun 16, 2025
  147. ryanofsky approved
  148. ryanofsky commented at 1:46 pm on June 16, 2025: contributor
    Code review ACK 7ecf6bbd84f200dab1ba7cbcae893edc4ed0d581. Since last review rebased, enabled openbsd support by updating capnp, renamed variable and dropped whitespace changes, and avoided c includes to fix tidy modernize-deprecated-headers errors
  149. DrahtBot added the label CI failed on Jun 16, 2025
  150. build: add bitcoin-{node,gui} to Maintenance.cmake 216461e1ae
  151. build: depends makes libmultiprocess by default
    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.
    048f5917ac
  152. ci: build one depends job without multiprocess 3d69cfa78c
  153. ci: use bitcoin-node for one depends job
    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.
    0d239ffb32
  154. cmake: enable ENABLE_IPC option by default
    Install capnp on non-depends CI jobs.
    
    Use the bitcoin-node binary in the macOS native non-depends job.
    
    Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
    5da4601f25
  155. refactor: modernize deprecated ipc headers
    Co-authored-by: fanquake <fanquake@gmail.com>
    5a66729744
  156. Sjors force-pushed on Jun 17, 2025
  157. Sjors marked this as ready for review on Jun 17, 2025
  158. Sjors commented at 7:31 am on June 17, 2025: member
    Rebased after #32760 (only change is dropping that commit).
  159. DrahtBot removed the label CI failed on Jun 17, 2025
  160. ryanofsky approved
  161. ryanofsky commented at 10:34 am on June 17, 2025: contributor
    Code review ACK 5a66729744db797e40f375d62aaebba66884ea6f. No change other than rebase and dropping base commit
  162. vasild approved
  163. vasild commented at 10:18 am on June 19, 2025: contributor

    ACK 5a66729744db797e40f375d62aaebba66884ea6f

    Since you are renaming “multiprocess” to “ipc” in some places and you are also renaming 00_setup_env_i686_multiprocess.sh to 00_setup_env_i686_no_multiprocess.sh maybe 00_setup_env_i686_no_ipc.sh would be a better new name of the file?

    The last commit refactor: modernize deprecated ipc headers is fine, but I am not sure why it is needed in this PR since those (old) .h includes were not introduced in this PR. Is there not the same problem in master? Or maybe tidy did not look at files in src/ipc/ before? If yes, then maybe that commit should be first, before the one that makes tidy check src/ipc/, so that all intermediate commits are good.

  164. maflcko commented at 11:16 am on June 19, 2025: member

    The last commit refactor: modernize deprecated ipc headers is fine, but I am not sure why it is needed in this PR since those (old) .h includes were not introduced in this PR. Is there not the same problem in master? Or maybe tidy did not look at files in src/ipc/ before? If yes, then maybe that commit should be first, before the one that makes tidy check src/ipc/, so that all intermediate commits are good.

    If you want it to be bisect-nice, I’d guess you’d have to set -DENABLE_IPC=OFF in the tidy CI in the second to last commit and then enable it in the last commit. However I haven’t tested this and I don’t think anyone is bisecting the CI on non-merge commits, so anything should be fine here.

  165. Sjors commented at 12:21 pm on June 19, 2025: member

    I don’t think anyone is bisecting the CI on non-merge commits

    Indeed that’s why I didn’t move it up initially. With this many CI changes it’s hard to be bisect friendly to that level anyway. @vasild if I need to retouch I’ll move that commit up and rename some more multiprocess things to ipc.

  166. fanquake commented at 12:53 pm on June 19, 2025: member

    This PR needs release notes.

    Note that the Tidy job here is passing, even though it’s generating output (which also seems like a bug?). That should be addressed, to either fix any issues or suppress any false-positives; otherwise it’s going to make the tidy output unusable. i.e (https://cirrus-ci.com/task/6552721135763456):

      0[02:41:41.544] [706/706][83.5s] clang-tidy-20 -p=/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-server.c++
      1[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:5: warning: Address of stack memory associated with temporary object of type '(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:51)' is still referred to by a temporary object on the stack upon returning to the caller.  This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
      2[02:41:41.544]   134 |     return ReadDestEmplace{TypeList<LocalType>(), [&](auto&&... args) -> decltype(auto) {
      3[02:41:41.544]       |     ^
      4[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-server.c++:41:12: note: Calling 'serverInvoke<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::PassCustomParams, mp::test::messages::FooInterface::PassCustomResults>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 17>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 18>, mp::ServerCall>>>'
      5[02:41:41.544]    41 |     return serverInvoke(*this, call_context, MakeServerField<1, Accessor<foo_fields::Arg, FIELD_IN | FIELD_BOXED>>(Make<ServerRet, Accessor<foo_fields::Result, FIELD_OUT | FIELD_BOXED>>(ServerCall())));
      6[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      7[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:16: note: Calling 'ReplaceVoid<(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:28), (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:705:13)>'
      8[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
      9[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     10[02:41:41.544]   705 |             [&]() { return kj::Promise<CallContext>(kj::mv(call_context)); })
     11[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     12[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:19: note: 'is_same_v' is true
     13[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
     14[02:41:41.544]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     15[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:5: note: Taking true branch
     16[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
     17[02:41:41.544]       |     ^
     18[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:666:9: note: Calling 'operator()'
     19[02:41:41.544]   666 |         fn();
     20[02:41:41.544]       |         ^~~~
     21[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:43: note: Calling 'ServerField::invoke'
     22[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
     23[02:41:41.544]       |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     24[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:539:16: note: Calling 'PassField<mp::Accessor<mp::foo_fields::Arg, 17>, mp::test::FooCustom, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::PassCustomParams, mp::test::messages::FooInterface::PassCustomResults>>, const mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 18>, mp::ServerCall> &, mp::TypeList<>>'
     25[02:41:41.544]   539 |         return PassField<Accessor>(Priority<2>(),
     26[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     27[02:41:41.544]   540 |             typename Split<argc, ArgTypes>::First(),
     28[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     29[02:41:41.544]   541 |             server_context,
     30[02:41:41.544]       |             ~~~~~~~~~~~~~~~
     31[02:41:41.544]   542 |             this->parent(),
     32[02:41:41.544]       |             ~~~~~~~~~~~~~~~
     33[02:41:41.544]   543 |             typename Split<argc, ArgTypes>::Second(),
     34[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     35[02:41:41.544]   544 |             std::forward<Args>(args)...);
     36[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     37[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:297:5: note: Calling 'MaybeReadField<mp::TypeList<mp::test::FooCustom>, mp::InvokeContext &, mp::StructField<mp::Accessor<mp::foo_fields::Arg, 17>, const mp::test::messages::FooInterface::PassCustomParams::Reader>, mp::ReadDestEmplace<mp::test::FooCustom, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
     38[02:41:41.544]   297 |     MaybeReadField(std::integral_constant<bool, Accessor::in>(), TypeList<ArgType>(), invoke_context,
     39[02:41:41.544]       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40[02:41:41.544]   298 |         Make<StructField, Accessor>(params), ReadDestEmplace(TypeList<ArgType>(), [&](auto&&... args) -> auto& {
     41[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     42[02:41:41.544]   299 |             param.emplace(std::forward<decltype(args)>(args)...);
     43[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     44[02:41:41.544]   300 |             return *param;
     45[02:41:41.544]       |             ~~~~~~~~~~~~~~
     46[02:41:41.544]   301 |         }));
     47[02:41:41.544]       |         ~~~
     48[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:269:5: note: Calling 'ReadField<mp::test::FooCustom, mp::InvokeContext &, mp::StructField<mp::Accessor<mp::foo_fields::Arg, 17>, const mp::test::messages::FooInterface::PassCustomParams::Reader>, mp::ReadDestEmplace<mp::test::FooCustom, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
     49[02:41:41.544]   269 |     ReadField(std::forward<Args>(args)...);
     50[02:41:41.544]       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     51[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:172:12: note: Calling 'CustomReadField<mp::StructField<mp::Accessor<mp::foo_fields::Arg, 17>, const mp::test::messages::FooInterface::PassCustomParams::Reader>, mp::ReadDestEmplace<mp::test::FooCustom, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
     52[02:41:41.544]   172 |     return CustomReadField(TypeList<RemoveCvRef<LocalTypes>...>(), Priority<2>(), std::forward<Args>(args)...);
     53[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     54[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/test/mp/test/foo-types.h:35:12: note: Calling 'ReadDestEmplace::update'
     55[02:41:41.544]    35 |     return read_dest.update([&](FooCustom& value) {
     56[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     57[02:41:41.544]    36 |         value.v1 = ReadField(TypeList<std::string>(), invoke_context, mp::Make<mp::ValueField>(custom.getV1()), ReadDestTemp<std::string>());
     58[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     59[02:41:41.544]    37 |         value.v2 = custom.getV2();
     60[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
     61[02:41:41.544]    38 |     });
     62[02:41:41.544]       |     ~~
     63[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:112:23: note: 'is_const_v' is false
     64[02:41:41.544]   112 |         if constexpr (std::is_const_v<std::remove_reference_t<std::invoke_result_t<EmplaceFn>>>) {
     65[02:41:41.544]       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     66[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:112:9: note: Taking false branch
     67[02:41:41.544]   112 |         if constexpr (std::is_const_v<std::remove_reference_t<std::invoke_result_t<EmplaceFn>>>) {
     68[02:41:41.544]       |         ^
     69[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:122:13: note: Calling 'operator()'
     70[02:41:41.544]   122 |             update_fn(temp);
     71[02:41:41.544]       |             ^~~~~~~~~~~~~~~
     72[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/test/mp/test/foo-types.h:36:113: note: Calling 'ReadDestTemp<std::basic_string<char>>'
     73[02:41:41.544]    36 |         value.v1 = ReadField(TypeList<std::string>(), invoke_context, mp::Make<mp::ValueField>(custom.getV1()), ReadDestTemp<std::string>());
     74[02:41:41.544]       |                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     75[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:5: note: Address of stack memory associated with temporary object of type '(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:51)' is still referred to by a temporary object on the stack upon returning to the caller.  This will be a dangling reference
     76[02:41:41.544]   134 |     return ReadDestEmplace{TypeList<LocalType>(), [&](auto&&... args) -> decltype(auto) {
     77[02:41:41.544]       |     ^                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     78[02:41:41.544]   135 |         return LocalType{std::forward<decltype(args)>(args)...};
     79[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     80[02:41:41.544]   136 |     }};
     81[02:41:41.544]       |     ~
     82[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/type-number.h:55:32: warning: The value '0' provided to the cast expression is not in the valid range of values for 'FooEnum' [clang-analyzer-optin.core.EnumCastOutOfRange]
     83[02:41:41.544]    55 |     return read_dest.construct(static_cast<LocalType>(input.get()));
     84[02:41:41.544]       |                                ^
     85[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/test/mp/test/foo.h:24:12: note: enum declared here
     86[02:41:41.544]    24 | enum class FooEnum : uint8_t { ONE = 1, TWO = 2, };
     87[02:41:41.544]       | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     88[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-server.c++:53:12: note: Calling 'serverInvoke<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::PassEnumParams, mp::test::messages::FooInterface::PassEnumResults>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall>>>'
     89[02:41:41.544]    53 |     return serverInvoke(*this, call_context, MakeServerField<1, Accessor<foo_fields::Arg, FIELD_IN>>(Make<ServerRet, Accessor<foo_fields::Result, FIELD_OUT>>(ServerCall())));
     90[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     91[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:16: note: Calling 'ReplaceVoid<(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:28), (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:705:13)>'
     92[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
     93[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     94[02:41:41.544]   705 |             [&]() { return kj::Promise<CallContext>(kj::mv(call_context)); })
     95[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     96[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:19: note: 'is_same_v' is true
     97[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
     98[02:41:41.544]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     99[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:5: note: Taking true branch
    100[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
    101[02:41:41.544]       |     ^
    102[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:666:9: note: Calling 'operator()'
    103[02:41:41.544]   666 |         fn();
    104[02:41:41.544]       |         ^~~~
    105[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:43: note: Calling 'ServerField::invoke'
    106[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
    107[02:41:41.544]       |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    108[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:539:16: note: Calling 'PassField<mp::Accessor<mp::foo_fields::Arg, 1>, mp::test::FooEnum, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::PassEnumParams, mp::test::messages::FooInterface::PassEnumResults>>, const mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> &, mp::TypeList<>>'
    109[02:41:41.544]   539 |         return PassField<Accessor>(Priority<2>(),
    110[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    111[02:41:41.544]   540 |             typename Split<argc, ArgTypes>::First(),
    112[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    113[02:41:41.544]   541 |             server_context,
    114[02:41:41.544]       |             ~~~~~~~~~~~~~~~
    115[02:41:41.544]   542 |             this->parent(),
    116[02:41:41.544]       |             ~~~~~~~~~~~~~~~
    117[02:41:41.544]   543 |             typename Split<argc, ArgTypes>::Second(),
    118[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    119[02:41:41.544]   544 |             std::forward<Args>(args)...);
    120[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    121[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:297:5: note: Calling 'MaybeReadField<mp::TypeList<mp::test::FooEnum>, mp::InvokeContext &, mp::StructField<mp::Accessor<mp::foo_fields::Arg, 1>, const mp::test::messages::FooInterface::PassEnumParams::Reader>, mp::ReadDestEmplace<mp::test::FooEnum, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
    122[02:41:41.544]   297 |     MaybeReadField(std::integral_constant<bool, Accessor::in>(), TypeList<ArgType>(), invoke_context,
    123[02:41:41.544]       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    124[02:41:41.544]   298 |         Make<StructField, Accessor>(params), ReadDestEmplace(TypeList<ArgType>(), [&](auto&&... args) -> auto& {
    125[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    126[02:41:41.544]   299 |             param.emplace(std::forward<decltype(args)>(args)...);
    127[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    128[02:41:41.544]   300 |             return *param;
    129[02:41:41.544]       |             ~~~~~~~~~~~~~~
    130[02:41:41.544]   301 |         }));
    131[02:41:41.544]       |         ~~~
    132[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:269:5: note: Calling 'ReadField<mp::test::FooEnum, mp::InvokeContext &, mp::StructField<mp::Accessor<mp::foo_fields::Arg, 1>, const mp::test::messages::FooInterface::PassEnumParams::Reader>, mp::ReadDestEmplace<mp::test::FooEnum, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
    133[02:41:41.544]   269 |     ReadField(std::forward<Args>(args)...);
    134[02:41:41.544]       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    135[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:172:12: note: Calling 'CustomReadField<mp::test::FooEnum, mp::StructField<mp::Accessor<mp::foo_fields::Arg, 1>, const mp::test::messages::FooInterface::PassEnumParams::Reader>, mp::ReadDestEmplace<mp::test::FooEnum, (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:298:83)>>'
    136[02:41:41.544]   172 |     return CustomReadField(TypeList<RemoveCvRef<LocalTypes>...>(), Priority<2>(), std::forward<Args>(args)...);
    137[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    138[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/type-number.h:55:55: note: Calling 'StructField::get'
    139[02:41:41.544]    55 |     return read_dest.construct(static_cast<LocalType>(input.get()));
    140[02:41:41.544]       |                                                       ^~~~~~~~~~~
    141[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:40:41: note: Calling 'Arg::get'
    142[02:41:41.544]    40 |     decltype(auto) get() const { return Accessor::get(this->m_struct); }
    143[02:41:41.544]       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    144[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy.h:174:82: note: Calling 'Reader::getArg'
    145[02:41:41.544]   174 |     template<typename S> static auto get(S&& s) -> decltype(s.getArg()) { return s.getArg(); }
    146[02:41:41.544]       |                                                                                  ^~~~~~~~~~
    147[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.h:5998:10: note: Calling 'StructReader::getDataField'
    148[02:41:41.544]  5998 |   return _reader.getDataField< ::int32_t>(
    149[02:41:41.544]       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    150[02:41:41.544]  5999 |       ::capnp::bounded<0>() * ::capnp::ELEMENTS);
    151[02:41:41.544]       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    152[02:41:41.544] /usr/include/capnp/layout.h:1099:7: note: Assuming the condition is false
    153[02:41:41.544]  1099 |   if ((offset + ONE * ELEMENTS) * capnp::bitsPerElement<T>() <= dataSize) {
    154[02:41:41.544]       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    155[02:41:41.544] /usr/include/capnp/layout.h:1099:3: note: Taking false branch
    156[02:41:41.544]  1099 |   if ((offset + ONE * ELEMENTS) * capnp::bitsPerElement<T>() <= dataSize) {
    157[02:41:41.544]       |   ^
    158[02:41:41.544] /usr/include/capnp/layout.h:1102:5: note: Returning zero
    159[02:41:41.544]  1102 |     return static_cast<T>(0);
    160[02:41:41.544]       |     ^~~~~~~~~~~~~~~~~~~~~~~~
    161[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.h:5998:10: note: Returning from 'StructReader::getDataField'
    162[02:41:41.544]  5998 |   return _reader.getDataField< ::int32_t>(
    163[02:41:41.544]       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    164[02:41:41.544]  5999 |       ::capnp::bounded<0>() * ::capnp::ELEMENTS);
    165[02:41:41.544]       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    166[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.h:5998:3: note: Returning zero
    167[02:41:41.544]  5998 |   return _reader.getDataField< ::int32_t>(
    168[02:41:41.544]       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    169[02:41:41.544]  5999 |       ::capnp::bounded<0>() * ::capnp::ELEMENTS);
    170[02:41:41.544]       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    171[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy.h:174:82: note: Returning from 'Reader::getArg'
    172[02:41:41.544]   174 |     template<typename S> static auto get(S&& s) -> decltype(s.getArg()) { return s.getArg(); }
    173[02:41:41.544]       |                                                                                  ^~~~~~~~~~
    174[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy.h:174:75: note: Returning zero
    175[02:41:41.544]   174 |     template<typename S> static auto get(S&& s) -> decltype(s.getArg()) { return s.getArg(); }
    176[02:41:41.544]       |                                                                           ^~~~~~~~~~~~~~~~~
    177[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:40:41: note: Returning from 'Arg::get'
    178[02:41:41.544]    40 |     decltype(auto) get() const { return Accessor::get(this->m_struct); }
    179[02:41:41.544]       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    180[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:40:34: note: Returning zero
    181[02:41:41.544]    40 |     decltype(auto) get() const { return Accessor::get(this->m_struct); }
    182[02:41:41.544]       |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    183[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/type-number.h:55:55: note: Returning from 'StructField::get'
    184[02:41:41.544]    55 |     return read_dest.construct(static_cast<LocalType>(input.get()));
    185[02:41:41.544]       |                                                       ^~~~~~~~~~~
    186[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/type-number.h:55:32: note: The value '0' provided to the cast expression is not in the valid range of values for 'FooEnum'
    187[02:41:41.544]    55 |     return read_dest.construct(static_cast<LocalType>(input.get()));
    188[02:41:41.544]       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    189[02:41:41.544] /usr/include/kj/async-inl.h:609:37: warning: The left operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
    190[02:41:41.544]   609 |       return *(void**)(*(char**)obj + voff);
    191[02:41:41.544]       |                                     ^
    192[02:41:41.544] /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-server.c++:68:12: note: Calling 'serverInvoke<mp::ProxyServer<mp::test::messages::ExtendedCallback>, capnp::CallContext<mp::test::messages::ExtendedCallback::CallExtendedParams, mp::test::messages::ExtendedCallback::CallExtendedResults>, mp::ServerField<0, mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall>>>>'
    193[02:41:41.544]    68 |     return serverInvoke(*this, call_context, MakeServerField<0, Accessor<foo_fields::Context, FIELD_IN | FIELD_BOXED>>(MakeServerField<1, Accessor<foo_fields::Arg, FIELD_IN>>(Make<ServerRet, Accessor<foo_fields::Result, FIELD_OUT>>(ServerCall()))));
    194[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    195[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:16: note: Calling 'ReplaceVoid<(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:28), (lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:705:13)>'
    196[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
    197[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    198[02:41:41.544]   705 |             [&]() { return kj::Promise<CallContext>(kj::mv(call_context)); })
    199[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    200[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:19: note: 'is_same_v' is false
    201[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
    202[02:41:41.544]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    203[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:665:5: note: Taking false branch
    204[02:41:41.544]   665 |     if constexpr (std::is_same_v<decltype(fn()), void>) {
    205[02:41:41.544]       |     ^
    206[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:669:16: note: Calling 'operator()'
    207[02:41:41.544]   669 |         return fn();
    208[02:41:41.544]       |                ^~~~
    209[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:704:43: note: Calling 'ServerField::invoke'
    210[02:41:41.544]   704 |         return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
    211[02:41:41.544]       |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    212[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:539:16: note: Calling 'PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::ExtendedCallback>, capnp::CallContext<mp::test::messages::ExtendedCallback::CallExtendedParams, mp::test::messages::ExtendedCallback::CallExtendedResults>>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall>>, mp::TypeList<int>>'
    213[02:41:41.544]   539 |         return PassField<Accessor>(Priority<2>(),
    214[02:41:41.544]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    215[02:41:41.544]   540 |             typename Split<argc, ArgTypes>::First(),
    216[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    217[02:41:41.544]   541 |             server_context,
    218[02:41:41.544]       |             ~~~~~~~~~~~~~~~
    219[02:41:41.544]   542 |             this->parent(),
    220[02:41:41.544]       |             ~~~~~~~~~~~~~~~
    221[02:41:41.544]   543 |             typename Split<argc, ArgTypes>::Second(),
    222[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    223[02:41:41.544]   544 |             std::forward<Args>(args)...);
    224[02:41:41.544]       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    225[02:41:41.544] /ci_container_base/src/ipc/libmultiprocess/include/mp/type-context.h:152:12: note: Calling 'CapabilityServerSet::getLocalServer'
    226[02:41:41.544]   152 |     return server.m_context.connection->m_threads.getLocalServer(thread_client)
    227[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    228[02:41:41.544] /usr/include/capnp/capability.h:1274:10: note: Calling 'Promise::then'
    229[02:41:41.544]  1274 |   return getLocalServerInternal(client)
    230[02:41:41.544]       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    231[02:41:41.544]  1275 |       .then([](void* server) -> kj::Maybe<typename T::Server&> {
    232[02:41:41.544]       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    233[02:41:41.544]  1276 |     if (server == nullptr) {
    234[02:41:41.544]       |     ~~~~~~~~~~~~~~~~~~~~~~~~
    235[02:41:41.544]  1277 |       return nullptr;
    236[02:41:41.544]       |       ~~~~~~~~~~~~~~~
    237[02:41:41.544]  1278 |     } else {
    238[02:41:41.544]       |     ~~~~~~~~
    239[02:41:41.544]  1279 |       return *reinterpret_cast<typename T::Server*>(server);
    240[02:41:41.544]       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    241[02:41:41.544]  1280 |     }
    242[02:41:41.544]       |     ~
    243[02:41:41.544]  1281 |   });
    244[02:41:41.544]       |   ~~
    245[02:41:41.544] /usr/include/kj/async-inl.h:1295:32: note: Calling 'GetFunctorStartAddress::apply'
    246[02:41:41.544]  1295 |   void* continuationTracePtr = _::GetFunctorStartAddress<_::FixVoid<T>&&>::apply(func);
    247[02:41:41.544]       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    248[02:41:41.544] /usr/include/kj/async-inl.h:677:12: note: Calling 'PtmfHelper::apply'
    249[02:41:41.544]   677 |     return PtmfHelper::from<ReturnType, Decay<Func>, ParamTypes...>(
    250[02:41:41.544]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    251[02:41:41.544]   678 |         &Decay<Func>::operator()).apply(&func);
    252[02:41:41.544]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    253[02:41:41.544] /usr/include/kj/async-inl.h:606:9: note: Assuming the condition is true
    254[02:41:41.544]   606 |     if (voff & 1) {
    255[02:41:41.544]       |         ^~~~~~~~
    256[02:41:41.544] /usr/include/kj/async-inl.h:606:5: note: Taking true branch
    257[02:41:41.544]   606 |     if (voff & 1) {
    258[02:41:41.544]       |     ^
    259[02:41:41.544] /usr/include/kj/async-inl.h:609:37: note: The left operand of '+' is a garbage value
    260[02:41:41.544]   609 |       return *(void**)(*(char**)obj + voff);
    261[02:41:41.544]       |                        ~~~~~~~~~~~~ ^
    262[02:41:41.545] 3 warnings generated.
    
  167. ryanofsky commented at 1:33 pm on June 19, 2025: contributor

    re: #31802 (comment)

    Note that the Tidy job here is passing, even though it’s generating output (which also seems like a bug?).

    Thanks, will fix. Looks like https://github.com/bitcoin-core/libmultiprocess/pull/172 did not resolve all the warnings.

    Just taking a quick look:

    • Need to check if this is a real bug:

    • /usr/include/kj/async-inl.h:609:37: warning: The left operand of '+' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]

    • Pretty sure this isn’t a bug. Changing [&] to [] should fix it

      • /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:5: warning: Address of stack memory associated with temporary object of type '(lambda at /ci_container_base/src/ipc/libmultiprocess/include/mp/proxy-types.h:134:51)' is still referred to by a temporary object on the stack upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
    • This might be a test bug

      • /ci_container_base/src/ipc/libmultiprocess/include/mp/type-number.h:55:32: warning: The value '0' provided to the cast expression is not in the valid range of values for 'FooEnum' [clang-analyzer-optin.core.EnumCastOutOfRange]
  168. fanquake added the label Needs release note on Jun 19, 2025
  169. Sjors marked this as a draft on Jun 19, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-20 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me