The latter is not quite trivial, and notably the final commit required a change from h to ' for hardened marker.
[25.x] descriptors: Disallow hybrid keys, and disallow uncompressed keys when inferring #28677
pull luke-jr wants to merge 5 commits into bitcoin:25.x from luke-jr:descr_disallow_hybrid_and_uncompr_pubkeys-25.1 changing 4 files +172 −14-
luke-jr commented at 8:39 PM on October 18, 2023: member
-
ae3a6ab04f
descriptors: disallow hybrid public keys
The descriptor documentation (doc/descriptors.md) and BIP380 explicitly require that hex-encoded public keys start with 02 or 03 (compressed) or 04 (uncompressed). However, the current parsing/inference code permit 06 and 07 (hybrid) encoding as well. Fix this. Github-Pull: #28587 Rebased-From: c1e6c542af6d89a499e2a65465865aec651c4d67
-
cc6d6f301b
descriptors: Check result of InferPubkey
InferPubkey can return a nullptr, so check it's result before continuing with creating the inferred descriptor. Github-Pull: #28602 Rebased-From: b7485f11ab3a0f1860b261f222362af3301e0781
-
549401a089
descriptors: Move InferScript's pubkey validity checks to InferPubkey
Github-Pull: #28602 Rebased-From: 37b9b734770e855b9beff3b5085125f1420dd072
-
3ca5d9b6ef
test: Scripts with hybrid pubkeys are migrated to watchonly
Descriptors disallows hybrid pubkeys. Anything with hybrid pubkeys should becomes a raw() descriptor that shows up in the watchonly wallet. Github-Pull: #28602 Rebased-From: f895f97014ac5fac46d27725c1ea7decf7ff76d4
-
98208a813c
test: Unit test for inferring scripts with hybrid and uncompressed keys
Github-Pull: #28602 Rebased-From: 74c77825e5ab68bfa575dad86444506c43ef6c06
-
DrahtBot commented at 8:39 PM on October 18, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
- DrahtBot added the label Backport on Oct 18, 2023
- DrahtBot added the label CI failed on Oct 18, 2023
-
darosior commented at 6:57 AM on October 19, 2023: member
Is it really worth it? Most likely nobody is using descriptors with hybrid keys. And if anybody is it'd just prevent them to upgrade to the point release with all the actual bugfixes we may backport in the future?
-
fanquake commented at 3:00 PM on October 20, 2023: member
Closing for now.
- fanquake closed this on Oct 20, 2023
- bitcoin locked this on Oct 19, 2024