From 7d20edd08db75894cb8d5928c7f5584cd196bcf8 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Wed, 17 Apr 2024 20:14:03 -0500 Subject: [PATCH] Fix Orchard nullifier calculation --- CHANGELOG.md | 6 ++++++ librustzcash-wrapper/src/lib.rs | 2 +- zcash-haskell.cabal | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a387817..f7d844c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.5.3] + +### Fixed + +- Orchard note nullifier calculation + ## [0.5.5.2] ### Added diff --git a/librustzcash-wrapper/src/lib.rs b/librustzcash-wrapper/src/lib.rs index 39bd98b..e42f374 100644 --- a/librustzcash-wrapper/src/lib.rs +++ b/librustzcash-wrapper/src/lib.rs @@ -908,7 +908,7 @@ pub extern "C" fn rust_wrapper_orchard_note_decrypt_sk( let result = zcash_note_encryption::try_note_decryption(&domain, &pivk, &action); match result { Some((n, r, m)) => { - let hn = Hnote {note: n.value().inner(), recipient: r.to_raw_address_bytes().to_vec(), memo: m.to_vec(), nullifier: vec![0]}; + let hn = Hnote {note: n.value().inner(), recipient: r.to_raw_address_bytes().to_vec(), memo: m.to_vec(), nullifier: n.nullifier(&fvk).to_bytes().to_vec()}; marshall_to_haskell_var(&hn, out, out_len, RW); } None => { diff --git a/zcash-haskell.cabal b/zcash-haskell.cabal index c7e5406..be2387f 100644 --- a/zcash-haskell.cabal +++ b/zcash-haskell.cabal @@ -5,7 +5,7 @@ cabal-version: 3.0 -- see: https://github.com/sol/hpack name: zcash-haskell -version: 0.5.5.2 +version: 0.5.5.3 synopsis: Utilities to interact with the Zcash blockchain description: Please see the README on the repo at category: Blockchain