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
key, rpc: fix key parsing #2682
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 8674101. This assumption is not solid for any pre-5.4.0.0 wallets which can contain OpenSSL generated keys.
Rationale: HEX encoded keys do not denote enough information on whether the key should be used with compressed or uncompressed public keys. Even though these interfaces should not be affected, better be consistent than sorry.
Rationale: Our DER parser is not sophisticated enough to determine whether the provided key should be accompanied by a compressed or uncompressed public key, so just accept WIF which already has that data.
|
jamescowens
reviewed
Apr 23, 2023
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.
tACK
jamescowens
added a commit
to jamescowens/Gridcoin-Research
that referenced
this pull request
Apr 23, 2023
This is an _important_ leisure release and follows right on the heals of 5.4.4.0, because we fixed one thing only to break another in a worse way. By worse I mean that some people with old keys could get a corrupt wallet message on startup. In troubleshooting this issue, as it turns out, there is more to the story than just the compressed flag not being set properly. Gridcoin has been around a long time. A number of older wallets may have keys generated by openssl that aren't handled correctly by the secp256k1 DER parser. We switched over to secp256k1 from openssl for keys in 5.4.0.0, to align with Bitcoin upstream. It is not entirely clear why Bitcoin does not see this issue with old keys. Regardless, to be safe, we have disabled the ability to import HEX formatted keps with importprivkey. This loss of HEX import functionality should affect essentially no one, since the Base58, WIF, form is what everybody uses. *It is highly recommended that EVERYONE upgrade to this release.* Added none Changed none Removed none Fixed - key, rpc: fix key parsing gridcoin-community#2682 (@div72)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2681.