ipc: Support for windows support #35084

pull ryanofsky wants to merge 9 commits into bitcoin:master from ryanofsky:pr/ipc-wins changing 13 files +336 −281
  1. ryanofsky commented at 4:25 PM on April 15, 2026: contributor

    This PR makes bitcoin core changes needed to be compatible with https://github.com/bitcoin-core/libmultiprocess/pull/231, which adds windows to support libmultiprocess.

    The two PRs are meant to be reviewed in parallel and there is a draft PR #32387 combining both of these with more changes to enable IPC by default on windows.

  2. DrahtBot commented at 4:25 PM on April 15, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK stickies-v

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34020 (mining: add getTransactions(ByWitnessID) IPC methods by Sjors)
    • #19461 (multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky)
    • #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
    • #10102 (Multiprocess bitcoin by ryanofsky)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible places where comparison-specific test macros should replace generic comparisons:

    • src/ipc/test/ipc_tests.cpp BOOST_CHECK_THROW(process->bind(datadir, "test_bitcoin", invalid_bind), std::invalid_argument); -> Consider BOOST_CHECK_EXCEPTION(..., std::invalid_argument, matcher) so the expected failure reason is checked, not just the exception type.
    • src/ipc/test/ipc_tests.cpp BOOST_CHECK_THROW(process->connect(datadir, "test_bitcoin", invalid_bind), std::invalid_argument); -> Consider BOOST_CHECK_EXCEPTION(..., std::invalid_argument, matcher) so the expected failure reason is checked, not just the exception type.

    <sup>2026-05-29 14:28:18</sup>

  3. DrahtBot added the label CI failed on Apr 15, 2026
  4. DrahtBot commented at 5:15 PM on April 15, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task FreeBSD Cross: https://github.com/bitcoin/bitcoin/actions/runs/24465865499/job/71492637060</sub> <sub>LLM reason (✨ experimental): CI failed due to a linker error: duplicate symbol mp::SocketPair() in libbitcoin_ipc.a (defined in multiple objects).</sub>

    <details><summary>Hints</summary>

    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.

    </details>

  5. stickies-v commented at 5:45 PM on April 15, 2026: contributor

    Concept ACK

  6. ryanofsky force-pushed on Apr 16, 2026
  7. ryanofsky commented at 11:29 PM on April 16, 2026: contributor

    <!-- begin push-2 -->

    Updated 9c39299c7589cb650178f4a411956f2818d1b5c5 -> 012f428e7fe52707ea7421201def84a847328341 (pr/ipc-wins.1 -> pr/ipc-wins.2, compare)<!-- end --> to fix CI failures https://github.com/bitcoin/bitcoin/actions/runs/24465865499: ipc_tests cmake include directory bug and multiple definition link error

    <!-- begin push-3 -->

    Updated 012f428e7fe52707ea7421201def84a847328341 -> 129f48be88f738e6af9960fe81c0a9d05bb8b5f9 (pr/ipc-wins.2 -> pr/ipc-wins.3, compare)<!-- end --> to fix CI failures https://github.com/bitcoin/bitcoin/actions/runs/24539375845: HasReason include error and lint error about ipc_tests filename

    <!-- begin push-4 -->

    Updated 129f48be88f738e6af9960fe81c0a9d05bb8b5f9 -> 236762802185b1c8219e6f567964be1ddc97b839 (pr/ipc-wins.3 -> pr/ipc-wins.4, compare)<!-- end --> adding an extra version check to be able to build against https://github.com/bitcoin-core/libmultiprocess/pull/231 without code changes

    <!-- begin push-5 -->

    Updated 236762802185b1c8219e6f567964be1ddc97b839 -> 1a97f072f887ab95e2ac89b5cf1bc4a75b7255c6 (pr/ipc-wins.4 -> pr/ipc-wins.5, compare)<!-- end --> with MakeStream cleanup from #32387 pr/ipc-win.23

    <!-- begin push-6 -->

    Rebased 1a97f072f887ab95e2ac89b5cf1bc4a75b7255c6 -> 0a16f106c1862d33b64b683089e7aac84446ac69 (pr/ipc-wins.5 -> pr/ipc-wins.6, compare)<!-- end --> due to conflict with #34806

  8. ryanofsky referenced this in commit e563c968b4 on Apr 16, 2026
  9. ryanofsky referenced this in commit b42ec11a5c on Apr 16, 2026
  10. ryanofsky force-pushed on Apr 17, 2026
  11. ryanofsky force-pushed on Apr 17, 2026
  12. ryanofsky referenced this in commit d9fcac6e30 on Apr 17, 2026
  13. ryanofsky referenced this in commit c537b41d09 on Apr 17, 2026
  14. ryanofsky referenced this in commit f813f9f959 on Apr 17, 2026
  15. DrahtBot removed the label CI failed on Apr 17, 2026
  16. ryanofsky referenced this in commit 74fc8ac8c3 on Apr 17, 2026
  17. ryanofsky referenced this in commit 6d87dd7990 on Apr 17, 2026
  18. ryanofsky referenced this in commit 68e367a0aa on Apr 17, 2026
  19. ryanofsky referenced this in commit 97b3bc9e31 on Apr 17, 2026
  20. ryanofsky referenced this in commit eeac89b481 on Apr 17, 2026
  21. ryanofsky referenced this in commit e451de95b3 on Apr 17, 2026
  22. SirMentos-apt commented at 1:14 PM on April 20, 2026: none

    can run bitcoin core on WSL ?

  23. Sjors commented at 3:04 PM on April 20, 2026: member

    @SirMentos-apt: @hebasto might know.

  24. ryanofsky referenced this in commit 323eb3a169 on Apr 20, 2026
  25. ryanofsky force-pushed on Apr 21, 2026
  26. ryanofsky referenced this in commit e2872e28cb on Apr 21, 2026
  27. Sjors referenced this in commit b1199a5604 on Apr 22, 2026
  28. ryanofsky referenced this in commit 926ae3562e on Apr 22, 2026
  29. DrahtBot added the label Needs rebase on May 22, 2026
  30. ipc, moveonly: combine ipc_test.cpp and ipc_tests.cpp
    Previously ipc_test.cpp contained tests which depended on
    libmultiprocess and ipc_tests.cpp contained tests which didn't.
    Separation was needed because libmultiprocess tests need to be built
    with additional include and link paths, and cmake only has good support
    for setting these on libraries, not source files. The separation also
    allowed the add_boost_test custom cmake function to work with no changes,
    because it could find the boost test registration in ipc_tests.cpp, and
    then ipc_tests.cpp would run the tests in ipc_test.cpp without them
    needing to be registered in boost.
    
    But with windows support being added, the parse address test can't
    easily avoid a dependecy on libmultiprocess, because it depends on the
    ipc/process.h header, and ipc/process.h header will now need
    platform-specific ProcessId and SocketId types defined by
    libmultiprocess, rather than plain ints.
    
    With all ipc tests depending on libmultiprocess, there is not really a
    rationale for having separate test files anymore, so this change
    combines them, and move the cmake add_boost_test function definition so
    it can be used instead of target_sources to register ipc_tests.cpp with
    ctest.
    
    The change prevents CI errors from including ipc/process.h in
    ipc_tests.cpp:
    
    In file included from /Users/runner/work/bitcoin/bitcoin/repo_archive/src/ipc/test/ipc_tests.cpp:5:
    In file included from /Users/runner/work/bitcoin/bitcoin/repo_archive/src/ipc/process.h:11:
    /Users/runner/work/bitcoin/bitcoin/repo_archive/src/ipc/util.h:14:10: fatal error: 'kj/debug.h' file not found
       14 | #include <kj/debug.h>
    
    https://github.com/bitcoin/bitcoin/actions/runs/24465865499/job/71492617687?pr=35084
    5e2b81301c
  31. ipc, refactor: Drop connect/listen/serve exe_name parameters
    Pass exe_name parameter to ipc::Protocol class constructor instead. It never
    really made sense to have exe parameters as part of the protocol interface and
    removing them makes adding new features like windows support easier.
    
    The exe name values are only used for logging and debuggging purposes to
    distinguish log messages from different processes.
    0146b59ae4
  32. ipc, refactor: Change Protocol class field order
    This just changes Protocol class field order to make sure class members are not
    destroyed before the event loop thread exits. There is no change in behavior.
    The change is just being made to clarify intent and avoid potential bugs.
    7220a142f8
  33. ipc, refactor: use native path separators in test
    Avoid hardcoded forward slashes is ParseAddress test, use native path
    separators instead.
    4715190406
  34. ipc, refactor: fix include order
    Keep standard headers separate from posix headers
    19414bceea
  35. ipc, refactor: Add ProcessId type alias and use it
    Use ProcessId type instead of int to represent process ids to be
    compatible with an upcoming version of libmultiprocess which adds
    windows support.
    50877e6a8e
  36. ipc, refactor: Add SocketId type alias and use it
    Use SocketId type instead of int to represent socket ids to be
    compatible with an upcoming version of libmultiprocess which adds
    windows support.
    3cd19ce33a
  37. ipc, refactor: Add ConnectInfo type alias and use it
    Use ConnectInfo type instead of int to represent socket ids that are
    passed between processes, to be compatible with an upcoming version of
    libmultiprocess which adds windows support.
    22604e7130
  38. ipc, refactor: Add Stream type alias and use it
    Use Stream type to abstract socket ids and be compatible with updated
    mp::ConnectStream() and mp::ServeStream() functions that use streams
    instead of socket ids in an upcoming version of libmultiprocess which
    adds windows support.
    
    Since creating Stream objects from socket ids can require the event loop
    to be running, the ipc::Protocol::serve() method is also updated to
    accept the server stream though a callback parameter instead of a normal
    parameter.
    0a16f106c1
  39. ryanofsky force-pushed on May 29, 2026
  40. DrahtBot removed the label Needs rebase on May 29, 2026
  41. DrahtBot added the label CI failed on May 29, 2026
  42. DrahtBot removed the label CI failed on Jun 1, 2026

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: 2026-06-04 07:51 UTC

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