-
Notifications
You must be signed in to change notification settings - Fork 403
rpc: use importdescriptors
with Core >= 0.21
#628
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
Merged
notmandatory
merged 1 commit into
bitcoindevkit:master
from
afilini:feat/rpc-use-descriptor-wallets
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
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.
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.
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.
22.0 and before were already supported previously, since we were always creating legacy wallets and using importmulti.
With this PR we add support for 23 which uses descriptor wallets by default, and change a bit the way we interact with wallets 0.21 and up.. but they were already supported before, so from the user's perspective I guess the only change is that now they can use it with 23 while previously they couldn't
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.
But in this PR the CI is testing with
electrsd/bitcoind_22_0
fortest-electrum
,test-rpc
andtest-esplora
, and when I tried changing these tobitcoind_23_0
the tests hung and failed fortest-electrum
andtest-rpc
, I have some notes in the (resolved) comment above.Since we're not adding any new support for rpc with core 23 how about I remove the changelog message instead?
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 I see what you mean. I would keep it there because we've actually added support for 23, it's just the automated tests that are still failing.
I guess the confusion comes from the fact that my original issue was referring to the tests against 23 failing, but in fact it was not just the tests, it was BDK being completely broken with 23.0. So now this PR fixed BDK so that it can properly interact with newer nodes, but since the tests are still failing somewhere in our mechanism to automate them, I kept the tests running against 22.
I tested it manually by switching the bitcoind feature to use bitcoin 23 and running the
rpcwallet
example, which internally spawns a core node with electrsd, and it works just fine. Same thing for older versions compared to what we test for, it works fine all the way back to 0.18.1. It's just again the tests hanging with core < 0.20 for some reason.I'm attaching here the logs for the 23.0 and 0.18.1 run, they are a bit messy because there's the stdout from Core itself, plus logging from bdk and bitcoincore_rpc so that you can see all the calls being made. You'll notice that with the old node we use
importmulti
, while with the newer one we useimportdescriptors
which is what I implemented in this PR.So long story short, BDK works with 23 now, we just have to figure out how to run automated tests reliably against it!
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.
Ok that's great! I won't take your changelog message out and @rajarshimaitra and I are going to keep working on how to fix the automated tests.