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

test: nullifier queue failing tests full queue #700

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ node_modules

/cli/.crates2.json
/cli/.crates.toml
test-programs/rnd-inf-test/**/*.txt
16 changes: 9 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ impl default::Default for NullifierQueueConfig {
}
}
}

pub fn process_initialize_state_merkle_tree_and_nullifier_queue(
ctx: Context<'_, '_, '_, '_, InitializeStateMerkleTreeAndNullifierQueue<'_>>,
index: u64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct InsertIntoNullifierQueues<'info> {
pub registered_program_pda: Option<Account<'info, RegisteredProgram>>, // nullifiers are sent in remaining accounts. @ErrorCode::InvalidVerifier
pub system_program: Program<'info, System>,
}

// TODO: add test that the first two elements of the queue cannot be inserted into the tree and removed from the queue
/// Inserts every element into the indexed array.
/// Throws an error if the element already exists.
/// Expects an indexed queue account as for every index as remaining account.
Expand Down Expand Up @@ -97,7 +97,6 @@ pub fn process_insert_into_nullifier_queues<'a, 'b, 'c: 'info, 'info>(
light_heap::bench_sbf_start!("acp_insert_nf_into_queue");
for element in queue_bundle.elements.iter() {
let element = BigUint::from_bytes_be(element.as_slice());
msg!("Inserting element {:?} into nullifier queue", element);
indexed_array
.insert(&element, sequence_number)
.map_err(ProgramError::from)?;
Expand Down
2 changes: 2 additions & 0 deletions test-programs/account-compression-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ light-compressed-token = { path = "../../programs/compressed-token" , features
light-compressed-pda = { path = "../../programs/compressed-pda" , features = ["cpi"]}
account-compression = { path = "../../programs/account-compression" , features = ["cpi"] }
light-hasher = {path = "../../merkle-tree/hasher"}
light-hash-set = {path = "../../merkle-tree/hash-set"}
light-concurrent-merkle-tree = {path = "../../merkle-tree/concurrent"}
light-indexed-merkle-tree = {path = "../../merkle-tree/indexed"}
light-merkle-tree-reference = {path = "../../merkle-tree/reference"}
Expand All @@ -45,3 +46,4 @@ solana-cli-output = "1.18.11"
serde_json = "1.0.114"
solana-sdk = "1.18.11"
thiserror = "1.0"
memoffset = "0.9.1"
Loading
Loading