-
Notifications
You must be signed in to change notification settings - Fork 38.8k
PSBT key path cleanups #13723
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
PSBT key path cleanups #13723
Conversation
db01d22 to
2585c57
Compare
|
Concept ACK Thanks for taking another look at this code |
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial utACK. Nice refactors that improve code readability. Some nits regarding code style.
src/script/sign.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit "Make SigningProvider expose key origin information"
nit CKeyID& keyid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/wallet/wallet.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit "Make SigningProvider expose key origin information"
nit, remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/script/sign.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit "Make SigningProvider expose key origin information"
nit, CKeyID& address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/script/sign.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit "Generalize PublicOnlySigningProvider into HidingSigningProvider"
nit, CKeyID& keyid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/script/sign.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit "Generalize PublicOnlySigningProvider into HidingSigningProvider"
nit, CScriptID& scriptid and some more below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8afec13 to
8cd99d5
Compare
achow101
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this change be part of the earlier " Generalize PublicOnlySigningProvider into HidingSigningProvider" commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be, but doesn't matter. There is no bip32 information in SignatureData until this commit.
8cd99d5 to
8bfa106
Compare
src/script/sign.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit "Make SigningProvider expose key origin information"
You should change address to keyid in this commit instead of "Generalize PublicOnlySigningProvider into HidingSigningProvider"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
8bfa106 to
f6ba1ca
Compare
Note to reviewers: 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. |
|
utACK f6ba1ca1e51d044b6fc8398edfa4dd03061572c4 |
f6ba1ca to
8df185b
Compare
|
Rebased. |
669d72f to
917353c
Compare
| } | ||
|
|
||
| void AddKeypathToMap(const CWallet* pwallet, const CKeyID& keyID, std::map<CPubKey, std::vector<uint32_t>>& hd_keypaths) | ||
| void AddKeypathToMap(const CWallet* pwallet, const CKeyID& keyID, std::map<CPubKey, KeyOriginInfo>& hd_keypaths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is no longer called.
|
re-utACK 917353c |
917353c Make SignPSBTInput operate on a private SignatureData object (Pieter Wuille) cad5dd2 Pass HD path data through SignatureData (Pieter Wuille) 03a9958 Implement key origin lookup in CWallet (Pieter Wuille) 3b01efa [MOVEONLY] Move ParseHDKeypath to utilstrencodings (Pieter Wuille) 81e1dd5 Generalize PublicOnlySigningProvider into HidingSigningProvider (Pieter Wuille) 84f1f1b Make SigningProvider expose key origin information (Pieter Wuille) 611ab30 Introduce KeyOriginInfo for fingerprint + path (Pieter Wuille) Pull request description: This PR adds "key origin" (master fingeprint + key path) information to what is exposed from `SigningProvider`s, allowing this information to be used by the generic PSBT code instead of having the RPC pull it directly from the wallet. This is also a preparation to having PSBT interact with output descriptors, which can then directly expose key origin information for the scripts they generate. Tree-SHA512: c718382ba8ba2d6fc9a32c062bd4cff08b6f39b133838aa03115c39aeca0f654c7cc3ec72d87005bf8306e550824cd8eb9d60f0bd41784a3e22e17b2afcfe833
merge bitcoin#13269, bitcoin#13425, bitcoin#13557, bitcoin#13721, bitcoin#13666, bitcoin#13723: BIP 174 PSBT Serializations and RPCs
This PR adds "key origin" (master fingeprint + key path) information to what is exposed from
SigningProviders, allowing this information to be used by the generic PSBT code instead of having the RPC pull it directly from the wallet.This is also a preparation to having PSBT interact with output descriptors, which can then directly expose key origin information for the scripts they generate.