Skip to content

Tags: muun/bitcoinj

Tags

0.15.4-taproot-sighash-anyone-can-pay

Toggle 0.15.4-taproot-sighash-anyone-can-pay's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
support SIGHASH_ANYONECANPAY in taproot sighash (#3)

* support SIGHASH_ANYONECANPAY in taproot sighash

Accept ALL | ANYONECANPAY (0x81, BIP341) in hashForTaprootSignature:
skip the four all-input midstate hashes and commit to the signed
input's outpoint, spent output and sequence instead. Write the full
sighash type byte into the message (the masked byte was only correct
for types without the flag) and fix the sign of the anyone-can-pay
term in the buffer size formula. ANYONECANPAY alone (0x80) stays
rejected: it is not a valid taproot sighash type. Golden values from
btcd v0.24.2 with txscript.SigHashAll|txscript.SigHashAnyOneCanPay.

* use ANYONECANPAY_ALL instead of composing sighash flags

Replace SigHash.ALL | SigHash.ANYONECANPAY with the existing
ANYONECANPAY_ALL enum constant in javadoc, comments and tests. The
test helper takes Transaction.SigHash again and converts with
byteValue(), so call sites pass plain enum constants without casts.
No behavior change.

* take SigHash instead of raw byte in hashForTaprootSignature

* add final to vars used in hashForTaprootSignature

0.15.4-taproot-sighash-default

Toggle 0.15.4-taproot-sighash-default's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
support SIGHASH_DEFAULT in taproot sighash (#2)

* support SIGHASH_DEFAULT in taproot sighash

Add SigHash.DEFAULT (0x00, BIP341) and accept it in
hashForTaprootSignature. It hashes like ALL but commits hash type 0x00,
and the resulting Schnorr signature omits the sighash byte. Golden value
for the script-path test generated from btcd v0.24.2 with
txscript.SigHashDefault.

* add comment regarding sighash unset vs default variants

* extract shared taproot sighash test fixture

The three testSigHashTaproot* tests duplicated ~70 lines of tx, prevouts
and tapleaf setup, differing only in sighash type and golden value. Also
drop the redundant tapleaf hash golden: a wrong leaf hash already fails
the sighash assertion.

* add key-path SIGHASH_DEFAULT sighash test

SIGHASH_DEFAULT acceptance also applies to key-path spends, which only
had SIGHASH_ALL coverage. Golden value from btcd v0.24.2.

0.15.4-taproot-script-path

Toggle 0.15.4-taproot-script-path's commit message

Verified

This commit was signed with the committer’s verified signature.
support BIP342 script-path taproot sighash

hashForTaprootSignature only handled key-path (BIP341) spends. Allow a
non-null scriptCode, interpreted as the 32-byte tapleaf hash, to produce
the script-path sighash: set spend_type to 0x02 and append the ext_flag=1
extension (tapleaf_hash || key_version || codesep_pos). Key-path behaviour
is unchanged.

Add testSigHashTaprootScriptPath, whose golden value is cross-checked
against btcd's txscript.CalcTapscriptSignaturehash (the same oracle
reproduces the existing key-path vector exactly). The script used to
generate the test values is included as a comment.

Verified

This tag was signed with the committer’s verified signature.
acrespo acrespo

Verified

This tag was signed with the committer’s verified signature.
acrespo acrespo

v0.15.10

Toggle v0.15.10's commit message

Verified

This tag was signed with the committer’s verified signature.
schildbach Andreas Schildbach
0.15.10 release

v0.15.9

Toggle v0.15.9's commit message

Verified

This tag was signed with the committer’s verified signature.
schildbach Andreas Schildbach
0.15.9 release

v0.15.8

Toggle v0.15.8's commit message

Verified

This tag was signed with the committer’s verified signature.
schildbach Andreas Schildbach
0.15.8 release

v0.15.7

Toggle v0.15.7's commit message

Verified

This tag was signed with the committer’s verified signature.
schildbach Andreas Schildbach
Release 0.15.7

v0.15.6

Toggle v0.15.6's commit message

Verified

This tag was signed with the committer’s verified signature.
schildbach Andreas Schildbach
0.15.6 release