From 0aea75aaf57ef143e382d7c555daf5c1774835d3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:28:05 +0900 Subject: [PATCH] v1.17: [zk-token-proof] include `VerifyBatchRangeProofU256` in the `enable_zk_transfer_with_fee` feature gate (backport of #34747) (#34765) [zk-token-proof] include `VerifyBatchRangeProofU256` in the `enable_zk_transfer_with_fee` feature gate (#34747) include `VerifyBatchRangeProofU256` in the `enable_zk_transfer_with_fee` feature (cherry picked from commit bc136423b4a6f4609e2d07a0b863bc452b84a3ea) Co-authored-by: samkim-crypto --- programs/zk-token-proof/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/programs/zk-token-proof/src/lib.rs b/programs/zk-token-proof/src/lib.rs index 9a9396b15f1fdb..e262950201181a 100644 --- a/programs/zk-token-proof/src/lib.rs +++ b/programs/zk-token-proof/src/lib.rs @@ -257,6 +257,11 @@ declare_process_instruction!(Entrypoint, 0, |invoke_context| { ) } ProofInstruction::VerifyBatchedRangeProofU256 => { + // transfer with fee related proofs are not enabled + if !enable_zk_transfer_with_fee { + return Err(InstructionError::InvalidInstructionData); + } + if native_programs_consume_cu { invoke_context .consume_checked(VERIFY_BATCHED_RANGE_PROOF_U256_COMPUTE_UNITS)