-
Notifications
You must be signed in to change notification settings - Fork 11
MuSig2 power #91
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
base: master
Are you sure you want to change the base?
MuSig2 power #91
Conversation
7b0dd9f
to
f842cae
Compare
2ecd3b6
to
0f809dd
Compare
Previously, to determine if a desc is watchonly, `ToPrivateString()`, was used. It returns `false` if there is at least one pubkey in the descriptor that does not have a private key. ToPrivateString() behaviour will change in the following commits to only return false if no priv keys could be found for the pub keys in the descriptor. IsWatchOnly() is added here to replace the use of ToPrivateString() for determining if a descriptor is 'watchonly'. Co-authored-by: rkrux <rkrux.connect@gmail.com>
ToPrivateString() behaviour will be modified in the following commits. This change ensures that wallet migration does not break.
- Refactor Descriptor::ToPrivateString() to allow descriptors with missing private keys to printed. Useful in descriptors with multiple keys e.g tr() etc. - The existing behaviour of listdescriptors is preserved as much as possible, if no private keys are availablle ToPrivateString will return false
unused() descriptors do not have scriptPubKeys. Instead, the wallet uses them to store keys without having any scripts to watch for.
A helper method to obtain all unused(key) descriptor SPKMs.
When a wallet contains only an unused(KEY) descriptor, use it. Previously the user would have to call listdescriptors and manually specify it.
Invert any_key_parsed so that the name matches the behavior.
There will be other functions within MutableTransactionSignatureCreator that need to compute the same sighash, so make it a separate member function.
Adds GetMuSig2SecNonces which returns secp256k1_musig_secnonce*, and DeleteMuSig2Session which removes the MuSig2 secnonce from wherever it was retrieved. FlatSigningProvider stores it as a pointer to a map of session id to secnonce so that deletion will actually delete from the object that actually owns the secnonces. The session id is just a unique identifier for the caller to determine what secnonces have been created.
Expand taproot tests to cover avoid_script_path in walletprocesspsbt. When avoiding script paths, there's no need for the workaround that increases fee_rate to compensate for the wallet's inability to estimate fees for script path spends. We use this to indirectly test that key path was used. We also check that taproot_script_path_sigs is not set. Finally, for transactions that can't be signed using their key path, we try again by allowing the script path. Additional test extended private keys were extracted from other tests.
Conflicts: src/script/sign.cpp Using m_options.sighash_type
Conflicts: src/wallet/external_signer_scriptpubkeyman.h src/wallet/rpc/wallet.cpp
An earlier merge commit contained an outdated version of this.
…ys' into 2025/06/musig2-power
c524af5
to
66705f3
Compare
Fresh rebase after bitcoin#31244 landed. |
External signer enabled wallets should always use the process PSBT flow. Avoid going through CreateTransaction. This has no effect until the next commit when WALLET_FLAG_EXTERNAL_SIGNER no longer implies WALLET_FLAG_DISABLE_PRIVATE_KEYS. Without this change signing with the GUI would break for external signers with private keys enabled.
Also document it and take a reference.
BIP 379 allows height and time locks that have no consensus meaning in BIP 68 / BIP 112. This is used by some protocols like Lightning to encode extra data, but is unsafe when used unintentionally. E.g. older(65536) is equivalent to older(1). This commit prevents accidental import of such descriptors. They will be rejected unless marked 'unsafe' in importdescriptors. Wallets that already contain such a descriptor are not impacted.
Added bitcoin#33135 and the latest change to bitcoin#33008 (storing one hmac record per policy and fingerprint combination). |
The The fixup commits reflect changes made to the original branches. I'll up the commit history occasionally when one of its dependencies lands. |
Combines the following:
addhdkey
RPC to add just keys to wallets via newunused(KEY)
descriptor bitcoin/bitcoin#29136Best combined with bitcoin-core/HWI#794.
Update note to self:
(update master on the fork repo if needed)