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

Descriptor unit tests and simplifications #24361

Closed
wants to merge 4 commits into from

Conversation

sipa
Copy link
Member

@sipa sipa commented Feb 16, 2022

Builds on top of #24343.

Adds additional tests, and makes ToPrivateString() always succeed, using pubkeys in case privkeys are unavailable.

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 17, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK achow101

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24149 (Signing support for Miniscript Descriptors by darosior)
  • #24148 (Miniscript support in Output Descriptors by darosior)
  • #22838 (descriptors: Be able to specify change and receiving in a single descriptor string by achow101)
  • #19602 (wallet: Migrate legacy wallets to descriptor wallets by achow101)

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.

@sipa
Copy link
Member Author

sipa commented Feb 17, 2022

Added a commit, suggested by @achow101, to merge ToString and ToPrivateString completely.

@luke-jr
Copy link
Member

luke-jr commented Feb 19, 2022

idk, I think it makes more sense to have two separate methods rather than different security-sensitivity based on an argument.

@sipa
Copy link
Member Author

sipa commented Apr 5, 2022

@luke-jr I don't think that's exactly it. If you provide a SigningProvider which happens to not contain the necessary private keys, it'll also use public ones. So I think it's better to think of it as there just being one function, which always takes a signing provider, and using its private keys. And then for convenience the ability to omit providing such a provider for the case where you just want an empty one.

@sipa
Copy link
Member Author

sipa commented Apr 5, 2022

Rebased.

@achow101
Copy link
Member

ACK 5f2af0c

@@ -103,7 +103,7 @@ def run_test(self):
'desc': descsum_create('wpkh(' + xpub_acc + ')'),
'timestamp': 1296688602,
}])
assert_raises_rpc_error(-4, 'Can\'t get descriptor string', watch_only_wallet.listdescriptors, True)
assert_equal(watch_only_wallet.listdescriptors(True), watch_only_wallet.listdescriptors(False))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this desired behaviour? Should we check that wallet doesn't have disable_private_keys enabled and return "wallet doesn't contain private keys" error?

Copy link
Member

@darosior darosior left a comment

Choose a reason for hiding this comment

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

Code looks good to me. But i agree with @S3RK we should not change the behaviour of the RPC API.

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@achow101
Copy link
Member

Are you still working on this?

@sipa
Copy link
Member Author

sipa commented Nov 8, 2022

I do plan to pick this up soon (perhaps after #26076).

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 6, 2023

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@fanquake
Copy link
Member

Drafted for now given it's (maybe) waiting on #26076.

@fanquake fanquake marked this pull request as draft February 16, 2023 15:24
@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@maflcko
Copy link
Member

maflcko commented May 17, 2023

Drafted for now given it's (maybe) waiting on #26076.

That one was merged last week.

@DrahtBot DrahtBot removed the request for review from achow101 May 17, 2023 06:14
@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@maflcko
Copy link
Member

maflcko commented Aug 15, 2023

@sipa ^

@sipa
Copy link
Member Author

sipa commented Aug 16, 2023

Leaving this as up for grabs. I still think it's a good idea, but don't have time to pursue it now.

@sipa sipa closed this Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants