This PR adds explicit tests for Bitcoin Core’s MuSig2 interface.
Any issues in musig2.{cpp,h} will likely also be caught by the descriptor tests, but having more detailed tests for the MuSig2 class itself improves test reporting/coverage.
It uses BIP 328 test vectors.
XOnlyPubKey: Add GetCPubKeys
We need to retrieve the even and odd compressed pubkeys for xonly
pubkeys, so add a function to do that. Also reuse it in GetKeyIDs.
5fe4c66462
script/parsing: Allow Const to not skip the found constant4b135f80d0
util/string: Allow Split to include the separator
When splitting a string, sometimes the separator needs to be included.
Split will now optionally include the separator at the end of the left
side of the splits, i.e. it appears at the end of the splits, except
for the last one.
sign: Add GetAggregateParticipantPubkeys to SigningProviderb9c4096beb
Add MuSig2 Keyagg Cache helper functions
secp256k1 provides us secp256k1_musig_keyagg_cache objects which we are
used as part of session info and to get the aggregate pubkey. These
helper functions help us convert to/from the secp256k1 C objects into
the Bitcoin Core C++ objects.
#32489 (wallet: Add exportwatchonlywallet RPC to export a watchonly version of a wallet by achow101)
#32471 (wallet/rpc: fix listdescriptors RPC fails to return descriptors with private key information when wallet contains descriptors missing any key by Eunovo)
#32332 (refactor: Update XOnlyPubKey::GetKeyIDs() to return a pair of pubkeys by w0xlt)
#30243 (descriptors: taproot partial descriptors by Eunovo)
#29675 (wallet: Be able to receive and spend inputs involving MuSig2 aggregate keys by achow101)
#26812 (test: add end-to-end tests for CConnman and PeerManager 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.
DrahtBot added the label
CI failed
on Jun 11, 2025
DrahtBot
commented at 3:08 am on June 11, 2025:
contributor
🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/runs/43856471515
LLM reason (✨ experimental): The CI failure is caused by a trailing whitespace error detected in src/test/musig2.cpp.
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.
w0xlt force-pushed
on Jun 11, 2025
w0xlt force-pushed
on Jun 11, 2025
[test] Add MuSig2 tests (BIP 328 test vectors)4b85dbd5bc
w0xlt force-pushed
on Jun 11, 2025
DrahtBot removed the label
CI failed
on Jun 11, 2025
rkrux
commented at 10:47 am on June 12, 2025:
contributor
I feel this PR should be in draft until #31244 is merged as all the commits here are from that PR except the last one.
Though the last commit can be reviewed separately.
brunoerg
commented at 6:37 pm on June 12, 2025:
contributor
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-15 06:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me