Closed Roasbeef closed 2 years ago
bech32m
PR here: https://github.com/btcsuite/btcutil/pull/202
PR to add the new address type here: https://github.com/btcsuite/btcutil/pull/205
Related PR: https://github.com/btcsuite/btcwallet/pull/792
With that and the outstanding taproot PR, pretty much all the items here will be complete!
This is a mega tracking issue to track all the taproot components (the division here is just a suggestion) that we'll need to put together to fully implement the new soft fork rules. I've included certain
btcwallet
changes here as well just for the sake of completion, so we can see how they all fit together in a single place.Road To Taproot
[x] Add new schnorr package to
btcec
that implements 340.dcrd
implementation (namely their move to convert more big int usage into field limbs), but the verification is slightly different due to the add logic in BIP 340 itself.[x] Extend
txscript.Pkscript
with awareness of the new output types.[x] Implement the tagged hashing scheme as utility functions within
txscript
.[x] Implement the new internal and external sighashes in the
txscript
package.[x] Use the above to implement normal keyspend verification in
txscript.Engine
.[x] Add helper functions to
txscript
to compute the taproot commitment, as well as verify the reveal of a tapscript leaf.[x] Create a series of general functions in the
txscript
package for control block + annex parsing.[x] Implement full script spend verification along w/ the new
OP_SUCCESS
andOP_CHECKSIGADD
semantics.[x] Implement
bech32m
[x] Add new address type to
btcutil.Address
for segwit v1 that usesbech32m
[x] Add new key scope type (for
btcwallet
) to generate keys using the designated BIP 44 purpose.[x] Update
hdkeychain
in btcutil to return keys of the proper arity if a flag is active for schnorr usage[x] Implement signing for keyspend logic in
btcwallet
[x] Extend script import capabilities to maintain either entire tree and/or induvidual branch proofs
[x] Implement script based signing (tapscript reveal) for