Reintroduce external signer support for Windows#29868
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29868. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
cf6a4b2 to
5e50b3d
Compare
Looks like there are now? |
c05204c to
718e11c
Compare
|
Rebased. |
718e11c to
a0f3fc9
Compare
|
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
a0f3fc9 to
0202082
Compare
|
Rebased on top of the merged #29910. |
| /* | ||
| ~Popen() | ||
| { | ||
| #ifdef __USING_WINDOWS__ |
There was a problem hiding this comment.
#29961 removes this, that's the only conflict I found.
|
Tested the Guix build on Windows 11. Code changes look reasonable, but Windows stuff is not my expertise... |
0202082 to
db73ac8
Compare
|
Rebased to resolve conflicts with the merged #29774. |
cc @sipsorcery :) |
|
Concept ACK |
5541ef0 to
ed41f61
Compare
|
Rebased. Picked @luke-jr's suggestion. |
ed41f61 to
86c7c65
Compare
|
Tested 86c7c65 on Windows 11 against HWI 3.1.0 on testnet4. It crashes immediately after creating a new wallet from a Trezor model T. The debug log shows nothing useful, except that it didn't import descriptors. cc @achow101 The output of The wallet ends up blank with no descriptors. Guix hashes: |
86c7c65 to
f9e26d7
Compare
f9e26d7 to
7806529
Compare
|
Rebased on #32358 and drafted until the latter is landed. |
7806529 to
73ab0a4
Compare
cd95c9d subprocess: check and handle fcntl(F_GETFD) failure (Tomás Andróil) b7288de subprocess: Proper implementation of wait() on Windows (Haowen Liu) 7423214 subprocess: Do not escape double quotes for command line arguments on Windows (Hennadii Stepanov) bb9ffea subprocess: Explicitly define move constructor of Streams class (Shunsuke Shimizu) 174bd43 subprocess: Avoid leaking POSIX name aliases beyond `subprocess.h` (Hennadii Stepanov) 7997b76 subprocess: Fix cross-compiling with mingw toolchain (Hennadii Stepanov) 6476304 subprocess: Get Windows return code in wait() (Haowen Liu) d3f511b subprocess: Fix string_arg when used with rref (Haowen Liu) 2fd3f2f subprocess: Fix memory leaks (Haoran Peng) Pull request description: Most of these changes were developed during work on #29868 and #32342 and have since been upstreamed. As they are now merged, this PR backports them to our `src/util/subprocess.h` header. Required for #29868. A list of the backported PRs: - arun11299/cpp-subprocess#106 - arun11299/cpp-subprocess#110 - arun11299/cpp-subprocess#109 - arun11299/cpp-subprocess#99 - arun11299/cpp-subprocess#112 - arun11299/cpp-subprocess#107 - arun11299/cpp-subprocess#113 - arun11299/cpp-subprocess#116 - arun11299/cpp-subprocess#117 The following PRs were skipped for backporting: - arun11299/cpp-subprocess#108 because we are not planning to support this feature. - arun11299/cpp-subprocess#101 because that change has been already landed in #29849. ACKs for top commit: theStack: Light ACK cd95c9d laanwj: Code review re-ACK cd95c9d Tree-SHA512: f9b60b932957d2e1cad1d87f2ad8bb68c97136e9735eb78547018a42cc50c4652750367f29462eadb0512c27db1dd8a7d4b17a2f0aeab62b3dbf86db5f51a61c
|
Rebased and undrafted. |
|
ACK 3a18075.
This still happens, but it seems only on testnet4, e.g. not on mainnet and not on signet (didn't try testnet3). It also happens on macOS 15.4.1, so it's clearly unrelated. Update: it's because bitcoin-core/HWI#771 isn't in the latest HWI release yet (v3.1.0). On Windows 11 I was able to create a new wallet with the GUI, verify an address and make a transaction. I did not test handling errors from HWI. |
|
@hebasto fixed, that was from a different PR, but I checked that I used the right commit for my Windows guix build. |
|
Friendly ping @achow101 @theStack @luke-jr @sipsorcery :) |
|
Can we set "30.0" milestone here? |
|
My Guix build: |
theStack
left a comment
There was a problem hiding this comment.
Light ACK 3a18075
Cross-compiled for Windows from a Linux machine using mingw-w64 and ran the involved unit and functional tests on a Windows 10 machine (needed to adapt the paths ./test/config.ini manually on the target system, like also done in the CI job):
>.\build\bin\test_bitcoin.exe --run_test=system_tests/run_command
Running 1 test case...
*** No errors detected
>python.exe .\build\test\functional\rpc_signer.py
2025-05-09T14:17:19.535000Z TestFramework (INFO): PRNG seed is: 1291717054418451415
2025-05-09T14:17:19.596000Z TestFramework (INFO): Initializing test directory C:\Users\thestack\AppData\Local\Temp\bitcoin_func_test_6_lj29gg
2025-05-09T14:17:21.525000Z TestFramework (INFO): Stopping nodes
2025-05-09T14:17:21.750000Z TestFramework (INFO): Cleaning up C:\Users\thestack\AppData\Local\Temp\bitcoin_func_test_6_lj29gg on exit
2025-05-09T14:17:21.750000Z TestFramework (INFO): Tests successful
>python.exe .\build\test\functional\wallet_signer.py
2025-05-09T14:17:38.230000Z TestFramework (INFO): PRNG seed is: 5844070588042404732
2025-05-09T14:17:38.280000Z TestFramework (INFO): Initializing test directory C:\Users\thestack\AppData\Local\Temp\bitcoin_func_test_w0lar663
2025-05-09T14:17:39.823000Z TestFramework (INFO): Test walletdisplayaddress
2025-05-09T14:17:41.079000Z TestFramework (INFO): Prepare mock PSBT
2025-05-09T14:17:42.235000Z TestFramework (INFO): Test send using hww1
2025-05-09T14:17:42.507000Z TestFramework (INFO): Test sendall using hww1
2025-05-09T14:17:42.771000Z TestFramework (INFO): Prepare fee bumped mock PSBT
2025-05-09T14:17:42.776000Z TestFramework (INFO): Test bumpfee using hww1
2025-05-09T14:17:43.746000Z TestFramework (INFO): Test invalid external signer
2025-05-09T14:17:44.668000Z TestFramework (INFO): Test multiple external signers
2025-05-09T14:17:44.881000Z TestFramework (INFO): Stopping nodes
2025-05-09T14:17:45.038000Z TestFramework (INFO): Cleaning up C:\Users\thestack\AppData\Local\Temp\bitcoin_func_test_w0lar663 on exit
2025-05-09T14:17:45.038000Z TestFramework (INFO): Tests successful
Didn't try any real HWI interaction. I think a release note makes sense here so that Windows users are aware they can externally sign again. A counterpart to
bitcoin/doc/release-notes/release-notes-27.0.md
Lines 96 to 101 in b070ce1
This PR partially reverts:
system_tests/run_command#29489After this PR, we can proceed to actually remove the unused code from
src/util/subprocess.h.