Conversation
Owner
Author
|
I've tested this against rust-bitcoin/rust-miniscript#470, and i need it for Minisafe's functional testing framework. I'll mention it explicitly as experimental. |
darosior
added a commit
to wizardsardine/liana
that referenced
this pull request
Oct 28, 2022
117171f commands: use a separate key chain for change addresses (Antoine Poinsot) d9f905a db: track the next unused derivation index for change, too (Antoine Poinsot) 58a0e57 db: record whether a coin was received on a change address (Antoine Poinsot) 9b04a55 db: store derivation index also for addresses from the change desc (Antoine Poinsot) 4f3daa7 descriptors: cache the receive and change descriptors (Antoine Poinsot) ca3d7c1 descriptors: introduce a newtype for the multipath descriptor (Antoine Poinsot) 1320ee3 daemon: use multipath descriptors (Antoine Poinsot) d4db804 qa: add a missing 'wait_for' in spend creation test (Antoine Poinsot) 7a18c58 bitcoind: filter received coins based on parent descriptors (Antoine Poinsot) ba4c1e0 bitcoind: include change outputs in listsinceblock (Antoine Poinsot) caaca1f descriptors: rename derive into derive_received (Antoine Poinsot) f985fd7 descriptors: remove as_inner method (Antoine Poinsot) 846d924 qa: upgrade python-bip380 to latest master (Antoine Poinsot) 3105b86 Use my own fork of rust-miniscript (Antoine Poinsot) Pull request description: This fixes #18 by implementing the de-facto standard of using a `/0/*` keychain for receiving addresses and a `/1/*` keychain for change addresses. Note that once we'll have multisig, reusing addresses will still be possible since wallet don't share the same "next derivation index". In order to avoid forcing the user to configure and backup two almost identical descriptors, we make use of the recently proposed BIP389 (bitcoin/bips#1354). In order to prevent as much as possible introducing a backward incompatibility in the configuration file after the first release, we restrict the usage of multipath descriptors to `<0;1>` here. We now derive public keys from `xpub/0/*` and `xpub/1/*` while we were previously deriving them from `xpub/*`. This triggered a pretty invasive refactoring, as most parts of the codebase had to be updated to support the new change/receive separation (even the functional test miniscript dependency had to be updated, see darosior/python-bip380#21). Broadly, this: 1. Update our Miniscript dependency to my upstream PR (rust-bitcoin/rust-miniscript#470) rebased on top of the 8.0.0 release. 2. Updates the descriptors module to handle somewhat safely the multipath descriptors (to avoid mixing up the single, multi, and derived descriptors). 3. Makes a multipath descriptor mandatory in the configuration file. 4. Updates the Bitcoin backend poller aware of descriptors for which to track coins. - Necessarily this updates the bitcoind implementation to import two descriptors 5. Record in database whether a coin was for the change or receive descriptor, in addition to its derivation index ACKs for top commit: edouardparis: ACK 117171f Tree-SHA512: efcb7267f1ba6a5a3072e96fd1c70272f81092e86ee1178833f83d0aa88f271f42c269b71ca9992e76bb3e103baf1a189a609cc20f14f29b7388ab133da99044
Owner
Author
|
Note for posterity: the last commit making the |
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
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.
This implements BIP389 "Multipath Descriptor Key Expressions" (see bitcoin/bips#1354).