Skip to content

Commit 82d3596

Browse files
committed
Merge #20161: Minor Taproot follow-ups
1d22300 Address functional test nits (Pieter Wuille) 5669642 docs: mention BIPs 340-342 in doc/bips.md (Pieter Wuille) Pull request description: This addresses some nits in the tests, and adds entries for BIP 340-342 to doc/bips.md. ACKs for top commit: fanquake: ACK 1d22300 benthecarman: ACK 1d22300 Tree-SHA512: ad8f937dc6a34db86c585f65beb80e7eceda1822d9a20c86346a319908870381062856d0b95b42049a2791317a038c77fbcbf896c9f4aaa7318e4864b7fcf7a4
2 parents cbb5f3a + 1d22300 commit 82d3596

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/bips.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.21.0**):
4545
* [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)).
4646
* [`BIP 325`](https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki): Signet test network is supported as of **v0.21.0** ([PR 18267](https://github.com/bitcoin/bitcoin/pull/18267)).
4747
* [`BIP 339`](https://github.com/bitcoin/bips/blob/master/bip-0339.mediawiki): Relay of transactions by wtxid is supported as of **v0.21.0** ([PR 18044](https://github.com/bitcoin/bitcoin/pull/18044)).
48+
* [`BIP 340`](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki) [`341`](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki) [`342`](https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki): Validation rules for Taproot (including Schnorr signatures and Tapscript leaves) are implemented as of **v0.21.0** ([PR 19953](https://github.com/bitcoin/bitcoin/pull/19953)), without mainnet activation.

test/functional/test_framework/key.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ def set(self, data):
240240
x = int.from_bytes(data[1:33], 'big')
241241
if SECP256K1.is_x_coord(x):
242242
p = SECP256K1.lift_x(x)
243-
# if the oddness of the y co-ord isn't correct, find the other
244-
# valid y
243+
# Make the Y coordinate odd if required (lift_x always produces
244+
# a point with an even Y coordinate).
245245
if data[0] & 1:
246246
p = SECP256K1.negate(p)
247247
self.p = p
@@ -542,7 +542,7 @@ def test_schnorr_testvectors(self):
542542
sig_actual = sign_schnorr(seckey, msg, aux_rand)
543543
self.assertEqual(sig.hex(), sig_actual.hex(), "BIP340 test vector %i (%s): sig mismatch" % (i, comment))
544544
except RuntimeError as e:
545-
self.assertFalse("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
545+
self.fail("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
546546
result_actual = verify_schnorr(pubkey, sig, msg)
547547
if result:
548548
self.assertEqual(result, result_actual, "BIP340 test vector %i (%s): verification failed" % (i, comment))

0 commit comments

Comments
 (0)