Skip to content

Commit 76354ed

Browse files
committed
fix: enable cpi_context in tree info lookups and add docs
- types.rs: Use tree_info.cpi_context from QUEUE_TREE_MAPPING instead of None in V1 API compatibility layer. This ensures CPI context is properly propagated. - constants.rs: Add documentation for address lookup table constants explaining their purpose in reducing transaction size.
1 parent 4e5c552 commit 76354ed

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

sdk-libs/client/src/constants.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
use solana_pubkey::{pubkey, Pubkey};
22

3+
/// Address lookup table containing state Merkle tree pubkeys for mainnet-beta.
4+
/// Used to reduce transaction size by referencing trees via lookup table indices.
35
pub const STATE_TREE_LOOKUP_TABLE_MAINNET: Pubkey =
46
pubkey!("7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st");
7+
8+
/// Address lookup table containing nullifier queue pubkeys for mainnet-beta.
9+
/// Used to reduce transaction size by referencing queues via lookup table indices.
510
pub const NULLIFIED_STATE_TREE_LOOKUP_TABLE_MAINNET: Pubkey =
611
pubkey!("H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT");
712

13+
/// Address lookup table containing state Merkle tree pubkeys for devnet.
14+
/// Used to reduce transaction size by referencing trees via lookup table indices.
815
pub const STATE_TREE_LOOKUP_TABLE_DEVNET: Pubkey =
916
pubkey!("8n8rH2bFRVA6cSGNDpgqcKHCndbFCT1bXxAQG89ejVsh");
17+
18+
/// Address lookup table containing nullifier queue pubkeys for devnet.
19+
/// Used to reduce transaction size by referencing queues via lookup table indices.
1020
pub const NULLIFIED_STATE_TREE_LOOKUP_TABLE_DEVNET: Pubkey =
1121
pubkey!("5dhaJLBjnVBQFErr8oiCJmcVsx3Zj6xDekGB2zULPsnP");

sdk-libs/client/src/indexer/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl ValidityProofWithContext {
298298
tree_type: tree_info.tree_type,
299299
tree: tree_pubkey,
300300
queue: tree_info.queue,
301-
cpi_context: None,
301+
cpi_context: tree_info.cpi_context,
302302
next_tree_info: None,
303303
},
304304
})

0 commit comments

Comments
 (0)