Skip to content

Commit

Permalink
v1.17: [zk-token-proof] include VerifyBatchRangeProofU256 in the `e…
Browse files Browse the repository at this point in the history
…nable_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 bc13642)

Co-authored-by: samkim-crypto <skim13@cs.stanford.edu>
  • Loading branch information
mergify[bot] and samkim-crypto authored Jan 12, 2024
1 parent 07acb46 commit 0aea75a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions programs/zk-token-proof/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0aea75a

Please sign in to comment.