-
Notifications
You must be signed in to change notification settings - Fork 307
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
wallet: finalize_psbt
should clear BIP32 derivations
#1461
Comments
I've have recently worked into these nitty details into the For production, the step 4 of BIP 174 (Finalizer) should be done with the I am not familiarized with the |
Replaying this comment here from discord: Clearing |
I'm also a fan of |
The original issue for |
If the bip 174 spec says to clear all fields then I think that should be the default, and maybe only option. I don't recall a reason to not clear the fields after finalize. I also prefer using the rust-bitcoin .finalize_mut function instead of existing code, which was probably done before .finalize_mut was available. |
A couple reasons in my estimation why we're not currently using
It might be possible to totally replace the current |
If using rust-bitcoin's |
According to BIP174 after building the final scriptWitness and scriptSig "all other data except the UTXO and unknown fields in the input key-value map should be cleared from the PSBT". This would include the BIP32 derivation paths for known pubkeys.
To Reproduce
Additional context
I seem to recall @notmandatory mentioned there is a reason for having more granularity in choosing which fields should remain as opposed to just clearing the necessary fields by default. Is that still the case?
The text was updated successfully, but these errors were encountered: