Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zk-token-proof] Increase compute budget for zk-token-proof tests #34777

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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