psbt: Implement BIP 370 PSBTv2#549
Merged
achow101 merged 15 commits intobitcoin-core:masterfrom Feb 3, 2022
Merged
Conversation
9050271 to
2ac9468
Compare
6956dc4 to
dd00ce8
Compare
Closed
468c642 to
b86f144
Compare
695920d to
a8ebd34
Compare
get_txout returns a CTxOut
Avoid accessing psbt.tx and instead use the PSBTv2 fields and interface
achow101
added a commit
that referenced
this pull request
Feb 28, 2022
daeec1d ledger: Try legacy protocol when unable to sign multisigs (Andrew Chow) 711e6ba ledger: P2WSH display is also not supported (Andrew Chow) 6df9c1b ledger: Detect when a ledger is not in a Bitcoin app (Andrew Chow) edbb7c0 ledger: document multisig limitation (Andrew Chow) 6b8381e tests: Use external keys for some multisigs (Andrew Chow) 4f223a5 test: Include xpubs in psbt (Andrew Chow) f3f20e0 tests, ledger: Test multisigs (Andrew Chow) ac66cbc tests: additional speculos automation things (Andrew Chow) dffd014 ledger: Support multisigs (Andrew Chow) ae2adb5 key: Add from_bytes to ExtendedKey (Andrew Chow) ef1cf9d docs: Document Taproot signing (Andrew Chow) 3953000 tests: Don't rely on coin selection for signtx tests (Andrew Chow) cb6b352 tests: Use --chain test more consistently (Andrew Chow) 30b42e4 ci: Test ledger legacy api (Andrew Chow) 3b0680d tests: Test Taproot on Ledger (Andrew Chow) 8536786 ledger: Remove btchip (Andrew Chow) c154cf7 ledger: Use ledger_bitcoin rather than btchip (Andrew Chow) b645164 ledger_bitcoin: Change LegacyClient.sign_psbt to return pubkeys too (Andrew Chow) 23baff5 ledger_bitcoin: Modifications to get_wallet_address for our legacy usage (Andrew Chow) 50e2d01 hwwclient: Add Chain as a parameter to constructor (Andrew Chow) 5aad268 key: Add helpers for determing addrtype and standard paths (Andrew Chow) 26a1ccc ledger_bitcoin: Optionally allow HID path in TransportClient (Andrew Chow) 57d5c2f ledgercomm: Add the option to pass in HID path (Andrew Chow) 15e5427 ledgercomm: Use relative imports of itself (Andrew Chow) 88235d6 Include ledgercomm library (Andrew Chow) b709028 ledger_bitcoin: Fix sign_psbt for our implementation of PSBTv2 (Andrew Chow) e34f6fd Add ledger_bitcoin library (Andrew Chow) Pull request description: The 2.0 version of the Ledger Bitcoin app uses a completely new protocol which utilizes PSBTv2 and descriptors(ish). Additionally, this new version supports signing Taproot inputs. This PR adds support for using the new protocol when the app major version number is detected to be greater than or equal to 2. Ledger has provided a python library in https://github.com/LedgerHQ/app-bitcoin-new/tree/master/bitcoin_client. Given that many components of this library are copied from HWI itself, it doesn't make sense to include the entire thing. Additionally, as we already have access to the device via btchip-python, there is no need to use any of the transport things. So instead, parts of the library are copied to `hwilib/devices/ledgerbitcoin2` and modifications are made to use relative imports to common HWI components. Our copy of btchip-python is slightly modified to work with the new version as well, particularly with returning the status code rather than consuming it when receiving APDU responses. As the new protocol uses PSBTv2, this PR also requires #549 for PSBTv2 itself. As v2.0.0 supports Taproot, this branch is based on #544 so that Taproot can be supported. ACKs for top commit: Sjors: re-ACK daeec1d Tree-SHA512: 8f956622b439afe15be0c169e02d852d2ec221af9c75a70819956f78a9a8c4c3a7b555d0de4f3fd4df61bb862abda68505c5c2297a13f5c310e200d123cd609b
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.
Implements serialization and usage of PSBTv2 fields.