Conversation
WalkthroughThis PR updates feature flag configuration and dependency declarations across multiple Cargo manifests, making Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
program-libs/ctoken-types/src/state/mint/compressed_mint.rs (1)
80-84: Fix typo in error message.Line 82 contains "shaflat" which appears to be a typo. Did you mean "shaflake" or another term? Please verify and correct the message.
🧹 Nitpick comments (1)
program-libs/concurrent-merkle-tree/Cargo.toml (1)
11-11: LGTM! Correct refactor of feature propagation.The changes properly refactor feature propagation:
- Line 11: The
solanafeature now explicitly enableslight-bounded-vec/solana- Line 16: The dependency declaration is simplified to
{ workspace = true }This is the correct Cargo pattern - features should be enabled in the
[features]section rather than hardcoded in[dependencies]. This makes the feature activation conditional and more flexible.Also applies to: 16-16
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
Cargo.toml(1 hunks)program-libs/account-checks/Cargo.toml(2 hunks)program-libs/account-checks/src/account_iterator.rs(7 hunks)program-libs/account-checks/src/checks.rs(1 hunks)program-libs/account-checks/src/packed_accounts.rs(2 hunks)program-libs/batched-merkle-tree/Cargo.toml(2 hunks)program-libs/compressed-account/Cargo.toml(1 hunks)program-libs/compressible/Cargo.toml(2 hunks)program-libs/compressible/src/compression_info.rs(2 hunks)program-libs/concurrent-merkle-tree/Cargo.toml(1 hunks)program-libs/ctoken-types/Cargo.toml(2 hunks)program-libs/ctoken-types/src/state/mint/compressed_mint.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
program-libs/account-checks/src/checks.rs
📄 CodeRabbit inference engine (program-libs/account-checks/CLAUDE.md)
Expose and maintain account validation helpers (check_owner, check_program, check_mut/non_mut, check_signer, check_discriminator, set_discriminator, check_pda_seeds, check_account_balance_is_rent_exempt, account_info_init) in checks.rs
Files:
program-libs/account-checks/src/checks.rs
program-libs/account-checks/src/**/*.rs
📄 CodeRabbit inference engine (program-libs/account-checks/CLAUDE.md)
program-libs/account-checks/src/**/*.rs: On account initialization, call account_info_init to set the 8-byte discriminator
Validate account type with 8-byte discriminators using check_discriminator before deserialization
Return AccountError variants (codes 12006–12021) and rely on automatic ProgramError conversions; avoid returning raw ProgramError directly
Files:
program-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
program-libs/account-checks/src/packed_accounts.rs
📄 CodeRabbit inference engine (program-libs/account-checks/CLAUDE.md)
For dynamic account sets, use PackedAccounts for index-based access with bounds checks instead of manual indexing
Files:
program-libs/account-checks/src/packed_accounts.rs
program-libs/account-checks/src/account_iterator.rs
📄 CodeRabbit inference engine (program-libs/account-checks/CLAUDE.md)
Use AccountIterator for sequential account retrieval to get precise file:line:column error locations; avoid manual index handling
Files:
program-libs/account-checks/src/account_iterator.rs
program-libs/account-checks/**/Cargo.toml
📄 CodeRabbit inference engine (program-libs/account-checks/CLAUDE.md)
Define features solana, pinocchio, and test-only in Cargo.toml; default build should enable none
Files:
program-libs/account-checks/Cargo.toml
🧠 Learnings (33)
📓 Common learnings
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/**/Cargo.toml : Define features solana, pinocchio, and test-only in Cargo.toml; default build should enable none
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/account_info/{solana.rs,pinocchio.rs,test_account_info.rs} : Gate SDK-specific implementations with #[cfg(feature = "solana"|"pinocchio"|"test-only")]
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/batched-merkle-tree/Cargo.tomlprogram-libs/compressible/Cargo.tomlprogram-libs/account-checks/Cargo.tomlprogram-libs/ctoken-types/Cargo.toml
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/**/Cargo.toml : Define features solana, pinocchio, and test-only in Cargo.toml; default build should enable none
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsCargo.tomlprogram-libs/batched-merkle-tree/Cargo.tomlprogram-libs/compressible/Cargo.tomlprogram-libs/account-checks/Cargo.tomlprogram-libs/ctoken-types/Cargo.toml
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/src/config.rs : Ensure serialization compatibility across Anchor, Pinocchio, and Borsh for core account types used by dependent programs
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsCargo.tomlprogram-libs/compressible/Cargo.tomlprogram-libs/ctoken-types/Cargo.toml
📚 Learning: 2025-10-15T03:46:03.556Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/docs/instructions/CLAUDE.md:0-0
Timestamp: 2025-10-15T03:46:03.556Z
Learning: Applies to programs/compressed-token/program/docs/instructions/instructions/MINT_ACTION.md : Document Mint operations and compressed mint management (9 actions) in instructions/MINT_ACTION.md
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rs
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/src/config.rs : Maintain CompressibleConfig account structure with Anchor/Borsh/Pod (Pinocchio/Pod) serialization and related state validation methods (validate_active, validate_not_inactive) in src/config.rs
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/ctoken-types/Cargo.toml
📚 Learning: 2025-10-16T06:33:55.362Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:55.362Z
Learning: Applies to programs/compressed-token/program/program-libs/ctoken-types/** : Define all state and instruction data structures in the light-ctoken-types crate (program-libs/ctoken-types), including state/, instructions/, and state/extensions/
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsCargo.toml
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/src/config.rs : Provide default initialization for the CToken V1 config in CompressibleConfig
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/account_info/account_info_trait.rs : Ensure the crate compiles with no features enabled by keeping trait definitions free of SDK-specific dependencies
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/account-checks/Cargo.toml
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/account_info/{solana.rs,pinocchio.rs,test_account_info.rs} : Provide SDK-specific AccountInfoTrait implementations in account_info/{solana.rs,pinocchio.rs,test_account_info.rs}
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/batched-merkle-tree/Cargo.tomlprogram-libs/compressible/Cargo.tomlprogram-libs/account-checks/Cargo.tomlprogram-libs/ctoken-types/Cargo.toml
📚 Learning: 2025-10-15T03:46:26.767Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/registry/CLAUDE.md:0-0
Timestamp: 2025-10-15T03:46:26.767Z
Learning: Applies to programs/registry/src/account_compression_cpi/mod.rs : Export each new operation module by adding pub mod <operation>; and re-export with pub use <operation>::*.
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/src/error.rs : Define error types with numeric codes in the 19xxx range and propagate hasher errors in the 7xxx range; include ProgramError conversions (Anchor, Pinocchio, Solana) in src/error.rs
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/batched-merkle-tree/Cargo.toml
📚 Learning: 2025-08-14T00:36:53.191Z
Learnt from: ananas-block
Repo: Lightprotocol/light-protocol PR: 1909
File: program-libs/zero-copy/src/init_mut.rs:241-249
Timestamp: 2025-08-14T00:36:53.191Z
Learning: In the light-protocol zero-copy crate, performance is prioritized over safety checks for edge cases like Vec lengths exceeding u32::MAX, even when there might be wire format inconsistencies.
Applied to files:
program-libs/ctoken-types/src/state/mint/compressed_mint.rsprogram-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/discriminator.rs : Define and keep discriminator constants and the Discriminator trait in discriminator.rs for compile-time verification
Applied to files:
program-libs/account-checks/src/checks.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/**/*.rs : Validate account type with 8-byte discriminators using check_discriminator before deserialization
Applied to files:
program-libs/account-checks/src/checks.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/checks.rs : Expose and maintain account validation helpers (check_owner, check_program, check_mut/non_mut, check_signer, check_discriminator, set_discriminator, check_pda_seeds, check_account_balance_is_rent_exempt, account_info_init) in checks.rs
Applied to files:
program-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:52.712Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/docs/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:52.712Z
Learning: Applies to program-libs/account-checks/docs/**/DISCRIMINATOR.md : DISCRIMINATOR.md must document 8-byte discriminators, the Discriminator trait, constant arrays for compile-time checks, and integration with account initialization
Applied to files:
program-libs/account-checks/src/checks.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/**/*.rs : On account initialization, call account_info_init to set the 8-byte discriminator
Applied to files:
program-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/account_info/test_account_info.rs : Use the mock AccountInfo implementation under the test-only feature for unit tests
Applied to files:
program-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/!(account_info)/**/*.rs : Use AccountInfoTrait for runtime-agnostic account handling; avoid direct solana-program or pinocchio AccountInfo in general logic
Applied to files:
program-libs/account-checks/src/checks.rsprogram-libs/account-checks/src/packed_accounts.rsprogram-libs/compressed-account/Cargo.tomlprogram-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/account-checks/src/account_iterator.rsprogram-libs/compressible/src/compression_info.rsprogram-libs/batched-merkle-tree/Cargo.tomlprogram-libs/account-checks/Cargo.toml
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/packed_accounts.rs : For dynamic account sets, use PackedAccounts for index-based access with bounds checks instead of manual indexing
Applied to files:
program-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/account_iterator.rs : Use AccountIterator for sequential account retrieval to get precise file:line:column error locations; avoid manual index handling
Applied to files:
program-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/**/*.rs : Return AccountError variants (codes 12006–12021) and rely on automatic ProgramError conversions; avoid returning raw ProgramError directly
Applied to files:
program-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:25.222Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:25.222Z
Learning: Applies to program-libs/account-checks/src/error.rs : Maintain stable mapping of AccountError to ProgramError, including Pinocchio code mapping (1–11), in error.rs
Applied to files:
program-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-15T03:46:26.767Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/registry/CLAUDE.md:0-0
Timestamp: 2025-10-15T03:46:26.767Z
Learning: Applies to programs/registry/src/lib.rs : Load accounts according to type before check_forester: batched via BatchedMerkleTreeAccount::type_from_account_info(); regular via ctx.accounts.account.load()?.metadata; use custom deserialization when required.
Applied to files:
program-libs/account-checks/src/packed_accounts.rsprogram-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-11T21:59:52.712Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/docs/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:52.712Z
Learning: Applies to program-libs/account-checks/docs/**/{ACCOUNT_INFO_TRAIT.md,ACCOUNT_CHECKS.md,ACCOUNT_ITERATOR.md,DISCRIMINATOR.md,ERRORS.md,PACKED_ACCOUNTS.md} : Code examples should demonstrate both Solana and Pinocchio usage where applicable
Applied to files:
program-libs/concurrent-merkle-tree/Cargo.tomlprogram-libs/batched-merkle-tree/Cargo.tomlprogram-libs/compressible/Cargo.toml
📚 Learning: 2025-10-11T21:59:52.712Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/account-checks/docs/CLAUDE.md:0-0
Timestamp: 2025-10-11T21:59:52.712Z
Learning: Applies to program-libs/account-checks/docs/**/ACCOUNT_ITERATOR.md : ACCOUNT_ITERATOR.md must document the enhanced account iterator, including sequential processing, automatic validation, and location-based error reporting for debugging
Applied to files:
program-libs/account-checks/src/account_iterator.rs
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/docs/SOLANA_RENT.md : Maintain a comparison of Solana vs Light Protocol rent systems in docs/SOLANA_RENT.md
Applied to files:
program-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-16T06:33:19.426Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: program-libs/compressible/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:19.426Z
Learning: Applies to program-libs/compressible/src/rent.rs : Implement and maintain rent calculation algorithms (rent_curve_per_epoch, calculate_rent_and_balance, claimable_lamports, calculate_close_lamports) in src/rent.rs
Applied to files:
program-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-16T06:33:55.362Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:55.362Z
Learning: When working with ctoken accounts that have the Compressible extension, consult the rent system documentation (RENT.md, CONFIG_ACCOUNT.md, SOLANA_RENT.md) to follow rent authority, compression, and lamport distribution rules
Applied to files:
program-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-15T03:46:03.556Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/docs/instructions/CLAUDE.md:0-0
Timestamp: 2025-10-15T03:46:03.556Z
Learning: Applies to programs/compressed-token/program/docs/instructions/instructions/CLAIM.md : Document rent reclamation from expired compressible accounts in instructions/CLAIM.md
Applied to files:
program-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-16T06:33:55.362Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:55.362Z
Learning: Applies to programs/compressed-token/program/src/create_token_account.rs : Create Token Account instruction must validate that the config state is ACTIVE only
Applied to files:
program-libs/compressible/src/compression_info.rs
📚 Learning: 2025-10-16T06:33:55.362Z
Learnt from: CR
Repo: Lightprotocol/light-protocol PR: 0
File: programs/compressed-token/program/CLAUDE.md:0-0
Timestamp: 2025-10-16T06:33:55.362Z
Learning: Applies to programs/compressed-token/program/src/create_associated_token_account.rs : Create Associated Token Account instruction must validate that the config state is ACTIVE only
Applied to files:
program-libs/compressible/src/compression_info.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: Test program-libs-slow
- GitHub Check: Forester e2e test
- GitHub Check: Test program-libs-fast
- GitHub Check: Test batched-merkle-tree-simulate
- GitHub Check: cli-v1
- GitHub Check: stateless-js-v2
- GitHub Check: programs (system-cpi-test, ["cargo-test-sbf -p system-cpi-test", "cargo test -p light-system-prog...
- GitHub Check: programs (system-cpi-test-v2-functional-read-only, ["cargo-test-sbf -p system-cpi-v2-test -- func...
- GitHub Check: system-programs (anchor & pinocchio, ["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -p sdk...
- GitHub Check: programs (compressed-token-batched-tree, ["cargo-test-sbf -p compressed-token-test -- test_transf...
- GitHub Check: programs (compressed-token-and-e2e, ["cargo-test-sbf -p compressed-token-test --test v1", "cargo-...
- GitHub Check: programs (system-cpi-test-v2-functional-account-infos, ["cargo-test-sbf -p system-cpi-v2-test -- ...
- GitHub Check: system-programs (native, ["cargo-test-sbf -p sdk-native-test", "cargo-test-sbf -p sdk-v1-native-t...
- GitHub Check: programs (light-system-program-compression, ["cargo-test-sbf -p system-test -- test_with_compress...
- GitHub Check: system-programs (sdk-libs, light-sdk-macros light-sdk light-program-test light-client light-compr...
- GitHub Check: programs (light-system-program-address, ["cargo-test-sbf -p system-test -- test_with_address", "c...
- GitHub Check: system-programs (token test, ["cargo-test-sbf -p sdk-token-test"])
- GitHub Check: programs (account-compression-and-registry, ["cargo-test-sbf -p account-compression-test", "cargo...
- GitHub Check: lint
- GitHub Check: cli-v2
- GitHub Check: stateless-js-v1
🔇 Additional comments (13)
program-libs/account-checks/src/checks.rs (1)
84-84: LGTM! Feature gating is correct.The conditional compilation guard correctly requires both
msgandstdfeatures for logging, aligning with the PR's objective of making message/logging functionality optional.Cargo.toml (1)
213-213: Verify if the version bump is intentional.The
light-bounded-vecversion is updated from2.0.0to2.0.1. Please confirm whether this patch version bump is related to the feature gate changes or if it should be in a separate commit.program-libs/account-checks/src/packed_accounts.rs (1)
1-2: LGTM! Feature gating is consistent.The conditional compilation guards correctly require both
msgandstdfeatures for theLocationtype and error message emission. This aligns with the PR's objective and is consistent with the gating pattern applied in other files.Also applies to: 18-25
program-libs/account-checks/src/account_iterator.rs (1)
51-58: LGTM! Comprehensive and consistent feature gating.The conditional compilation guards are correctly applied throughout the iterator:
- Error messages in
next_accountandremainingare gated bymsgandstd- The
print_on_errormethods properly gate logging- The
print_on_error_pubkeymethod correctly requires thesolanafeature forPubkeyformatting- Negative guards handle unused variables when features are disabled
Also applies to: 186-194, 238-249, 260-285
program-libs/compressible/src/compression_info.rs (1)
215-221: LGTM! Logging is properly gated behind the solana feature.The
solana_msg::msg!calls are correctly gated by thesolanafeature using fully-qualified paths. The control flow remains unchanged - error returns occur regardless of whether logging is enabled.Also applies to: 230-236
program-libs/compressible/Cargo.toml (1)
8-8: LGTM! Feature configuration is correct.The changes correctly:
- Add
solana-msgto thesolanafeature set- Mark
solana-msgas optional in dependenciesThis aligns with the PR's objective and is consistent with the pattern applied in other crates.
Also applies to: 22-22
program-libs/compressed-account/Cargo.toml (2)
12-13: LGTM! solana-msg correctly moved to solana feature.The changes correctly move
solana-msgfrom thestdfeature to thesolanafeature, aligning with the PR's objective of making message/logging functionality optional and gating it appropriately.
17-17: Verify if the new-unique feature is related to this PR.A new feature
new-uniquehas been added. Please confirm whether this is related to the feature gate fixes or if it should be in a separate PR/commit.program-libs/account-checks/Cargo.toml (1)
17-19: LGTM! Core feature configuration for the msg feature.The changes correctly:
- Introduce a new
msgfeature that depends onsolana-msg- Include
msgin thesolanafeature set- Mark
solana-msgas optional in dependenciesThis enables the conditional compilation changes throughout the crate and aligns perfectly with the PR's objective of making message/logging functionality optional.
Also applies to: 31-31
program-libs/ctoken-types/src/state/mint/compressed_mint.rs (1)
6-7: LGTM! Conditional import is correctly gated.The import of
solana_msg::msgis properly gated behind thesolanafeature, allowing the crate to be built without Solana-specific logging functionality.program-libs/batched-merkle-tree/Cargo.toml (2)
17-17: LGTM! Correct pattern for optional solana-msg.The changes correctly gate
solana-msgbehind thesolanafeature by:
- Adding it to the
solanafeature set (line 17)- Marking the dependency as optional (line 43)
This aligns with the workspace-wide pattern for making Solana-specific logging optional.
Also applies to: 43-43
10-10: Verify default feature alignment with crate policy.Line 10 sets
default = ["solana"], which enables the Solana feature by default. However, the retrieved learnings indicate that "default build should enable none" for program-libs crates. Please confirm whether this default is intentional for this specific crate or should be changed todefault = [].Based on learnings.
program-libs/ctoken-types/Cargo.toml (1)
8-8: LGTM! Proper feature gating for solana-msg.The changes correctly implement optional
solana-msgsupport:
- Line 8: Added to the
solanafeature set- Line 33: Marked as optional dependency
This enables the conditional compilation used in
compressed_mint.rswhere#[cfg(feature = "solana")]gates the message logging.Also applies to: 33-33
Summary by CodeRabbit