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

psbt: implement BIP 371 Taproot PSBT fields #546

Merged
merged 7 commits into from
Dec 10, 2021

Conversation

achow101
Copy link
Member

Adds the Taproot PSBT fields as described in BIP 371

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

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

utACK 171a5fb

8f6b64f could use a test, e.g. covering which keys can occur multiple times and which can't.

Track the set of keys that have been read in order to better catch
duplicate keys.

Matches Core's handling of duplicate keys.
Instead of using 0 as a magic number, make self.sighash an Optional.
Instead of including field numbers explicitly, use their names, with the
numbers defined as static members of their respective classes.
Instead of serializing the field number explicitly as bytes, use the
named members for the field numbers.

Also serializes them with ser_compact_size in accordance with BIP 174
@Sjors
Copy link
Member

Sjors commented Dec 9, 2021

re-utACK c5fba03

@achow101 achow101 merged commit f8c79e6 into bitcoin-core:master Dec 10, 2021
achow101 added a commit that referenced this pull request Feb 1, 2022
2669bce tests: each device explicitly lists signtx cases (Andrew Chow)
b9093d1 trezor: Disallow external inputs when signing with tr (Andrew Chow)
c37acd4 tests: Taproot signing tests (Andrew Chow)
ab189db tests: Add Trezor to SUPPORTS_TAPROOT (Andrew Chow)
6ae50be trezor: Sign Taproot inputs (Andrew Chow)
9fe19f4 trezor: Allow taproot addresses for displayaddress (Andrew Chow)
f168058 trezor: Implement can_sign_taproot (Andrew Chow)

Pull request description:

  Implements Taproot support for Trezor devices.

  Depends on #545, #546, #547, and #548

  No tests yet as they would need bitcoin/bitcoin#22558 merged into Bitcoin Core.

Top commit has no ACKs.

Tree-SHA512: 608e554efe459772465a4066679d108ae6e81f1063a3e4b67832140f199d7565ff46f13740a401875a2b54bc94828dbc77054b0203bdca93d4c439ee829d07eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants