Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Lightprotocol/light-protocol-v1
/ functions
Functions
413 in github.com/Lightprotocol/light-protocol-v1
⨍
Functions
413
◇
Types & classes
18
↓ 66 callers
Function
_process_instruction
( id: u8, tmp_storage_pda_data: &mut TmpStoragePda, merkle_tree_pda_data: &mut MerkleTree, )
program/src/poseidon_merkle_tree/processor.rs:280
↓ 42 callers
Function
parse_fp256_to_bytes
(fp256: ark_ff::Fp256<ark_bn254::FqParameters>, range: &mut Vec<u8>)
program/src/groth16_verifier/parsers.rs:171
↓ 40 callers
Function
parse_quad_to_bytes
( q: ark_ff::QuadExtField<ark_ff::Fp2ParamsWrapper<ark_bn254::Fq2Parameters>>, range: &mut Vec<u8>, )
program/src/groth16_verifier/parsers.rs:253
↓ 37 callers
Function
parse_f_to_bytes
( f: <ark_ec::models::bn::Bn<ark_bn254::Parameters> as ark_ec::PairingEngine>::Fqk, range: &mut Vec<u8
program/src/groth16_verifier/parsers.rs:8
↓ 36 callers
Function
mul_assign_1
( _f_range: &Vec<u8>, _other: &Vec<u8>, _store_cubic0: &mut Vec<u8>, _store_cubic1: &mut Vec<u
program/src/groth16_verifier/final_exponentiation/instructions.rs:36
↓ 36 callers
Function
mul_assign_2
( _f_range_other: &Vec<u8>, _cubic_range_0: &Vec<u8>, _cubic_range_1: &Vec<u8>, _f_range: &mut
program/src/groth16_verifier/final_exponentiation/instructions.rs:52
↓ 22 callers
Function
conjugate_wrapper
(_range: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:28
↓ 20 callers
Function
read_test_data
(file_name: std::string::String)
program/tests/test_utils/mod.rs:226
↓ 19 callers
Function
create_and_start_program_var
( accounts: &Vec<(&Pubkey, usize, Option<Vec<u8>>)>, token_accounts: Option<&mut Vec<(&Pubkey,
program/tests/test_utils/mod.rs:282
↓ 17 callers
Function
parse_cubic_from_bytes_sub
( range: &Vec<u8>, sub: [usize; 2], )
program/src/groth16_verifier/parsers.rs:384
↓ 15 callers
Function
parse_f_from_bytes
( range: &Vec<u8>, )
program/src/groth16_verifier/parsers.rs:100
↓ 15 callers
Function
parse_quad_from_bytes
( range: &Vec<u8>, )
program/src/groth16_verifier/parsers.rs:272
↓ 14 callers
Function
hash_64_to_vec
(input_bytes: Vec<u8>)
program/tests/offchain_merkle_tree.rs:51
↓ 13 callers
Function
restart_program
We need program restart logic since we're firing 300+ ix and the program_context seems to melt down every couple of hundred ix. It basically just pick
program/tests/test_utils/mod.rs:342
↓ 12 callers
Function
parse_x_group_affine_to_bytes
( x: ark_ec::short_weierstrass_jacobian::GroupAffine<ark_bn254::g1::Parameters>, account: &mut Vec<u8>
program/src/groth16_verifier/parsers.rs:430
↓ 11 callers
Function
parse_r_to_bytes
j: proof.b prep
program/src/groth16_verifier/parsers.rs:208
↓ 10 callers
Function
custom_cyclotomic_square
(_f_range: &Vec<u8>, _store_f_range: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:100
↓ 10 callers
Function
parse_x_group_affine_from_bytes
x
program/src/groth16_verifier/parsers.rs:420
↓ 9 callers
Function
create_pubkeys_from_ix_data
( ix_data: &Vec<u8>, program_id: &Pubkey, )
program/tests/onchain.rs:522
↓ 9 callers
Function
initialize_merkle_tree
( program_id: &Pubkey, merkle_tree_pda_pubkey: &Pubkey, signer_keypair: &solana_sdk::signer::keypa
program/tests/onchain.rs:244
↓ 9 callers
Function
maths_instruction
Represents: https://docs.rs/snarkvm-curves/0.5.0/src/snarkvm_curves/templates/short_weierstrass/short_weierstrass_jacobian.rs.html#161-164 In order to
program/src/groth16_verifier/prepare_inputs/instructions.rs:110
↓ 9 callers
Function
parse_cubic_to_bytes_sub
( c: ark_ff::CubicExtField<ark_ff::Fp6ParamsWrapper<ark_bn254::Fq6Parameters>>, range: &mut Vec<u8>,
program/src/groth16_verifier/parsers.rs:351
↓ 7 callers
Function
get_delta_g2_neg_pc_0
()
program/src/utils/prepared_verifying_key.rs:4909
↓ 7 callers
Function
get_gamma_g2_neg_pc_0
()
program/src/utils/prepared_verifying_key.rs:268
↓ 7 callers
Function
parse_fp256_ed_to_bytes
( fp256: ark_ff::Fp256<ark_ed_on_bn254::FqParameters>, account: &mut Vec<u8>, )
program/src/groth16_verifier/parsers.rs:185
↓ 7 callers
Function
parse_fp256_from_bytes
(range: &Vec<u8>)
program/src/groth16_verifier/parsers.rs:177
↓ 7 callers
Function
transact
( program_id: &Pubkey, signer_pubkey: &Pubkey, signer_keypair: &Keypair, tmp_storage_pda_pubke
program/tests/onchain.rs:543
↓ 6 callers
Function
custom_cyclotomic_square_in_place
(_store_f_range: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:92
↓ 6 callers
Function
parse_group_projective_to_bytes_254
( res: ark_ec::short_weierstrass_jacobian::GroupProjective<ark_bn254::g1::Parameters>, acc1: &mut Vec<
program/src/groth16_verifier/parsers.rs:450
↓ 5 callers
Function
check_leaves_insert_correct
( two_leaves_pda_pubkey: &Pubkey, left_leaf: &[u8], right_leaf: &[u8], encrypted_utxos: &[u8],
program/tests/onchain.rs:486
↓ 5 callers
Function
check_nullifier_insert_correct
( nullifier_pubkeys: &Vec<Pubkey>, program_context: &mut ProgramTestContext, )
program/tests/onchain.rs:464
↓ 5 callers
Function
custom_frobenius_map_2
(account: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:80
↓ 5 callers
Function
doubling_step
All instructions are as per the bn254 implemenation of arkworks https://docs.rs/ark-ec/0.3.0/src/ark_ec/models/bn/g2.rs.html#139-166
program/src/groth16_verifier/miller_loop/instructions.rs:27
↓ 5 callers
Function
get_vk_from_file
()
program/tests/test_utils/mod.rs:106
↓ 5 callers
Function
left_child
(index: usize)
program/tests/offchain_merkle_tree.rs:473
↓ 5 callers
Function
parent
(index: usize)
program/tests/offchain_merkle_tree.rs:503
↓ 5 callers
Function
parse_group_projective_from_bytes_254
( acc1: &[u8], acc2: &[u8], acc3: &[u8], )
program/src/groth16_verifier/parsers.rs:438
↓ 5 callers
Function
parse_proof_b_from_bytes
( range: &Vec<u8>, )
program/src/groth16_verifier/parsers.rs:232
↓ 5 callers
Method
update
Update the leaf at `index` to updated leaf. ```tree_diagram [A] / \ [B] C / \ / \ D [E] F H .. / \ .... [I] J ``` update(3, {new leaf}) wou
program/tests/offchain_merkle_tree.rs:443
↓ 4 callers
Function
create_and_check_pda
( program_id: &Pubkey, signer_account: &'a AccountInfo<'b>, passed_in_pda: &'a AccountInfo<'b>,
program/src/instructions.rs:268
↓ 4 callers
Function
custom_cubic_inverse_1
( _cubic_range_0: &Vec<u8>, _quad_range_0: &mut Vec<u8>, _quad_range_1: &mut Vec<u8>, _quad_ra
program/src/groth16_verifier/final_exponentiation/instructions.rs:157
↓ 4 callers
Function
custom_cubic_inverse_2
( _cubic_range_0: &mut Vec<u8>, _quad_range_0: &Vec<u8>, _quad_range_1: &Vec<u8>, _quad_range_
program/src/groth16_verifier/final_exponentiation/instructions.rs:203
↓ 4 callers
Function
custom_f_inverse_1
(_f_f2_range: &Vec<u8>, _cubic_range_1: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:108
↓ 4 callers
Function
custom_f_inverse_2
( _f_f2_range: &Vec<u8>, _cubic_range_0: &mut Vec<u8>, _cubic_range_1: &Vec<u8>, )
program/src/groth16_verifier/final_exponentiation/instructions.rs:116
↓ 4 callers
Function
custom_f_inverse_3
( _cubic_range_1: &mut Vec<u8>, _cubic_range_0: &Vec<u8>, _f_f2_range: &Vec<u8>, )
program/src/groth16_verifier/final_exponentiation/instructions.rs:128
↓ 4 callers
Function
custom_f_inverse_4
(_cubic: &mut Vec<u8>, _f_f2_range: &Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:141
↓ 4 callers
Function
custom_f_inverse_5
(_cubic_0: &Vec<u8>, _cubic_1: &Vec<u8>, _f_f2_range: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:148
↓ 4 callers
Function
custom_quadratic_fp256_inverse_1
(_quad_range_3: &Vec<u8>, _fp384_range: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:228
↓ 4 callers
Function
custom_quadratic_fp256_inverse_2
(_quad_range_3: &mut Vec<u8>, _fp384_range: &Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:239
↓ 4 callers
Function
ell_instruction_d_c2
( f_range: &mut Vec<u8>, p_y_range: &Vec<u8>, p_x_range: &Vec<u8>, current_coeff_2_range: &mut
program/src/groth16_verifier/miller_loop/instructions.rs:221
↓ 4 callers
Function
get_mds_poseidon_circom_bn254_x5_3
()
program/src/poseidon_merkle_tree/poseidon_round_constants_split.rs:1230
↓ 4 callers
Function
get_rounds_poseidon_circom_bn254_x5_3_split
( index: usize, )
program/src/poseidon_merkle_tree/poseidon_round_constants_split.rs:4
↓ 4 callers
Function
merkle_tree_pubkey_check
( account_pubkey: Pubkey, merkle_tree_index: u8, merkle_tree_pda_owner: Pubkey, program_id: Pu
program/src/poseidon_merkle_tree/processor.rs:320
↓ 4 callers
Function
permute_custom_split
( params: &PoseidonParameters<Fq>, mut state: Vec<Fq>, nr_start: usize, nr_iterations: usize,
program/src/poseidon_merkle_tree/instructions_poseidon.rs:177
↓ 4 callers
Function
prepare_inputs
foundational functions for instructions
program/src/poseidon_merkle_tree/instructions_poseidon.rs:142
↓ 3 callers
Function
_process_instruction
( id: u8, account_main: &mut MillerLoopState, )
program/src/groth16_verifier/miller_loop/processor.rs:51
↓ 3 callers
Function
convert_index_to_last_level
(index: usize, tree_height: usize)
program/tests/offchain_merkle_tree.rs:512
↓ 3 callers
Function
custom_frobenius_map_1
(account: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:74
↓ 3 callers
Function
custom_frobenius_map_3
(account: &mut Vec<u8>)
program/src/groth16_verifier/final_exponentiation/instructions.rs:86
↓ 3 callers
Function
ell_instruction_d
( // used for coeff1 but can be general as well f_range: &mut Vec<u8>, coeff_0_range: &Vec<u8>,
program/src/groth16_verifier/miller_loop/instructions.rs:182
↓ 3 callers
Function
exp_by_neg_x
( mut f: Fp12<<ark_bn254::Parameters as ark_ec::bn::BnParameters>::Fp12Params>, )
program/tests/offchain_final_exponentiation.rs:1546
↓ 3 callers
Function
get_ref_value
(mode: &str)
program/tests/test_utils/mod.rs:34
↓ 3 callers
Function
maths_g_ic_instruction
Implements: https://docs.rs/snarkvm-curves/0.5.0/src/snarkvm_curves/templates/short_weierstrass/short_weierstrass_jacobian.rs.html#634-695
program/src/groth16_verifier/prepare_inputs/instructions.rs:214
↓ 3 callers
Function
square_in_place_instruction
(f_range: &mut Vec<u8>)
program/src/groth16_verifier/miller_loop/instructions.rs:164
↓ 3 callers
Function
token_transfer
( token_program: &'b AccountInfo<'a>, source: &'b AccountInfo<'a>, destination: &'b AccountInfo<'a
program/src/instructions.rs:99
↓ 2 callers
Function
addition_step
https://docs.rs/ark-ec/0.3.0/src/ark_ec/models/bn/g2.rs.html#168-191
program/src/groth16_verifier/miller_loop/instructions.rs:80
↓ 2 callers
Function
check_and_insert_nullifier
( program_id: &Pubkey, signer_account: &'a AccountInfo<'b>, nullifier_account: &'a AccountInfo<'b>
program/src/instructions.rs:206
↓ 2 callers
Function
close_account
( account: &AccountInfo, dest_account: &AccountInfo, )
program/src/instructions.rs:235
↓ 2 callers
Function
compute_final_exponentiation
( program_id: &solana_program::pubkey::Pubkey, signer_pubkey: &solana_program::pubkey::Pubkey, sig
program/tests/onchain.rs:185
↓ 2 callers
Function
compute_miller_output
( program_id: &solana_program::pubkey::Pubkey, signer_pubkey: &solana_program::pubkey::Pubkey, sig
program/tests/onchain.rs:128
↓ 2 callers
Function
compute_prepared_inputs
( program_id: &solana_program::pubkey::Pubkey, signer_pubkey: &solana_program::pubkey::Pubkey, sig
program/tests/onchain.rs:67
↓ 2 callers
Function
create_and_start_program_user_account_onchain_test
( user_account_pubkey: &Pubkey, program_id: &Pubkey, signer_pubkey: &Pubkey, )
program/tests/onchain.rs:3371
↓ 2 callers
Function
ell_instruction_d_c3
( f_range: &mut Vec<u8>, p_y_range: &Vec<u8>, p_x_range: &Vec<u8>, current_coeff_3_range: &mut
program/src/groth16_verifier/miller_loop/instructions.rs:465
↓ 2 callers
Function
g_ic_into_affine_1
There are two ix in total to turn the g_ic from projective into affine. In the end the affine's stored in the x_1_range (overwrite). The verifier then
program/src/groth16_verifier/prepare_inputs/instructions.rs:290
↓ 2 callers
Function
g_ic_into_affine_2
( g_ic_x_range: &Vec<u8>, g_ic_y_range: &Vec<u8>, g_ic_z_range: &Vec<u8>, x_1_range: &mut Vec<
program/src/groth16_verifier/prepare_inputs/instructions.rs:305
↓ 2 callers
Method
generate_proof
Returns the authentication path from leaf at `index` to root.
program/tests/offchain_merkle_tree.rs:345
↓ 2 callers
Function
get_mock_state
( mode: &str, signer_keypair: &solana_sdk::signer::keypair::Keypair, )
program/tests/onchain.rs:376
↓ 2 callers
Function
get_proof_from_bytes
( proof_bytes: &Vec<u8>, )
program/tests/test_utils/mod.rs:81
↓ 2 callers
Function
get_public_inputs_from_bytes
( public_inputs_bytes: &Vec<u8>, )
program/tests/test_utils/mod.rs:96
↓ 2 callers
Function
initialize
(tree: &mut MockSmtMerkleTree, treelevels: usize, mut zero_value: Vec<u8>)
program/tests/offchain_merkle_tree.rs:543
↓ 2 callers
Function
insert_last_double
( merkle_tree_account: &mut MerkleTree, tmp_storage_account: &mut TmpStoragePda, )
program/src/poseidon_merkle_tree/instructions.rs:87
↓ 2 callers
Function
is_left_child
(index: usize)
program/tests/offchain_merkle_tree.rs:497
↓ 2 callers
Function
is_root
(index: usize)
program/tests/offchain_merkle_tree.rs:467
↓ 2 callers
Function
parse_proof_b_to_bytes
( proof: ark_ec::models::bn::g2::G2Affine<ark_bn254::Parameters>, range: &mut Vec<u8>, )
program/src/groth16_verifier/parsers.rs:242
↓ 2 callers
Function
parse_r_from_bytes
( range: &Vec<u8>, )
program/src/groth16_verifier/parsers.rs:222
↓ 2 callers
Function
permute_instruction_3
( state: &mut Vec<Vec<u8>>, current_round: &mut usize, current_round_index: &mut usize, )
program/src/poseidon_merkle_tree/instructions_poseidon.rs:83
↓ 2 callers
Function
permute_instruction_6
( state: &mut Vec<Vec<u8>>, current_round: &mut usize, current_round_index: &mut usize, )
program/src/poseidon_merkle_tree/instructions_poseidon.rs:54
↓ 2 callers
Function
permute_instruction_first
instructions
program/src/poseidon_merkle_tree/instructions_poseidon.rs:26
↓ 2 callers
Function
permute_instruction_last
( state: &mut Vec<Vec<u8>>, current_round: &mut usize, current_round_index: &mut usize, )
program/src/poseidon_merkle_tree/instructions_poseidon.rs:112
↓ 2 callers
Method
process_instruction
(&mut self, accounts: &[AccountInfo])
program/src/poseidon_merkle_tree/processor.rs:98
↓ 2 callers
Function
processor_poseidon
defining processor function for testing
program/src/poseidon_merkle_tree/instructions_poseidon.rs:234
↓ 2 callers
Function
pubkey_check
( account_pubkey0: Pubkey, account_pubkey1: Pubkey, msg: String, )
program/src/poseidon_merkle_tree/processor.rs:351
↓ 2 callers
Function
right_child
(index: usize)
program/tests/offchain_merkle_tree.rs:479
↓ 2 callers
Function
select_left_right_bytes
Convert `computed_hash` and `sibling_hash` to bytes. `index` is the first `path.len()` bits of the position of tree. If the least significant bit of
program/tests/offchain_merkle_tree.rs:115
↓ 2 callers
Function
select_left_right_bytes_transform
( index: usize, computed_hash: &B, sibling_hash: &B, )
program/tests/offchain_merkle_tree.rs:129
↓ 2 callers
Function
sol_transfer
( from_account: &AccountInfo, dest_account: &AccountInfo, amount: u64, )
program/src/instructions.rs:251
↓ 2 callers
Function
tree_height
(num_leaves: usize)
program/tests/offchain_merkle_tree.rs:458
↓ 2 callers
Function
update_merkle_tree
( program_id: &Pubkey, merkle_tree_pda_pubkey: &Pubkey, tmp_storage_pda_pubkey: &Pubkey, signe
program/tests/onchain.rs:283
↓ 2 callers
Function
verify_result
(main_account_data: &FinalExponentiationState)
program/src/groth16_verifier/final_exponentiation/instructions.rs:20
↓ 1 callers
Function
add_token_account_with_address
( program_test: &mut ProgramTest, token_address: Pubkey, mint: Pubkey, owner:
program/tests/test_utils/mod.rs:251
next →
1–100 of 413, ranked by callers