-
Notifications
You must be signed in to change notification settings - Fork 223
Optionally pass BIP388 policy to signtx #792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sjors
wants to merge
29
commits into
bitcoin-core:master
Choose a base branch
from
Sjors:2025/07/policy-sign
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It was moved by bitcoin/bitcoin#31161
``` error: "/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu ``` https://github.com/bitcoin-core/HWI/actions/runs/16440824447/job/46462763374?pr=795
We can now use the main esp-idf toochain to install the appropriate version of the qemu emulator, rather than building it ourselves from source. Mirrors change recently made to Jade repo.
See e.g. https://github.com/bitcoin-core/HWI/actions/runs/16440824447/job/46463441252 ``` work/bitcoin/build/bin/bitcoind: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by work/bitcoin/build/bin/bitcoind) ```` Job lingered for 45 minutes.
Seems to be no longer needed: Coldcard/firmware#537 Related CI failure: https://github.com/bitcoin-core/HWI/actions/runs/16464204169/job/46537622260?pr=797
Manually re-applied the patch after the original code seems to have moved around a bit.
``` ERROR: coldcard: test_signtx (test_device.TestSignTx.test_signtx) (addrtypes=['legacy'], multisig_types=['legacy'], external=True, op_return=False) ---------------------------------------------------------------------- Traceback (most recent call last): File "/__w/HWI/HWI/test/test_device.py", line 588, in test_signtx self._test_signtx(addrtypes, multisig_types, external, op_return) File "/__w/HWI/HWI/test/test_device.py", line 576, in _test_signtx self._generate_and_finalize(True, psbt) File "/__w/HWI/HWI/test/test_device.py", line 403, in _generate_and_finalize self.assertTrue(first_sign_res["signed"]) ~~~~~~~~~~~~~~^^^^^^^^^^ KeyError: 'signed' ```
This reverts commit edab2af. The always() option is too powerfull. The next commit implements an alternative solution to the original issue.
This ensures the failure to build a simulator for one device doesn't abort running jobs for the others. They're still grouped by manufacturer. Alternative to bitcoin-core#743.
Build failure on ubuntu-latest: ``` ../py/stackctrl.c: In function ‘mp_stack_ctrl_init’: ../py/stackctrl.c:32:32: error: storing the address of local variable ‘stack_dummy’ in ‘mp_state_ctx.thread.stack_top’ [-Werror=dangling-pointer=] 32 | MP_STATE_THREAD(stack_top) = (char *)&stack_dummy; ../py/stackctrl.c:31:18: note: ‘stack_dummy’ declared here 31 | volatile int stack_dummy; | ^~~~~~~~~~~ In file included from ../py/runtime.h:29, from ../py/stackctrl.c:27: ../py/mpstate.h:282:23: note: ‘mp_state_ctx’ declared here 282 | extern mp_state_ctx_t mp_state_ctx; | ^~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [../py/mkrules.mk:77: build/py/stackctrl.o] Error 1 ``` Test failure (after downgrading build sim): ``` File "/github/home/.cache/pypoetry/virtualenvs/hwi-crEDFiR--py3.9/lib/python3.9/site-packages/sdl2/dll.py", line 362, in <module> dll = DLL("SDL2", ["SDL2", "SDL2-2.0", "SDL2-2.0.0"], os.getenv("PYSDL2_DLL_PATH")) File "/github/home/.cache/pypoetry/virtualenvs/hwi-crEDFiR--py3.9/lib/python3.9/site-packages/sdl2/dll.py", line 253, in __init__ raise RuntimeError("could not find any library for %s (%s)" % RuntimeError: could not find any library for SDL2 (PYSDL2_DLL_PATH: unset) ``` https://github.com/bitcoin-core/HWI/actions/runs/16466809973/job/46548656293?pr=795
The build on ubuntu-latest succeeds, but the resulting binary uses a too recent version of glibc for the test runners to handle. This only seems to impact Trezor 1, but just downgrade for Trezor T as well.
NanoS support has been dropped: LedgerHQ/app-bitcoin-new#262 NanoX also makes it possible to test MuSig2 in the future. Keep NanoS for legacy.
d369a27
to
479f88b
Compare
72ff9ac
to
af05f6a
Compare
af05f6a
to
31a9714
Compare
31a9714
to
dfd11e0
Compare
Coldcard CI failure is probably spurious. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another step towards #785.
Usage:
First register a policy with #791, #647, MooSig or some other method.
Construct a PSBT.
And then try to sign it.
It's easiest to test this with just a single sig wallet. Using #791 you can easily register it and get an hmac (even though registration isn't mandatory).
If you want to try with MuSig, you'll need either #784 or use a Bitcoin Core branch with PSBTv2 support (bitcoin/bitcoin#21283). I still need to test both these approaches.
Strongly overlaps with #647, but this implements signing independent of registration.
Based on: