From c0b7fa2007e67e608255e44e42810ce47e894938 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 4 May 2022 15:00:12 +0000 Subject: [PATCH] Add nullifier field to `CompactAction` Also reorders the fields to match the ZIP 244 order. Closes zcash/orchard#243. --- src/note_encryption.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/note_encryption.rs b/src/note_encryption.rs index 3ba1c338..7aed1831 100644 --- a/src/note_encryption.rs +++ b/src/note_encryption.rs @@ -268,8 +268,9 @@ impl ShieldedOutput for Action { /// A compact Action for light clients. pub struct CompactAction { - ephemeral_key: EphemeralKeyBytes, + nullifier: Nullifier, cmx: ExtractedNoteCommitment, + ephemeral_key: EphemeralKeyBytes, enc_ciphertext: [u8; 52], } @@ -282,8 +283,9 @@ impl fmt::Debug for CompactAction { impl From<&Action> for CompactAction { fn from(action: &Action) -> Self { CompactAction { - ephemeral_key: action.ephemeral_key(), + nullifier: *action.nullifier(), cmx: *action.cmx(), + ephemeral_key: action.ephemeral_key(), enc_ciphertext: action.encrypted_note().enc_ciphertext[..52] .try_into() .unwrap(),