Skip to content
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

BIP-0386: Fix uncompressed private key test vector #1631

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

azuchi
Copy link
Contributor

@azuchi azuchi commented Jul 6, 2024

Base58 in the WIF format is case sensitive.
The following Test Vector will result in an error indicating the WIF version is invalid, regardless of the compression state of the public key.

5kyzdueo39z3fprtux2qbbwgnnp5ztd7yyr2sc1j299sbcnwjss

The following is probably what was intended:

5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss

@murchandamus murchandamus added Proposed BIP modification Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Jul 8, 2024
@@ -101,7 +101,7 @@ Valid descriptors followed by the scripts they produce. Descriptors involving de

Invalid Descriptors

* Uncompressed private key: <tt>tr(5kyzdueo39z3fprtux2qbbwgnnp5ztd7yyr2sc1j299sbcnwjss)</tt>
* Uncompressed private key: <tt>tr(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)</tt>
Copy link
Member

@jonatack jonatack Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change LGTM

before

$ ./src/bitcoin-cli getdescriptorinfo "tr(5kyzdueo39z3fprtux2qbbwgnnp5ztd7yyr2sc1j299sbcnwjss)"             
error code: -5
error message:
tr(): key '5kyzdueo39z3fprtux2qbbwgnnp5ztd7yyr2sc1j299sbcnwjss' is not valid

after

$ ./src/bitcoin-cli getdescriptorinfo "tr(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)"
error code: -5
error message:
tr(): Uncompressed keys are not allowed

and with this change, returns the same error as the example on the following line (105)

$ ./src/bitcoin-cli getdescriptorinfo "tr(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)"
error code: -5
error message:
tr(): Uncompressed keys are not allowed

KamPuc86zg

This comment was marked as off-topic.

@jonatack
Copy link
Member

cc @achow101 for feedback

@achow101
Copy link
Member

ACK 7acfe20

@jonatack jonatack removed the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label Aug 14, 2024
@jonatack
Copy link
Member

Thank you @azuchi @achow101

@jonatack jonatack merged commit 34f3453 into bitcoin:master Aug 14, 2024
3 checks passed
@bitcoin bitcoin deleted a comment from Vahid1201 Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants