-
Notifications
You must be signed in to change notification settings - Fork 37.7k
rpc: getdescriptorinfo also returns normalized descriptor #29396
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
rpc: getdescriptorinfo also returns normalized descriptor #29396
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, 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. |
|
Concept ACK. To fix the error you need to declare new response field. (see around line no. 183) |
53d47c0
to
9cf7092
Compare
I'm getting an error in one the functional tests cases in A fix would be changing the derivation path from
I'm not sure if this change would go against the objectives of the test. |
You are adding a new field, existing tests should not fail. That means either your test changes to test the new field are incorrect, or your code is incorrect. |
For the case of hardened derivation path, I guess that instead of throwing a |
utACK 9cf7092. |
...it's documented herein as working :\ |
I'm not sure on how to handle this case. I've looked through the docs but it remains unclear if I should adapt the test suite to encompass the new functionality or if the issue is within the new code itself. |
62e7e78
to
21f1d55
Compare
info = self.nodes[0].getdescriptorinfo(desc) | ||
assert_equal(info, self.nodes[0].getdescriptorinfo(descsum_create(desc))) | ||
assert_equal(info['descriptor'], descsum_create(desc)) | ||
assert_equal(info['normalizeddescriptor'], expected_normalized_desc_with_checksum) |
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.
This test is never called with a hardened path derivation, so it actually never checks the new logic
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.
Isn't this a hardened path derivation?
self.test_desc("pkh(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1h/2)", isrange=False, issolvable=True, hasprivatekeys=False) |
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.
ah, yes. Missed that. Still "descriptor" and "normalizeddescriptor" are always the same, so it's still not clear why the new field is needed.
🐙 This pull request conflicts with the target branch and needs rebase. |
Are you still working on this? |
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Closing for now. The issue remains open (#29320) and discussion can continue there. This can also be picked up again, a fresh pull can be created, or it can be re-opened. |
This pull request introduces enhancements to the getdescriptorinfo RPC command, specifically by incorporating the functionality to return the
normalized_descriptor
alongside the originaldescriptor
information. This improvement addresses the need for a standardized format that facilitates the use of descriptors in public key operations, especially important for scenarios requiring the derivation of addresses without access to private keys.Related issue: #29320