Skip to content

Commit

Permalink
[zk-token-proof] Increase compute budget for zk-token-proof tests (so…
Browse files Browse the repository at this point in the history
…lana-labs#34777)

increase compute budget for zk-token-proof tests
  • Loading branch information
samkim-crypto authored Jan 13, 2024
1 parent 5a1a697 commit 9468996
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions programs/zk-token-proof-tests/tests/process_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ async fn test_verify_proof_without_context<T, U>(
U: Pod,
{
let mut program_test = ProgramTest::default();
// the most expensive proof is the transfer-with-fee proof with 407_000 CUs
program_test.set_compute_max_units(500_000);
let success_proof_account = Pubkey::new_unique();
program_test.add_account(
success_proof_account,
Expand Down Expand Up @@ -1015,7 +1017,10 @@ async fn test_verify_proof_with_context<T, U>(
T: Pod + ZkProofData<U>,
U: Pod,
{
let mut context = ProgramTest::default().start_with_context().await;
let mut program_test = ProgramTest::default();
// the most expensive proof is the transfer-with-fee proof with 407_000 CUs
program_test.set_compute_max_units(500_000);
let mut context = program_test.start_with_context().await;
let rent = context.banks_client.get_rent().await.unwrap();

let client = &mut context.banks_client;
Expand Down Expand Up @@ -1219,6 +1224,8 @@ async fn test_verify_proof_from_account_with_context<T, U>(
U: Pod,
{
let mut program_test = ProgramTest::default();
// the most expensive proof is the transfer-with-fee proof with 407_000 CUs
program_test.set_compute_max_units(500_000);
let success_proof_account = Pubkey::new_unique();
program_test.add_account(
success_proof_account,
Expand Down Expand Up @@ -1368,7 +1375,10 @@ async fn test_close_context_state<T, U>(
T: Pod + ZkProofData<U>,
U: Pod,
{
let mut context = ProgramTest::default().start_with_context().await;
let mut program_test = ProgramTest::default();
// the most expensive proof is the transfer-with-fee proof with 407_000 CUs
program_test.set_compute_max_units(500_000);
let mut context = program_test.start_with_context().await;
let rent = context.banks_client.get_rent().await.unwrap();

let client = &mut context.banks_client;
Expand Down

0 comments on commit 9468996

Please sign in to comment.