bitcoinops / taproot-workshop

Taproot & Schnorr Python Library & Documentation.
MIT License
375 stars 112 forks source link

Add 32-bytes public key support #161

Closed elichai closed 3 years ago

elichai commented 4 years ago

Hi, I updated the workshop to be compatible with the latest version of the schnorr and taproot BIPs.

I splited the changes for each notebook and it's solution to a unique commit so it will be easier to review commit by commit.

The first commit copies the rebased version of our Taproot bitcoin fork from: https://github.com/bitcoinops/bitcoin/tree/Taproot_V0.1.5-proposed (not sure what's the best way to review that before tagging as an official v0.1.5)

At the end Musig got a bit complicated because the helper functions do a lot of the negating but then the tweak factor is by itself and need to be negated (and then if we don't also negate the pubkey too then running the cell twice will negate twice making the signature invalid) If people think it's too much I can try to modify the helper methods to do this for the user.

EDIT: Sadly github didn't make the commit hash in the first commit into a URL even though their docs say it should've (https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls#commit-shas) I can try and fix that if people want

jnewbery commented 4 years ago

I also noticed that the segwit_version1_1.jpg diagram in 2.1 referred to 33-byte public key, which we'll need to update. @jachiang - are you able to update that diagram?

jnewbery commented 4 years ago

Thanks for the updated image, @jachiang.

As I mentioned in slack, I'm going to hold off on merging this until the 32-byte pubkey tiebreaker is settled: https://github.com/sipa/bips/pull/192

jnewbery commented 3 years ago

This was done in #168, along with a few other changes to make the workbooks work with Bitcoin Core 0.21.

Thanks for the help with this, @elichai