chore: rename remaining ctoken/cmint to light-token/light-mint in sdk comments#2313
chore: rename remaining ctoken/cmint to light-token/light-mint in sdk comments#2313
Conversation
… comments Continuation of #2299. Renames old terminology (ctoken, CToken, cmint, compressed mint, token pool) to new names (light-token, Light Token, light-mint, Light Mint, SPL interface PDA) across sdk-libs/ and sdk-tests/ comments and documentation. Only comments, doc strings, and markdown files are changed — no code identifiers, variable names, or module paths were modified.
📝 WalkthroughWalkthroughA systematic renaming of terminology across the Light SDK codebase: "compressed token/mint" becomes "light token/mint," "ctoken" becomes "light-token," and "token pool PDA" becomes "SPL interface PDA." Includes minimal API expansions (new struct fields, constructors) in v2 transfer and mint modules. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (10)
sdk-libs/token-pinocchio/src/instruction/mint_to.rs (1)
13-30:⚠️ Potential issue | 🟡 MinorFix stale
MintToCpidoc example fields.Line 26 shows
max_top_up, butMintToCpino longer has that field (it hasfee_payer). This example is now misleading for consumers.📝 Suggested doc fix
/// MintToCpi { /// mint: &ctx.accounts.mint, /// destination: &ctx.accounts.destination, /// amount: 100, /// authority: &ctx.accounts.authority, /// system_program: &ctx.accounts.system_program, -/// max_top_up: None, /// fee_payer: None, /// }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/token-pinocchio/src/instruction/mint_to.rs` around lines 13 - 30, Update the stale doc example for MintToCpi: remove the nonexistent max_top_up field and ensure the current fields are shown (e.g., mint, destination, amount, authority, system_program, and fee_payer) so the example matches the MintToCpi struct; locate the example in the mint_to.rs doc block that references MintToCpi and replace the struct literal to include fee_payer (and any other current fields) and omit max_top_up.sdk-libs/macros/src/light_pdas/program/instructions.rs (1)
771-776: 🧹 Nitpick | 🔵 TrivialComment now diverges from the function it annotates — track for follow-up rename.
The updated comment correctly says "Light Token seed provider impls", but the function it documents is still named
generate_ctoken_seed_provider_implementation(line 775). Per the PR's stated scope this is intentional, yet the drift between the comment and the code identifier will keep catching readers' eyes until the function itself is renamed.- // Light Token seed provider impls (one per token variant) + // Light Token seed provider impls (one per token variant) + // TODO: rename `generate_ctoken_seed_provider_implementation` → `generate_light_token_seed_provider_implementation` if let Some(ref seeds) = token_seeds { if !seeds.is_empty() { let impl_code = super::seed_codegen::generate_ctoken_seed_provider_implementation(seeds)?;Consider opening a follow-up issue to rename the function and any siblings in
seed_codegenthat still carryctokenin their identifiers.Would you like me to open a tracking issue for the
generate_ctoken_seed_provider_implementation→generate_light_token_seed_provider_implementationrename (and any relatedseed_codegensiblings)?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/macros/src/light_pdas/program/instructions.rs` around lines 771 - 776, The comment/identifier drift: rename the function generate_ctoken_seed_provider_implementation in the seed_codegen module to generate_light_token_seed_provider_implementation (and update any sibling functions that include "ctoken") and then update all call sites (e.g., the invocation in program/instructions.rs), public exports, use/imports, docs, and tests to the new name; search the seed_codegen module for any remaining "ctoken" identifiers and replace them consistently, run cargo build/test to ensure nothing breaks, or if you prefer not to rename now create a tracking issue describing the rename from generate_ctoken_seed_provider_implementation → generate_light_token_seed_provider_implementation and list all seed_codegen siblings that need the same change.sdk-libs/event/src/event.rs (1)
10-18: 🧹 Nitpick | 🔵 TrivialOpportunity: add struct-level doc comments to
BatchPublicTransactionEventandPublicTransactionEvent.Since this is a documentation-focused PR, it's a great time to add the missing top-level doc comments for both public structs. The coding guidelines explicitly require comprehensive documentation for these types, including their field semantics.
📝 Proposed additions
+/// Batch of compressed-account transaction events, enriched with address, +/// nullifier, and sequence-number data not present in `PublicTransactionEvent`. +/// +/// - `event` — the base event (input/output hashes, relay fee, etc.) +/// - `new_addresses` — freshly inserted addresses with their Merkle-tree placement +/// - `input_sequence_numbers` / `address_sequence_numbers` — per-tree sequence numbers +/// - `tx_hash` — 32-byte transaction hash +/// - `batch_input_accounts` — nullifier contexts for every spent account #[derive(Debug, Clone, Default, PartialEq)] pub struct BatchPublicTransactionEvent {+/// On-chain event emitted by the Light System Program for every transaction +/// that creates or spends compressed accounts. +/// +/// - `input_compressed_account_hashes` — hashes of all consumed accounts +/// - `output_compressed_account_hashes` — hashes of all newly created accounts +/// - `output_compressed_accounts` — full account data with packed Merkle context +/// - `ata_owners` — ATA owner metadata for light-token `compress_and_close` outputs #[derive(Debug, Clone, BorshSerialize, BorshDeserialize, Default, PartialEq)] pub struct PublicTransactionEvent {Based on learnings: "Maintain comprehensive documentation for public types and functions including
PublicTransactionEvent,BatchPublicTransactionEvent, andevent_from_light_transactionin the event parsing module" and "Provide type descriptions for event types:PublicTransactionEventshould contain input/output compressed account hashes, andBatchPublicTransactionEventshould contain accounts, addresses, and sequence numbers."Also applies to: 20-35
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/event/src/event.rs` around lines 10 - 18, Add comprehensive struct-level doc comments for PublicTransactionEvent and BatchPublicTransactionEvent (and update event_from_light_transaction docs) describing the purpose and semantics of each public field: for PublicTransactionEvent explain it holds compressed input/output account hashes and their meanings; for BatchPublicTransactionEvent document event, new_addresses, input_sequence_numbers, address_sequence_numbers, tx_hash, and batch_input_accounts (what each represents and any invariants, e.g., ordering or length relationships). Place these docs above the respective struct declarations (PublicTransactionEvent, BatchPublicTransactionEvent) and extend the doc for event_from_light_transaction to note how it constructs these types and any expectations about inputs/outputs per the project coding guidelines.sdk-libs/program-test/src/forester/compress_and_close_forester.rs (2)
44-44:⚠️ Potential issue | 🟠 MajorHardcoded
current_epoch = 0will derive the wrong forester PDA on any live epoch.The forester epoch PDA is keyed by epoch number. Hardcoding
0meansget_forester_epoch_pda_from_authorityalways returns the PDA for epoch 0, which will not match the actual registered forester once the protocol has advanced past the genesis epoch. Any transaction signed with the wrong PDA will be rejected by the registry program.🐛 Proposed fix: fetch the actual current epoch from the RPC/indexer
- let current_epoch = 0; + let current_epoch = rpc + .get_epoch_info() + .await + .map_err(|e| RpcError::CustomError(format!("Failed to get epoch info: {}", e)))? + .epoch;If the registry program tracks its own epoch counter (separate from Solana's epoch), substitute the appropriate getter.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/program-test/src/forester/compress_and_close_forester.rs` at line 44, The code hardcodes current_epoch = 0 which causes get_forester_epoch_pda_from_authority to derive the wrong PDA; replace the literal with a runtime fetch of the real epoch (e.g., call the indexer or RPC to get the current protocol epoch or use the registry program's epoch getter) and assign that value to current_epoch before calling get_forester_epoch_pda_from_authority so the derived PDA matches the active registered forester.
50-56:⚠️ Potential issue | 🔴 CriticalPass the correct
compression_authorityfrom account data to the instruction, and remove debug artifact.Line 50 constructs
configwith twoPubkey::default()arguments, makingcompression_authorityat line 55 a zero-derived PDA that doesn't match the on-chain authority. This wrong value is passed directly tobuild_compress_and_close_instructionat line 190 and becomes a writable account in the instruction (AccountMeta::new(compression_authority, false)). The registry program will attempt to write to a non-existent account and fail.The correct authority is already extracted from account extension data at line 124 (
current_authority), stored incompression_authority_pubkey(lines 127–164), and added to packed accounts at line 167. Use that value instead.Also remove the debug
println!at line 56.Proposed fix
- let config = CompressibleConfig::light_token_v1(Pubkey::default(), Pubkey::default()); - let compressible_config = CompressibleConfig::derive_v1_config_pda(®ISTRY_PROGRAM_ID).0; - - // Derive compression_authority PDA (uses u16 version) - let compression_authority = config.compression_authority; - println!("config compression_authority {:?}", compression_authority); // Validate inputThen at line 187–196:
let compress_and_close_ix = build_compress_and_close_instruction( authority.pubkey(), registered_forester_pda, - compression_authority, + compression_authority_pubkey, compressible_config, authority_index, destination_index, indices_vec, remaining_account_metas, );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/program-test/src/forester/compress_and_close_forester.rs` around lines 50 - 56, The code constructs a dummy CompressibleConfig via CompressibleConfig::light_token_v1 which yields a default/computed compression_authority that is incorrect — remove the debug println! and stop using config.compression_authority; instead pass the extracted on-chain authority variable compression_authority_pubkey (previously derived from current_authority in the account extension parsing) into build_compress_and_close_instruction so the instruction uses the real compression authority account already added to packed accounts; update any AccountMeta creation to reference compression_authority_pubkey (preserving writable/signer flags as required) rather than Pubkey::default()/config.compression_authority.sdk-libs/token-pinocchio/src/instruction/burn.rs (1)
20-29:⚠️ Potential issue | 🟡 MinorStale doc example —
max_top_upfield no longer exists onBurnCpi.The
rust,ignoreexample referencesmax_top_up: None, butBurnCpihas no such field (the struct goes directly fromsystem_programtofee_payer). A reader who copies this example will get a compile error.📝 Proposed fix
/// BurnCpi { /// source: &ctx.accounts.source, /// mint: &ctx.accounts.mint, /// amount: 100, /// authority: &ctx.accounts.authority, /// system_program: &ctx.accounts.system_program, -/// max_top_up: None, /// fee_payer: None, /// }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/token-pinocchio/src/instruction/burn.rs` around lines 20 - 29, The example doc for BurnCpi is stale because it includes a nonexistent field `max_top_up`; update the snippet in burn.rs to remove `max_top_up: None` so the struct initializer matches the current BurnCpi fields (e.g., keep `system_program: &ctx.accounts.system_program, fee_payer: None` and ensure the order/field names match the BurnCpi definition).sdk-libs/token-sdk/src/instruction/decompress.rs (1)
63-63:⚠️ Potential issue | 🟡 MinorMissed terminology rename: "cToken" still present in doc comment.
Line 63 still reads
/// Destination cToken account (must exist). This should be updated to "light-token account" to stay consistent with the rest of this PR's rename.Proposed fix
- /// Destination cToken account (must exist) + /// Destination light-token account (must exist)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/token-sdk/src/instruction/decompress.rs` at line 63, Update the leftover doc comment in sdk-libs/token-sdk/src/instruction/decompress.rs that reads "/// Destination cToken account (must exist)" to use the new terminology "light-token" (e.g., "/// Destination light-token account (must exist)"), ensuring the field/argument comment in the decompress instruction matches the PR-wide rename.sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/account_metas.rs (1)
184-193:⚠️ Potential issue | 🟡 MinorRemove the debug
println!statement from account-meta construction.This stray debug print adds an unexpected runtime side effect in SDK instruction-building code and should be removed before merging.
Suggested fix
- println!("config.with_anchor_none {}", config.with_anchor_none);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/account_metas.rs` around lines 184 - 193, Remove the stray debug print in the account-meta construction block: delete the println!("config.with_anchor_none {}", config.with_anchor_none); line so the function that builds metas (the code using config, metas, AccountMeta::new/AccountMeta::new_readonly and default_pubkeys.compressed_token_program) has no runtime side effects; ensure no other debug prints remain in that scope.sdk-libs/token-sdk/src/instruction/compressible.rs (1)
84-85:⚠️ Potential issue | 🔴 CriticalFix invalid module paths in doctest example —
ctoken::module does not exist.Lines 84–85 reference
ctoken::LIGHT_TOKEN_CONFIG,ctoken::config_pda(),ctoken::RENT_SPONSOR, andctoken::rent_sponsor_pda(). These symbols are not defined in anyctokenmodule withinlight_token. They exist inlight_token::constants— some are re-exported at the crate root (config_pda) while others are not (LIGHT_TOKEN_CONFIG). Update the example to use the correct paths:light_token::config_pda()andlight_token::constants::LIGHT_TOKEN_CONFIG/light_token::constants::RENT_SPONSORso the doctest compiles and users can follow the example.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/token-sdk/src/instruction/compressible.rs` around lines 84 - 85, Update the doctest example to use the actual module paths: replace references to ctoken::LIGHT_TOKEN_CONFIG and ctoken::RENT_SPONSOR with light_token::constants::LIGHT_TOKEN_CONFIG and light_token::constants::RENT_SPONSOR, and replace ctoken::config_pda() and ctoken::rent_sponsor_pda() with the re-exported light_token::config_pda() (and if needed light_token::rent_sponsor_pda() or the constant in light_token::constants), so the example imports and calls the correct symbols (refer to LIGHT_TOKEN_CONFIG, RENT_SPONSOR, config_pda, rent_sponsor_pda in the doctest).sdk-libs/sdk-types/src/interface/cpi/create_mints.rs (1)
868-873:⚠️ Potential issue | 🟠 MajorSilent
u64 → u32truncation inget_output_queue_next_indexcan corrupt decompress leaf indices.The raw account data holds a
u64atNEXT_INDEX_OFFSET, but the function narrows it tou32viaas u32. Rust'sascast wraps on overflow — no panic, no error — so any queue whosenext_indexexceedsu32::MAX(~4.3 billion) will return a silently wrongbase_leaf_index. That value flows directly intoinvoke_decompressas the leaf address for each prove-by-index CPI, meaning the wrong compressed account gets decompressed.Return
u64(or add a checked cast with an explicit error) and propagate throughCreateMintsParams::base_leaf_indexandinvoke_decompress.🐛 Proposed fix (minimal — add a checked cast)
- Ok(next_index as u32) + u32::try_from(next_index).map_err(|_| LightSdkTypesError::InvalidInstructionData)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sdk-libs/sdk-types/src/interface/cpi/create_mints.rs` around lines 868 - 873, The function get_output_queue_next_index currently reads a u64 from the account bytes at NEXT_INDEX_OFFSET then returns it cast with as u32 which silently truncates on overflow; change get_output_queue_next_index to return a u64 (or perform a checked cast using try_from and return an explicit error on overflow) and update all call sites including CreateMintsParams::base_leaf_index and the invoke_decompress invocation to accept and propagate a u64 (or handle the explicit error) so no u64→u32 silent truncation occurs when reading NEXT_INDEX_OFFSET.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@sdk-libs/compressed-token-sdk/src/compressed_token/v2/mint_to_compressed/account_metas.rs`:
- Line 167: Update the duplicated-word inline comment in account_metas.rs that
currently reads "Optional light mint account accounts" (near the Optional light
mint account accounts comment) to a clearer phrase such as "Optional light mint
accounts" so the comment is concise and readable; locate the comment in the
compressed_token/v2/mint_to_compressed/account_metas.rs file and replace the
text accordingly.
In `@sdk-libs/sdk-types/src/interface/cpi/create_mints.rs`:
- Line 4: Update the stale comment string "generic over `AccountInfoTrait`.
Account order matches the cToken program" in create_mints.rs so it uses the new
product name (replace "cToken program" with "Light Token program"); locate the
comment in the module/doc comment near the top of create_mints.rs and perform
the exact textual rename to keep the rest of the comment (including the
reference to `AccountInfoTrait`) unchanged.
In `@sdk-libs/sdk-types/src/interface/program/decompression/processor.rs`:
- Around line 330-331: The adjacent comment mixes the new "light-token" wording
with legacy struct field names (ctoken_rent_sponsor,
ctoken_compressible_config); update the comment near the token accounts layout
to add a brief annotation stating that "light-token" is the new terminology
while the ctoken_* identifiers are legacy field names kept for compatibility/PR
exclusion, e.g. a short parenthetical like "(\"light-token\" terminology used
here; legacy field names ctoken_rent_sponsor, ctoken_compressible_config
retained intentionally)"; place this annotation on the same or next line to make
the intent explicit.
In `@sdk-libs/token-sdk/src/instruction/transfer_from_spl.rs`:
- Line 54: Update the stale cToken reference in the top doc comment of
transfer_from_spl.rs: find the line that reads "Create a transfer SPL to cToken
instruction" and change it to "Create a transfer SPL to light-token instruction"
(or similar consistent light-token wording) so the doc block matches the
renamed/light-token terminology elsewhere in this module.
---
Outside diff comments:
In
`@sdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/account_metas.rs`:
- Around line 184-193: Remove the stray debug print in the account-meta
construction block: delete the println!("config.with_anchor_none {}",
config.with_anchor_none); line so the function that builds metas (the code using
config, metas, AccountMeta::new/AccountMeta::new_readonly and
default_pubkeys.compressed_token_program) has no runtime side effects; ensure no
other debug prints remain in that scope.
In `@sdk-libs/event/src/event.rs`:
- Around line 10-18: Add comprehensive struct-level doc comments for
PublicTransactionEvent and BatchPublicTransactionEvent (and update
event_from_light_transaction docs) describing the purpose and semantics of each
public field: for PublicTransactionEvent explain it holds compressed
input/output account hashes and their meanings; for BatchPublicTransactionEvent
document event, new_addresses, input_sequence_numbers, address_sequence_numbers,
tx_hash, and batch_input_accounts (what each represents and any invariants,
e.g., ordering or length relationships). Place these docs above the respective
struct declarations (PublicTransactionEvent, BatchPublicTransactionEvent) and
extend the doc for event_from_light_transaction to note how it constructs these
types and any expectations about inputs/outputs per the project coding
guidelines.
In `@sdk-libs/macros/src/light_pdas/program/instructions.rs`:
- Around line 771-776: The comment/identifier drift: rename the function
generate_ctoken_seed_provider_implementation in the seed_codegen module to
generate_light_token_seed_provider_implementation (and update any sibling
functions that include "ctoken") and then update all call sites (e.g., the
invocation in program/instructions.rs), public exports, use/imports, docs, and
tests to the new name; search the seed_codegen module for any remaining "ctoken"
identifiers and replace them consistently, run cargo build/test to ensure
nothing breaks, or if you prefer not to rename now create a tracking issue
describing the rename from generate_ctoken_seed_provider_implementation →
generate_light_token_seed_provider_implementation and list all seed_codegen
siblings that need the same change.
In `@sdk-libs/program-test/src/forester/compress_and_close_forester.rs`:
- Line 44: The code hardcodes current_epoch = 0 which causes
get_forester_epoch_pda_from_authority to derive the wrong PDA; replace the
literal with a runtime fetch of the real epoch (e.g., call the indexer or RPC to
get the current protocol epoch or use the registry program's epoch getter) and
assign that value to current_epoch before calling
get_forester_epoch_pda_from_authority so the derived PDA matches the active
registered forester.
- Around line 50-56: The code constructs a dummy CompressibleConfig via
CompressibleConfig::light_token_v1 which yields a default/computed
compression_authority that is incorrect — remove the debug println! and stop
using config.compression_authority; instead pass the extracted on-chain
authority variable compression_authority_pubkey (previously derived from
current_authority in the account extension parsing) into
build_compress_and_close_instruction so the instruction uses the real
compression authority account already added to packed accounts; update any
AccountMeta creation to reference compression_authority_pubkey (preserving
writable/signer flags as required) rather than
Pubkey::default()/config.compression_authority.
In `@sdk-libs/sdk-types/src/interface/cpi/create_mints.rs`:
- Around line 868-873: The function get_output_queue_next_index currently reads
a u64 from the account bytes at NEXT_INDEX_OFFSET then returns it cast with as
u32 which silently truncates on overflow; change get_output_queue_next_index to
return a u64 (or perform a checked cast using try_from and return an explicit
error on overflow) and update all call sites including
CreateMintsParams::base_leaf_index and the invoke_decompress invocation to
accept and propagate a u64 (or handle the explicit error) so no u64→u32 silent
truncation occurs when reading NEXT_INDEX_OFFSET.
In `@sdk-libs/token-pinocchio/src/instruction/burn.rs`:
- Around line 20-29: The example doc for BurnCpi is stale because it includes a
nonexistent field `max_top_up`; update the snippet in burn.rs to remove
`max_top_up: None` so the struct initializer matches the current BurnCpi fields
(e.g., keep `system_program: &ctx.accounts.system_program, fee_payer: None` and
ensure the order/field names match the BurnCpi definition).
In `@sdk-libs/token-pinocchio/src/instruction/mint_to.rs`:
- Around line 13-30: Update the stale doc example for MintToCpi: remove the
nonexistent max_top_up field and ensure the current fields are shown (e.g.,
mint, destination, amount, authority, system_program, and fee_payer) so the
example matches the MintToCpi struct; locate the example in the mint_to.rs doc
block that references MintToCpi and replace the struct literal to include
fee_payer (and any other current fields) and omit max_top_up.
In `@sdk-libs/token-sdk/src/instruction/compressible.rs`:
- Around line 84-85: Update the doctest example to use the actual module paths:
replace references to ctoken::LIGHT_TOKEN_CONFIG and ctoken::RENT_SPONSOR with
light_token::constants::LIGHT_TOKEN_CONFIG and
light_token::constants::RENT_SPONSOR, and replace ctoken::config_pda() and
ctoken::rent_sponsor_pda() with the re-exported light_token::config_pda() (and
if needed light_token::rent_sponsor_pda() or the constant in
light_token::constants), so the example imports and calls the correct symbols
(refer to LIGHT_TOKEN_CONFIG, RENT_SPONSOR, config_pda, rent_sponsor_pda in the
doctest).
In `@sdk-libs/token-sdk/src/instruction/decompress.rs`:
- Line 63: Update the leftover doc comment in
sdk-libs/token-sdk/src/instruction/decompress.rs that reads "/// Destination
cToken account (must exist)" to use the new terminology "light-token" (e.g.,
"/// Destination light-token account (must exist)"), ensuring the field/argument
comment in the decompress instruction matches the PR-wide rename.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (26)
sdk-tests/CLAUDE.mdis excluded by none and included by nonesdk-tests/anchor-semi-manual-test/tests/shared/mod.rsis excluded by none and included by nonesdk-tests/anchor-semi-manual-test/tests/test_create_all.rsis excluded by none and included by nonesdk-tests/anchor-semi-manual-test/tests/test_create_ata.rsis excluded by none and included by nonesdk-tests/client-test/tests/light_client.rsis excluded by none and included by nonesdk-tests/client-test/tests/light_program_test.rsis excluded by none and included by nonesdk-tests/csdk-anchor-full-derived-test/tests/amm_test.rsis excluded by none and included by nonesdk-tests/csdk-anchor-full-derived-test/tests/mint/metadata_test.rsis excluded by none and included by nonesdk-tests/pinocchio-light-program-test/tests/shared/mod.rsis excluded by none and included by nonesdk-tests/pinocchio-light-program-test/tests/stress_test.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/src/all/accounts.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/src/all/mod.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/src/two_mints/mod.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/tests/account_loader.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/tests/all.rsis excluded by none and included by nonesdk-tests/pinocchio-manual-test/tests/two_mints.rsis excluded by none and included by nonesdk-tests/sdk-light-token-pinocchio/README.mdis excluded by none and included by nonesdk-tests/sdk-light-token-pinocchio/tests/test_create_mint.rsis excluded by none and included by nonesdk-tests/sdk-light-token-test/README.mdis excluded by none and included by nonesdk-tests/sdk-light-token-test/tests/scenario_spl.rsis excluded by none and included by nonesdk-tests/sdk-light-token-test/tests/shared.rsis excluded by none and included by nonesdk-tests/sdk-light-token-test/tests/test_create_mint.rsis excluded by none and included by nonesdk-tests/sdk-light-token-test/tests/test_transfer_checked.rsis excluded by none and included by nonesdk-tests/sdk-light-token-test/tests/test_transfer_interface.rsis excluded by none and included by nonesdk-tests/single-account-loader-test/tests/test.rsis excluded by none and included by nonesdk-tests/single-ata-test/tests/test.rsis excluded by none and included by none
📒 Files selected for processing (88)
sdk-libs/account-pinocchio/src/lib.rssdk-libs/account/src/lib.rssdk-libs/client/src/interface/create_accounts_proof.rssdk-libs/compressed-token-sdk/README.mdsdk-libs/compressed-token-sdk/src/compat.rssdk-libs/compressed-token-sdk/src/compressed_token/mod.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/approve/instruction.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/batch_compress/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/account_infos.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v1/transfer/instruction.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/account2.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/compress_and_close.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/create_compressed_mint/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/create_compressed_mint/instruction.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/decompress_full.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/mint_action/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/mint_action/mod.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/mint_to_compressed/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/transfer2/instruction.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/update_compressed_mint/account_metas.rssdk-libs/compressed-token-sdk/src/compressed_token/v2/update_compressed_mint/instruction.rssdk-libs/compressed-token-sdk/src/lib.rssdk-libs/compressed-token-sdk/src/spl_interface.rssdk-libs/compressed-token-sdk/src/utils.rssdk-libs/event/src/event.rssdk-libs/instruction-decoder/src/core.rssdk-libs/instruction-decoder/src/lib.rssdk-libs/instruction-decoder/src/programs/ctoken.rssdk-libs/instruction-decoder/src/programs/mod.rssdk-libs/macros/docs/accounts/architecture.mdsdk-libs/macros/docs/accounts/associated_token.mdsdk-libs/macros/docs/accounts/mint.mdsdk-libs/macros/src/lib.rssdk-libs/macros/src/light_pdas/accounts/derive.rssdk-libs/macros/src/light_pdas/accounts/light_account.rssdk-libs/macros/src/light_pdas/parsing/accounts_struct.rssdk-libs/macros/src/light_pdas/program/instructions.rssdk-libs/program-test/src/compressible.rssdk-libs/program-test/src/forester/claim_forester.rssdk-libs/program-test/src/forester/compress_and_close_forester.rssdk-libs/program-test/src/program_test/test_rpc.rssdk-libs/sdk-types/src/cpi_context_write.rssdk-libs/sdk-types/src/interface/account/compression_info.rssdk-libs/sdk-types/src/interface/accounts/create_accounts.rssdk-libs/sdk-types/src/interface/cpi/create_mints.rssdk-libs/sdk-types/src/interface/cpi/create_token_accounts.rssdk-libs/sdk-types/src/interface/program/decompression/processor.rssdk-libs/sdk/src/lib.rssdk-libs/token-client/src/actions/create_mint.rssdk-libs/token-pinocchio/src/instruction/approve.rssdk-libs/token-pinocchio/src/instruction/burn.rssdk-libs/token-pinocchio/src/instruction/burn_checked.rssdk-libs/token-pinocchio/src/instruction/close.rssdk-libs/token-pinocchio/src/instruction/create.rssdk-libs/token-pinocchio/src/instruction/create_ata.rssdk-libs/token-pinocchio/src/instruction/create_mint.rssdk-libs/token-pinocchio/src/instruction/create_mints.rssdk-libs/token-pinocchio/src/instruction/freeze.rssdk-libs/token-pinocchio/src/instruction/mint_to.rssdk-libs/token-pinocchio/src/instruction/mint_to_checked.rssdk-libs/token-pinocchio/src/instruction/revoke.rssdk-libs/token-pinocchio/src/instruction/thaw.rssdk-libs/token-pinocchio/src/instruction/transfer.rssdk-libs/token-pinocchio/src/instruction/transfer_checked.rssdk-libs/token-pinocchio/src/instruction/transfer_from_spl.rssdk-libs/token-pinocchio/src/instruction/transfer_to_spl.rssdk-libs/token-sdk/src/instruction/burn.rssdk-libs/token-sdk/src/instruction/burn_checked.rssdk-libs/token-sdk/src/instruction/close.rssdk-libs/token-sdk/src/instruction/compressible.rssdk-libs/token-sdk/src/instruction/create.rssdk-libs/token-sdk/src/instruction/create_associated_token_account.rssdk-libs/token-sdk/src/instruction/create_ata.rssdk-libs/token-sdk/src/instruction/decompress.rssdk-libs/token-sdk/src/instruction/decompress_mint.rssdk-libs/token-sdk/src/instruction/mint_to.rssdk-libs/token-sdk/src/instruction/mint_to_checked.rssdk-libs/token-sdk/src/instruction/transfer.rssdk-libs/token-sdk/src/instruction/transfer_checked.rssdk-libs/token-sdk/src/instruction/transfer_from_spl.rssdk-libs/token-sdk/src/instruction/transfer_to_spl.rssdk-libs/token-types/src/account_infos/mint_to_compressed.rssdk-libs/token-types/src/account_infos/transfer.rssdk-libs/token-types/src/error.rssdk-libs/token-types/src/lib.rs
| } | ||
|
|
||
| // Optional decompressed mint accounts | ||
| // Optional light mint account accounts |
There was a problem hiding this comment.
Fix duplicated word in inline comment.
“Optional light mint account accounts” should be simplified for readability.
✏️ Suggested edit
- // Optional light mint account accounts
+ // Optional light mint accounts📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Optional light mint account accounts | |
| // Optional light mint accounts |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@sdk-libs/compressed-token-sdk/src/compressed_token/v2/mint_to_compressed/account_metas.rs`
at line 167, Update the duplicated-word inline comment in account_metas.rs that
currently reads "Optional light mint account accounts" (near the Optional light
mint account accounts comment) to a clearer phrase such as "Optional light mint
accounts" so the comment is concise and readable; locate the comment in the
compressed_token/v2/mint_to_compressed/account_metas.rs file and replace the
text accordingly.
| //! Generic CPI for creating multiple light mints. | ||
| //! | ||
| //! This module provides framework-agnostic mint creation via `CreateMintsCpi`, | ||
| //! generic over `AccountInfoTrait`. Account order matches the cToken program |
There was a problem hiding this comment.
Stale cToken program reference — rename missed on this line.
The PR renames cToken → Light Token throughout comments, but line 4 still says "the cToken program". This is the one spot in the file the automated rename didn't catch.
📝 Proposed fix
-/// generic over `AccountInfoTrait`. Account order matches the cToken program
+/// generic over `AccountInfoTrait`. Account order matches the Light Token program📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| //! generic over `AccountInfoTrait`. Account order matches the cToken program | |
| //! generic over `AccountInfoTrait`. Account order matches the Light Token program |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@sdk-libs/sdk-types/src/interface/cpi/create_mints.rs` at line 4, Update the
stale comment string "generic over `AccountInfoTrait`. Account order matches the
cToken program" in create_mints.rs so it uses the new product name (replace
"cToken program" with "Light Token program"); locate the comment in the
module/doc comment near the top of create_mints.rs and perform the exact textual
rename to keep the rest of the comment (including the reference to
`AccountInfoTrait`) unchanged.
| // Token (light-token) accounts layout (only required when token accounts are present): | ||
| // [3] ctoken_rent_sponsor, [6] ctoken_compressible_config |
There was a problem hiding this comment.
Minor clarity nit: mixed new prose and old identifier names in adjacent comment lines.
Line 330 now reads "light-token" while Line 331 still names the struct fields using the legacy ctoken_ prefix — this is intentional per the PR's exclusion policy, but readers may find the juxtaposition jarring. Consider annotating it so the intent is clear:
- // Token (light-token) accounts layout (only required when token accounts are present):
- // [3] ctoken_rent_sponsor, [6] ctoken_compressible_config
+ // Token (light-token) accounts layout (only required when token accounts are present):
+ // [3] ctoken_rent_sponsor (field name), [6] ctoken_compressible_config (field name)
+ // ^ legacy identifiers intentionally kept; only doc wording is renamed in this PR📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Token (light-token) accounts layout (only required when token accounts are present): | |
| // [3] ctoken_rent_sponsor, [6] ctoken_compressible_config | |
| // Token (light-token) accounts layout (only required when token accounts are present): | |
| // [3] ctoken_rent_sponsor (field name), [6] ctoken_compressible_config (field name) | |
| // ^ legacy identifiers intentionally kept; only doc wording is renamed in this PR |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@sdk-libs/sdk-types/src/interface/program/decompression/processor.rs` around
lines 330 - 331, The adjacent comment mixes the new "light-token" wording with
legacy struct field names (ctoken_rent_sponsor, ctoken_compressible_config);
update the comment near the token accounts layout to add a brief annotation
stating that "light-token" is the new terminology while the ctoken_* identifiers
are legacy field names kept for compatibility/PR exclusion, e.g. a short
parenthetical like "(\"light-token\" terminology used here; legacy field names
ctoken_rent_sponsor, ctoken_compressible_config retained intentionally)"; place
this annotation on the same or next line to make the intent explicit.
| } | ||
|
|
||
| /// # Transfer SPL to ctoken via CPI: | ||
| /// # Transfer SPL to light-token via CPI: |
There was a problem hiding this comment.
There’s still one stale cToken reference in this doc block.
Line 15 still reads “Create a transfer SPL to cToken instruction,” which conflicts with the rename objective and the updated light-token wording below.
Suggested doc fix
-/// # Create a transfer SPL to cToken instruction
+/// # Create a transfer SPL to light-token instruction🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@sdk-libs/token-sdk/src/instruction/transfer_from_spl.rs` at line 54, Update
the stale cToken reference in the top doc comment of transfer_from_spl.rs: find
the line that reads "Create a transfer SPL to cToken instruction" and change it
to "Create a transfer SPL to light-token instruction" (or similar consistent
light-token wording) so the doc block matches the renamed/light-token
terminology elsewhere in this module.
Summary
Continuation of #2299. Renames remaining old terminology in comments, doc strings, and markdown files across
sdk-libs/andsdk-tests/:ctoken/CToken/c-token→light-token/Light Tokencmint/CMint/compressed mint→light-mint/Light Minttoken pool→SPL interface PDAcompressed token(when referring to the program) →Light TokenNo code identifiers, variable names, struct names, or module paths were modified. Only comments, doc strings, and markdown documentation.
Scope
sdk-libs/: token-sdk, token-pinocchio, sdk-types, compressed-token-sdk, instruction-decoder, macros, program-test, sdk, clientsdk-tests/: sdk-light-token-test, sdk-light-token-pinocchio, csdk-anchor-full-derived-test, anchor-semi-manual-test, pinocchio-manual-test, client-test, single-account-loader-test, single-ata-testExclusions (intentionally not renamed)
ctoken_config,solana_ctoken_accounts, etc.)cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3mCTokenBurn,CTokenApprove, etc.)crate::programs::ctoken::...)Test plan
cargo buildpasses for all affected cratescargo testpasses for affected crates (comment-only changes)Summary by CodeRabbit
New Features
Documentation