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

Tracking issue for Taproot #503

Closed
20 tasks done
Tracked by #63
jrawsthorne opened this issue Oct 19, 2020 · 15 comments
Closed
20 tasks done
Tracked by #63

Tracking issue for Taproot #503

jrawsthorne opened this issue Oct 19, 2020 · 15 comments
Labels
epic Tracking issues for epic tasks
Projects
Milestone

Comments

@jrawsthorne
Copy link
Contributor

jrawsthorne commented Oct 19, 2020

Wanted to create an issue to track the various changes needed for taproot support

Tagged hashes

Signatures & PSBTs

Script

Opcode

Address

Key

@Kixunil
Copy link
Collaborator

Kixunil commented Jul 13, 2021

Would be cool if someone with edit access to https://en.bitcoin.it/wiki/Bech32_adoption updated status to WIP (the table at the very bottom)

@dr-orlovsky
Copy link
Collaborator

I assume we are also blocked by the release of rust libbitcoinconsensus wrapper lib supporting Taproot?

@dr-orlovsky dr-orlovsky moved this from Todo to In process in Taproot Sep 13, 2021
apoelstra added a commit that referenced this issue Sep 15, 2021
…d sighash cache for legacy, segwit and taproot inputs

c704ee7 [docs-only] Use backtick in addition to square parentheses for types references, clarify legacy, non_exhaustive comment, remove std:: (Riccardo Casatta)
f223be6 Rename access_witness to witness_mut and return Option (Riccardo Casatta)
c9bc0b9 [fmt-only] autoformatting with `rustfmt src/util/sighash.rs` (Riccardo Casatta)
0777491 Use get_or_insert_with in segwit_cache (Martin Habovstiak)
497dbfb Use get_or_insert_with in common_cache() (Martin Habovstiak)
ca80a5a Use get_or_insert_with in taproot_cache (Martin Habovstiak)
6e06a32 Wrap ErrorKind in Io enum variant, fix doc comment for the IO variant (Riccardo Casatta)
1a2b54f introduce constant KEY_VERSION_0 (Riccardo Casatta)
417cfe3 Derive common traits for structs and enum, make internal struct not pub (Riccardo Casatta)
55ce3dd Fix validation error if SINGLE with missing corresponding output, remove check_index and check with get().ok_or(), more details in errors (Riccardo Casatta)
2b3b22f impl Encodable for Annex to avoid allocation (Riccardo Casatta)
1a7afed Add Reserved variant to SigHashType for future use (ie SIGHASH_ANYPREVOUT) (Riccardo Casatta)
53d0e17 Deprecate bip143::SigHashCache in favor of sighash::SigHashCache (Riccardo Casatta)
15e3caf [test] Test also sighash legacy API with legacy tests (Riccardo Casatta)
24acfe3 Implement Bip341 signature hash, create unified SigHashCache for taproot, segwit and legacy inputs (Riccardo Casatta)
683b9c1 add [En|De]codable trait for sha256::Hash (Riccardo Casatta)

Pull request description:

  Adds https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki message signature algorithm

  The base is taken from `bip143::SigHashCache`, some code results duplicated but I think it's more clear to keep things separated

  Would mark some bullet point on #503

  Test vectors are taken by running https://github.com/bitcoin/bitcoin/blob/d1e4c56309aeb73772e3a9d779a9c157024c9e1e/test/functional/feature_taproot.py with a modified `TaprootSignatureHash` function to print intermediate values that I cannot found in the bip341 [test vector json](https://raw.githubusercontent.com/bitcoin-core/qa-assets/main/unit_test_data/script_assets_test.json)

  UPDATE: Latest version includes the suggestion from @sanket1729 to create a unified tool for signature message hash for legacy, segwit, and taproot inputs. In particular, makes sense for mixed segwit v0 and taproot v1 inputs because cached values could be shared

ACKs for top commit:
  sanket1729:
    ACK c704ee7. Reviewed the diff from a37de1a which I previously ACKed
  dr-orlovsky:
    utACK c704ee7 by diffing it to 6e06a32 having my ACK before.
  apoelstra:
    ACK c704ee7

Tree-SHA512: 35530995fe9d078acd0178cfca654ca980109f4502c91d578c1a0d5c6cafacab7db1ffd6216288eac99f6a763776cbc0298cfbdff00b5a83e98ec4b15aa764e8
@dr-orlovsky dr-orlovsky added this to the 0.28.0 milestone Sep 17, 2021
@apoelstra
Copy link
Member

@dr-orlovsky I thnk it's okay to cut a release without libbitcoinconsensus being updated

@sanket1729
Copy link
Member

I believe the primary blocker now is a rust-secp release.

I believe one of the maintainers added

Changes to BIP32 extended key derivation API: WIP

I don't think there is anything needed to change in bip32 for taproot/schnorr. Github edit history says that it was @dr-orlovsky . Maybe we should discuss this before you make any progress

@apoelstra
Copy link
Member

Opened a PR for a rust-secp release.

rust-bitcoin/rust-secp256k1#347

What exactly do we need from this? Do we need to do an update of the underlying C lib?

@sanket1729
Copy link
Member

We need the bug fix that required signing context schnorr signature verification. Some additional APIs for tweaked keypairs that were not released previously. And the new APIs that refer to keys are XOnlyPubKey/EcKey instead of schnorr::PublicKey.

We do not need an update to the underlying C lib.

@dr-orlovsky
Copy link
Collaborator

@sanket1729 I agree it is not needed, removing. Also removing the part mentioning closed PR: "Address-related type refactoring for better witness v1 support"

@apoelstra
Copy link
Member

rust-secp release done - 0.21.1. (Yesterday we did 0.21.0 but forgot to export the new Parity type)

@dr-orlovsky
Copy link
Collaborator

#755 is merged, the rest of PRs can be rebased now. I update my PRs this evening

@dr-orlovsky dr-orlovsky moved this from In process to Ready for merge in Taproot Jan 13, 2022
@dr-orlovsky
Copy link
Collaborator

Congrats: for now we have just two PRs left, which are purely code-style PRs:

Even without them merged I think we are good to go for the first RC on 0.28 here

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 13, 2022

Wow, I didn't even realize we are this close!

I think the last two have a good chance of being included, they aren't too hard.

@sanket1729
Copy link
Member

There are two more bugs that we need to resolve.

@dr-orlovsky dr-orlovsky added the epic Tracking issues for epic tasks label Jan 15, 2022
@dr-orlovsky
Copy link
Collaborator

Looks like we are done here! Congratulations to everyone!

Taproot automation moved this from Ready for merge to Done Jan 17, 2022
@dr-orlovsky dr-orlovsky unpinned this issue Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Tracking issues for epic tasks
Projects
Development

No branches or pull requests

5 participants