BIP346: OP_TXHASH and OP_CHECKTXHASHVERIFY
Semantic changes
I thought it might be valuable to keep track of actual semantic changes being made since the initial out-of-draft version.
- 2023-12-19: Added relative indices for individual mode.
Implementations
- A proposed implementation for Bitcoin Core is available here: https://github.com/bitcoin/bitcoin/pull/29050
- A proposed implementation for rust-bitcoin is available here: https://github.com/rust-bitcoin/rust-bitcoin/pull/2275
Alternatively, but slightly even more complicating the cases, since the first two fields (version, locktime), are not very valuable without anything else (especially since we have OP_CLTV), we could introduce four special-cased bytes to mimick other popular SIGHASH modes: 0x00, 0x01, 0x02 and 0x03. Though locktime might be useful with OP_TX at some point. So I would argue against that. Mimicking "regular" sighashes isn't super useful in the first place because any system that expects to use regular sighashes can use current regular schnorr keys.
I just pushed an updated version of this BIP. It has a reference implementation that produces test vectors that are tested against an implementation for Bitcoin Core and for rust-bitcoin.
I think it should be ready for review. I have one small last TODO in the specification related to txfs malleability.
Assigned BIP 346.
Hey @stevenroose, this pull request has had unaddressed review for over six months. Are you still working on this? If not, is there someone else that wants to pick this project up?
Hey @stevenroose, this pull request has had unaddressed review for over six months. Are you still working on this? If not, is there someone else that wants to pick this project up?
pinging @stevenroose
Hey all, sorry for the long delay. I addressed some of the above comments, and also made some changes to the BIP, together with @reardencode. Changes are the following:
- slightly modified the TEMPLATE special case to more correctly be equivalent to CTV
- removed the 0x00 ALL special case, instead
- add a special 1-byte version of the TxFieldSelector, that maps directly into a full TxFieldSelector
- this 1-byte txfs can directly emulate APO, APOAS and all currently existing sighashes, as outlined in the bip text
- added wording for the bip to be an upgrade path of an existing CTV deployment
@stevenroose mind updating this draft per the review feedback (thanks!)
Hey @stevenroose, this PR has had unaddressed review for over five months. The document seems close to ready for being merged in Draft status. Could you provide an update on what you expect the next steps to be here? Are you still planning to finish this? Would you like someone else to help?
Hi @stevenroose, are you still planning to update/finish this BIP draft? Would it be worth bringing in someone to help?