diff --git a/doc/bips.md b/doc/bips.md index ad6f7a0767..8c20533c9b 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -45,3 +45,4 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.21.0**): * [`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)). * [`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)). * [`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)). +* [`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. diff --git a/test/functional/test_framework/key.py b/test/functional/test_framework/key.py index 17b869e542..a6bc187985 100644 --- a/test/functional/test_framework/key.py +++ b/test/functional/test_framework/key.py @@ -240,8 +240,8 @@ class ECPubKey(): x = int.from_bytes(data[1:33], 'big') if SECP256K1.is_x_coord(x): p = SECP256K1.lift_x(x) - # if the oddness of the y co-ord isn't correct, find the other - # valid y + # Make the Y coordinate odd if required (lift_x always produces + # a point with an even Y coordinate). if data[0] & 1: p = SECP256K1.negate(p) self.p = p @@ -542,7 +542,7 @@ class TestFrameworkKey(unittest.TestCase): sig_actual = sign_schnorr(seckey, msg, aux_rand) self.assertEqual(sig.hex(), sig_actual.hex(), "BIP340 test vector %i (%s): sig mismatch" % (i, comment)) except RuntimeError as e: - self.assertFalse("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e)) + self.fail("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e)) result_actual = verify_schnorr(pubkey, sig, msg) if result: self.assertEqual(result, result_actual, "BIP340 test vector %i (%s): verification failed" % (i, comment))