From dd8fdb4eaa0794a4bad4978045e67a363898093b Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 28 Sep 2021 22:34:25 +0100 Subject: [PATCH] Updates for new NU5 testnet consensus rules The ZIP 244 test vectors are altered as a result of changing the consensus branch ID. --- orchard_commitments.py | 2 +- zip_0244.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/orchard_commitments.py b/orchard_commitments.py index 8fcde60..c512a0d 100755 --- a/orchard_commitments.py +++ b/orchard_commitments.py @@ -24,7 +24,7 @@ def rcv_trapdoor(rand): # https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit def sinsemilla_commit(r: Scalar, D, M): assert isinstance(r, Scalar) - return sinsemilla_hash_to_point(D + b"-M", M).checked_incomplete_add( + return sinsemilla_hash_to_point(D + b"-M", M) + ( group_hash(D + b"-r", b"") * r ) diff --git a/zip_0244.py b/zip_0244.py index c886d62..82411a9 100755 --- a/zip_0244.py +++ b/zip_0244.py @@ -309,7 +309,7 @@ def main(): return bytes(ret) rand = Rand(randbytes) - consensusBranchId = 0xF919A198 # NU5 + consensusBranchId = 0x37519621 # NU5 test_vectors = [] for _ in range(10):