chore: bump toolchain to 1.90#1945
Conversation
WalkthroughWorkspace dependency and toolchain upgrades (Solana crates to 2.3, Rust to 1.90); many APIs gained explicit lifetimes; Keypair deserialization switched from Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Forester as Forester
participant RPC as RPC/Cluster
rect rgba(230,245,255,0.6)
note right of Forester: transaction send outcomes (new variants)
Forester->>RPC: submit transaction batch
alt confirmed
RPC-->>Forester: confirmation
Forester-->>User: TransactionSendResult::Success
else failed
RPC-->>Forester: error
Forester-->>User: TransactionSendResult::Failed(err)
else cancelled
RPC-->>Forester: cancel signal
Forester-->>User: TransactionSendResult::Cancelled
else timeout
RPC-->>Forester: no confirmation (timeout)
Forester-->>User: TransactionSendResult::Timeout
end
end
sequenceDiagram
autonumber
actor Dev
participant Client as SDK Client
participant PT as ProgramTest
participant LSV as LiteSVM
Dev->>Client: run tests with feature "program-test"
Client->>PT: prepare environment (includes LiteSVM)
PT->>LSV: invoke LiteSVM (cfg feature)
alt litesvm success
LSV-->>PT: ok
PT-->>Client: ok
else litesvm error
LSV-->>PT: LiteSVMError
PT-->>Client: Err(RpcError::LiteSvmError)
end
Client-->>Dev: report
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
prover/client/src/helpers.rs (1)
61-65: Fix missingis_multiple_oftrait import
u32doesn’t exposeis_multiple_ofas an inherent method. Without thenum_integer::Integertrait in scope this won’t compile. Either bring the trait into scope or fall back to the previous modulo check.-use num_bigint::{BigInt, BigUint}; -use num_traits::{Num, ToPrimitive}; +use num_bigint::{BigInt, BigUint}; +use num_integer::Integer; +use num_traits::{Num, ToPrimitive};
🧹 Nitpick comments (7)
program-libs/zero-copy-derive/tests/random.rs (1)
1-2: Scope thedead_codeallowance more narrowlyA crate-level
#![allow(dead_code)]will suppress the lint for every item in this test crate, making it easy to miss future regressions. If the warning stems from generated artifacts ininstruction_data, please move the suppression to that module (or the specific items) instead of silencing it globally.program-libs/zero-copy-derive/tests/instruction_data.rs (1)
1-2: Prefer scoping thedead_codeallowance more narrowlyPutting
#![allow(dead_code)]at the crate root hides the lint for every item in this test crate, which could mask genuinely stale helpers over time. Any chance we can confine the allowance to the specific modules or types that are intentionally unused (e.g., via amod-level attribute or on the generated structs themselves) instead of silencing it globally?sdk-libs/client/src/rpc/mod.rs (1)
1-1: Consider documenting the reason for suppressing the lint.While the lint suppression is straightforward, it would be helpful to understand why large error types are acceptable in this context.
The
clippy::result_large_errlint warns when Result types have large error variants compared to the Ok variant, as large error types result in a lot of redundant memory copying on the success path when the Ok value is small. This lint is designed to catch performance issues where returning large errors frequently impacts performance even on the success path.The suppression appears reasonable for an RPC client library where error types naturally tend to be comprehensive (containing detailed error information) while success types might be smaller. Consider adding a brief comment explaining why large error types are acceptable in this RPC context.
forester-utils/src/lib.rs (1)
1-3: Scope the deprecation allowanceBlanket
#![allow(deprecated)]at the crate root hides every deprecation warning inforester-utils, which makes it easy to miss upstream removals and breaks the moment those APIs disappear. Please narrow this to the specific call sites (or add a targeted module-level allow with a TODO) so that future deprecations still surface during CI.forester/src/processor/v1/send_transaction.rs (1)
325-337: Return the Timeout variant when the deadline is hitRight now we still return
Cancelledeven when the only reason we bail isInstant::now() >= timeout_deadline. With the newTimeoutvariant this mislabels expired attempts and hides them in cancellation metrics/logs.Apply this tweak so we report the right variant:
- if cancel_signal_clone.load(Ordering::SeqCst) || Instant::now() >= timeout_deadline { - return TransactionSendResult::Cancelled; // Or Timeout - } + if cancel_signal_clone.load(Ordering::SeqCst) { + return TransactionSendResult::Cancelled; + } + if Instant::now() >= timeout_deadline { + return TransactionSendResult::Timeout; + }program-tests/account-compression-test/tests/batched_merkle_tree_test.rs (1)
54-61: Prefer crate-level allow to silence all deprecation warnings (or migrate offsolana_sdk).The item-level
#[allow(deprecated)]only applies to thisuseitem. If the intent is to suppress all SDK deprecation warnings in this test module, make it crate-level. Alternatively, migrate to split Solana crates (solana-instruction, solana-keypair, solana-signature, solana-pubkey, solana-account, solana-system-interface) to remove the need forallow(deprecated).Apply:
#![cfg(feature = "test-sbf")] +#![allow(deprecated)] @@ -#[allow(deprecated)] use solana_sdk::{ account::WritableAccount, instruction::Instruction, pubkey::Pubkey, signature::{Keypair, Signature, Signer}, system_instruction, };Also applies to: 1-2
Cargo.toml (1)
59-62: Add MSRV to workspace to align with toolchain 1.90.Declare the Rust version in the workspace to enforce MSRV consistently across members.
Apply:
[workspace.package] version = "0.1.0" edition = "2021" +rust-version = "1.90"
📜 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 (45)
Cargo.toml(3 hunks)forester-utils/src/lib.rs(1 hunks)forester/src/config.rs(1 hunks)forester/src/health_check.rs(1 hunks)forester/src/main.rs(1 hunks)forester/src/processor/v1/send_transaction.rs(1 hunks)forester/tests/e2e_test.rs(2 hunks)program-libs/batched-merkle-tree/src/batch.rs(3 hunks)program-libs/batched-merkle-tree/src/queue_batch_metadata.rs(1 hunks)program-libs/concurrent-merkle-tree/src/lib.rs(2 hunks)program-libs/hash-set/src/lib.rs(1 hunks)program-libs/indexed-array/src/array.rs(1 hunks)program-libs/indexed-merkle-tree/src/array.rs(1 hunks)program-libs/zero-copy-derive/src/shared/utils.rs(1 hunks)program-libs/zero-copy-derive/tests/instruction_data.rs(1 hunks)program-libs/zero-copy-derive/tests/random.rs(1 hunks)program-tests/account-compression-test/tests/batched_merkle_tree_test.rs(1 hunks)program-tests/account-compression-test/tests/group_authority_tests.rs(4 hunks)program-tests/compressed-token-test/tests/test.rs(5 hunks)program-tests/merkle-tree/src/lib.rs(3 hunks)program-tests/registry-test/tests/tests.rs(2 hunks)program-tests/system-cpi-test/src/create_pda.rs(2 hunks)program-tests/system-cpi-test/tests/test.rs(1 hunks)program-tests/system-cpi-test/tests/test_program_owned_trees.rs(1 hunks)program-tests/system-test/tests/test.rs(1 hunks)program-tests/utils/src/test_keypairs.rs(3 hunks)programs/account-compression/src/instructions/migrate_state.rs(1 hunks)programs/account-compression/src/state/address.rs(3 hunks)programs/account-compression/src/state/public_state_merkle_tree.rs(3 hunks)programs/account-compression/src/state/queue.rs(2 hunks)programs/system/src/account_compression_state/address.rs(2 hunks)programs/system/src/account_compression_state/state.rs(2 hunks)programs/system/src/context.rs(3 hunks)programs/system/src/invoke/verify_signer.rs(1 hunks)prover/client/src/helpers.rs(1 hunks)rust-toolchain.toml(1 hunks)sdk-libs/client/Cargo.toml(2 hunks)sdk-libs/client/src/rpc/errors.rs(2 hunks)sdk-libs/client/src/rpc/mod.rs(1 hunks)sdk-libs/program-test/src/lib.rs(1 hunks)sdk-libs/program-test/src/utils/setup_light_programs.rs(1 hunks)sparse-merkle-tree/src/merkle_tree.rs(1 hunks)xtask/src/bench.rs(1 hunks)xtask/src/hash_set.rs(1 hunks)xtask/src/new_deployment.rs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (8)
program-libs/hash-set/src/lib.rs (2)
program-libs/indexed-array/src/array.rs (1)
iter(183-189)program-libs/indexed-merkle-tree/src/array.rs (1)
iter(172-178)
program-tests/system-cpi-test/src/create_pda.rs (6)
program-tests/system-cpi-test/tests/test.rs (1)
read_only_accounts(1844-1851)programs/system/src/context.rs (1)
read_only_accounts(387-389)program-libs/compressed-account/src/instruction_data/with_account_info.rs (1)
read_only_accounts(321-323)program-libs/compressed-account/src/instruction_data/with_readonly.rs (1)
read_only_accounts(277-279)program-libs/compressed-account/src/instruction_data/zero_copy.rs (2)
read_only_accounts(444-446)read_only_accounts(568-570)program-libs/compressed-account/src/instruction_data/traits.rs (1)
read_only_accounts(17-17)
sdk-libs/client/src/rpc/errors.rs (1)
sdk-libs/client/src/indexer/error.rs (2)
from(87-98)from(102-104)
program-tests/merkle-tree/src/lib.rs (3)
program-libs/indexed-array/src/array.rs (1)
index(78-80)program-libs/indexed-merkle-tree/src/array.rs (1)
index(79-81)program-libs/concurrent-merkle-tree/src/lib.rs (1)
current_index(252-259)
program-libs/indexed-merkle-tree/src/array.rs (2)
program-libs/hash-set/src/lib.rs (1)
iter(534-539)program-libs/indexed-array/src/array.rs (1)
iter(183-189)
sparse-merkle-tree/src/merkle_tree.rs (1)
program-libs/concurrent-merkle-tree/src/lib.rs (1)
current_index(252-259)
program-libs/indexed-array/src/array.rs (2)
program-libs/hash-set/src/lib.rs (1)
iter(534-539)program-libs/indexed-merkle-tree/src/array.rs (1)
iter(172-178)
prover/client/src/helpers.rs (1)
program-libs/concurrent-merkle-tree/src/lib.rs (1)
current_index(252-259)
⏰ 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). (22)
- GitHub Check: system-programs (system-cpi-test-v2-other, ["cargo-test-sbf -p system-cpi-v2-test -- --skip funct...
- GitHub Check: system-programs (system-cpi-test-v2-functional, ["cargo-test-sbf -p system-cpi-v2-test -- functio...
- GitHub Check: system-programs (system-cpi-test-v2-event, ["cargo-test-sbf -p system-cpi-v2-test -- event::parse"])
- GitHub Check: system-programs (system-cpi-test, ["cargo-test-sbf -p system-cpi-test", "cargo test -p light-syst...
- GitHub Check: system-programs (random-e2e-test, ["cargo-test-sbf -p e2e-test"])
- GitHub Check: system-programs (light-compressed-token, ["cargo-test-sbf -p compressed-token-test"])
- GitHub Check: system-programs (light-registry, ["cargo-test-sbf -p registry-test"])
- GitHub Check: system-programs (light-system-program, ["cargo-test-sbf -p system-test"])
- GitHub Check: system-programs (account-compression, ["cargo-test-sbf -p account-compression-test"])
- GitHub Check: Test program-libs-slow
- GitHub Check: Test program-libs-fast
- GitHub Check: stateless-js-v1
- GitHub Check: Test batched-merkle-tree-simulate
- GitHub Check: Test concurrent-merkle-tree
- GitHub Check: lint
- GitHub Check: system-programs (sdk-anchor-test-program, ["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -...
- GitHub Check: cli-v2
- GitHub Check: cli-v1
- GitHub Check: system-programs (sdk-libs, light-macros light-sdk light-program-test light-client light-batched-m...
- GitHub Check: stateless-js-v2
- GitHub Check: system-programs (sdk-test-program, ["cargo-test-sbf -p sdk-native-test"])
- GitHub Check: Forester e2e test
🔇 Additional comments (31)
program-tests/system-cpi-test/src/create_pda.rs (2)
301-324: Nice pattern matching cleanupThe
if letrefactor removes the redundant unwrap while keeping the mutation flow intact. Looks great.
325-373: Solid ergonomic winSwitching to
if lethere tightens the code and preserves the existing semantics without the intermediate unwrap. All good.sdk-libs/program-test/src/utils/setup_light_programs.rs (1)
72-75: Directly passing the program ID is correct
LIGHT_SYSTEM_PROGRAM_IDnow being aPubkeymeans the extra.into()was redundant. Passing it straight through keeps the call clean with no behavioral change.xtask/src/new_deployment.rs (1)
17-23: Import update looks goodThe added allowance and imports line up with the new toolchain expectations and match the usage below.
program-libs/concurrent-merkle-tree/src/lib.rs (1)
306-310: Parity helper reads clearer, same semantics.The swap to
is_multiple_of(2)keeps the even/odd branching intact while matching the new std helper—nice cleanup.sparse-merkle-tree/src/merkle_tree.rs (1)
49-54: Parity check update preserves semantics.
is_multiple_of(2)keeps the even-branch behavior unchanged while aligning with the new toolchain’s helpers. No issues spotted.program-tests/merkle-tree/src/lib.rs (1)
233-236: Consistent use ofis_multiple_oflooks good.
The replacements read cleanly, match the toolchain bump, and maintain the original left/right sibling logic throughout these helpers.Also applies to: 255-257, 326-332
program-tests/system-cpi-test/tests/test.rs (1)
1147-1147: LGTM! Clean transition from deprecated API.The change from
Keypair::from_bytes()toKeypair::try_from().unwrap()follows the broader pattern across the codebase of updating keypair construction. This maintains the same unwrap semantics while using the newer, non-deprecated API.programs/system/src/invoke/verify_signer.rs (1)
63-63: LGTM! Improved slice construction pattern.The change from creating a vector and taking a slice to using
std::slice::from_ref()is more idiomatic and efficient for creating single-element slices. This aligns with the broader refactoring pattern seen across the codebase.sdk-libs/program-test/src/lib.rs (1)
5-6: LGTM! Reasonable lint suppressions for test infrastructure.The lint allowances are appropriate for test infrastructure:
#![allow(deprecated)]- Test code may need to interact with deprecated APIs for compatibility testing#![allow(clippy::result_large_err)]- Test utilities often have comprehensive error types for detailed diagnosticsxtask/src/hash_set.rs (2)
174-174: LGTM! Modernized divisibility checks.The change from
n % 2 == 0 || n % 3 == 0ton.is_multiple_of(2) || n.is_multiple_of(3)is more expressive and aligns with Rust's modern idioms. Theis_multiple_ofmethod was stabilized and provides clearer intent.
179-179: LGTM! Consistent modernization of divisibility checks.The change from
n % i == 0 || n % (i + 2) == 0ton.is_multiple_of(i) || n.is_multiple_of(i + 2)maintains consistency with the previous change and improves code readability.program-tests/system-test/tests/test.rs (1)
1330-1334: Thanks for eliminating the extra cloneSwitching to
std::slice::from_refkeeps the call-site semantics intact while avoiding the temporary allocation andClonehit. Nice cleanup.program-tests/system-cpi-test/tests/test_program_owned_trees.rs (1)
223-224: Good move toKeypair::try_fromAdopting
Keypair::try_from(...).unwrap()lines up with the updated Solana API and keeps the explicit length validation in place. Looks great.forester/tests/e2e_test.rs (1)
147-164: Nice consistency on keypair deserializationMigrating both branches to
Keypair::try_fromgives us uniform error handling across the byte-array and base58 paths, and avoids the deprecatedfrom_bytes. 👍program-libs/indexed-merkle-tree/src/array.rs (1)
172-177: Signature tweak looks rightReturning
IndexingArrayIter<'_, H, I>ties the iterator lifetime toself, matching the revised pattern elsewhere and keeping the API safe for borrow checking.program-libs/indexed-array/src/array.rs (1)
183-188: Iterator lifetime update is in good shapeBringing
iterin line with the lifetime-parameterized iterator type keeps the borrow semantics explicit and consistent with the other collections.forester/src/config.rs (1)
182-183: Keypair::try_from update LGTMSwitching to
Keypair::try_frommatches the Solana 1.90/2.3 API surface and keeps identical error propagation for invalid payer blobs.forester/src/health_check.rs (1)
154-164: Keypair::try_from migration looks goodUsing
Keypair::try_fromhere lines up with the upstream signature changes while preserving the existing user-facing error message.programs/account-compression/src/instructions/migrate_state.rs (1)
226-228: Lifetime-aware return type confirmedAdding the explicit
'_'lifetime keeps the helper aligned with the updated zero-copy API and avoids borrow checker regressions.program-tests/account-compression-test/tests/group_authority_tests.rs (4)
143-144: Keypair::try_from swap makes the test future-proofThis keeps the fixture in sync with the Solana keypair constructors without changing behavior.
377-378: Nice use offrom_refto avoid a temporary VecReusing the instruction slice directly avoids an allocation and reads cleaner.
403-404: Same improvement hereApplying
from_refagain keeps this path consistent and eliminates the extra Vec.
446-447: Consistent slice handlingRepeating the slice-based construction keeps all resize tests aligned with the new pattern.
programs/system/src/context.rs (3)
392-406: Trait-object iterator looks solidLine 399 cleanly coerces the filtered concrete accounts into
&dyntrait objects, so downstream consumers get the expected zero-copy view without extra allocations.
408-422: Input chaining mirrors outputs wellLine 415 reuses the same lazy filtering/casting pattern for inputs, keeping behavior consistent while avoiding the previous eager collection.
424-432: Lean address iteratorLine 430’s direct coercion keeps the iterator zero-cost; pairing it with the existing skip-less semantics for addresses matches the rest of the module nicely.
rust-toolchain.toml (1)
2-2: LGTM: toolchain bumped to 1.90.No issues spotted with the toolchain channel update.
sdk-libs/client/Cargo.toml (1)
12-13: Ensurelitesvmusage is feature-gated in the client
- In
sdk-libs/client/src/rpc/errors.rs, alllitesvm::…imports are guarded by#[cfg(feature = "program-test")].- Run
cargo check -p light-clientwith and without--features program-testto confirm successful compilation.sdk-libs/client/src/rpc/errors.rs (1)
46-49: LGTM:LiteSvmErrorvariant and itsFrom<LiteSVMError>impl are correctly feature-gated. Please verify locally viacargo check -p light-client cargo check -p light-client --features program-testCargo.toml (1)
64-103: No duplicate Solana crate versions detected
Cargo.lock shows single versions of key crates (solana-pubkey@2.4.0, solana-transaction@2.2.3, solana-program-error@2.2.2); no duplicate crate graphs.
246d8ee to
bb47bef
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 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 (44)
Cargo.toml(3 hunks)forester-utils/src/lib.rs(1 hunks)forester/src/config.rs(1 hunks)forester/src/health_check.rs(1 hunks)forester/src/main.rs(1 hunks)forester/src/processor/v1/send_transaction.rs(1 hunks)forester/tests/e2e_test.rs(2 hunks)program-libs/batched-merkle-tree/src/batch.rs(3 hunks)program-libs/batched-merkle-tree/src/queue_batch_metadata.rs(1 hunks)program-libs/concurrent-merkle-tree/src/lib.rs(2 hunks)program-libs/hash-set/src/lib.rs(1 hunks)program-libs/indexed-array/src/array.rs(1 hunks)program-libs/indexed-merkle-tree/src/array.rs(1 hunks)program-libs/zero-copy-derive/src/shared/utils.rs(1 hunks)program-libs/zero-copy-derive/tests/instruction_data.rs(1 hunks)program-libs/zero-copy-derive/tests/random.rs(1 hunks)program-tests/account-compression-test/tests/batched_merkle_tree_test.rs(1 hunks)program-tests/account-compression-test/tests/group_authority_tests.rs(4 hunks)program-tests/compressed-token-test/tests/test.rs(5 hunks)program-tests/merkle-tree/src/lib.rs(3 hunks)program-tests/registry-test/tests/tests.rs(2 hunks)program-tests/system-cpi-test/src/create_pda.rs(2 hunks)program-tests/system-cpi-test/tests/test.rs(1 hunks)program-tests/system-cpi-test/tests/test_program_owned_trees.rs(1 hunks)program-tests/system-test/tests/test.rs(1 hunks)program-tests/utils/src/test_keypairs.rs(3 hunks)programs/account-compression/src/instructions/migrate_state.rs(1 hunks)programs/account-compression/src/state/address.rs(3 hunks)programs/account-compression/src/state/public_state_merkle_tree.rs(3 hunks)programs/account-compression/src/state/queue.rs(2 hunks)programs/system/src/account_compression_state/address.rs(2 hunks)programs/system/src/account_compression_state/state.rs(2 hunks)programs/system/src/context.rs(3 hunks)programs/system/src/invoke/verify_signer.rs(1 hunks)prover/client/src/helpers.rs(1 hunks)sdk-libs/client/Cargo.toml(2 hunks)sdk-libs/client/src/rpc/errors.rs(2 hunks)sdk-libs/client/src/rpc/mod.rs(1 hunks)sdk-libs/program-test/src/lib.rs(1 hunks)sdk-libs/program-test/src/utils/setup_light_programs.rs(1 hunks)sparse-merkle-tree/src/merkle_tree.rs(1 hunks)xtask/src/bench.rs(1 hunks)xtask/src/hash_set.rs(1 hunks)xtask/src/new_deployment.rs(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- program-libs/zero-copy-derive/tests/random.rs
- sdk-libs/client/src/rpc/mod.rs
- forester-utils/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (30)
- sdk-libs/client/src/rpc/errors.rs
- program-tests/merkle-tree/src/lib.rs
- program-tests/system-test/tests/test.rs
- programs/account-compression/src/state/queue.rs
- programs/system/src/invoke/verify_signer.rs
- xtask/src/bench.rs
- program-tests/system-cpi-test/tests/test_program_owned_trees.rs
- program-libs/zero-copy-derive/src/shared/utils.rs
- program-libs/hash-set/src/lib.rs
- forester/tests/e2e_test.rs
- programs/account-compression/src/instructions/migrate_state.rs
- prover/client/src/helpers.rs
- program-libs/indexed-array/src/array.rs
- forester/src/main.rs
- program-tests/compressed-token-test/tests/test.rs
- program-tests/account-compression-test/tests/batched_merkle_tree_test.rs
- xtask/src/hash_set.rs
- program-libs/concurrent-merkle-tree/src/lib.rs
- program-tests/system-cpi-test/tests/test.rs
- programs/system/src/account_compression_state/address.rs
- programs/account-compression/src/state/address.rs
- xtask/src/new_deployment.rs
- programs/account-compression/src/state/public_state_merkle_tree.rs
- programs/system/src/context.rs
- forester/src/processor/v1/send_transaction.rs
- forester/src/config.rs
- sdk-libs/program-test/src/lib.rs
- program-libs/zero-copy-derive/tests/instruction_data.rs
- program-libs/batched-merkle-tree/src/queue_batch_metadata.rs
- sdk-libs/client/Cargo.toml
🧰 Additional context used
🧬 Code graph analysis (3)
program-libs/indexed-merkle-tree/src/array.rs (2)
program-libs/hash-set/src/lib.rs (1)
iter(534-539)program-libs/indexed-array/src/array.rs (1)
iter(183-189)
sparse-merkle-tree/src/merkle_tree.rs (1)
program-libs/concurrent-merkle-tree/src/lib.rs (1)
current_index(252-259)
program-tests/system-cpi-test/src/create_pda.rs (6)
program-tests/system-cpi-test/tests/test.rs (1)
read_only_accounts(1844-1851)programs/system/src/context.rs (1)
read_only_accounts(387-389)program-libs/compressed-account/src/instruction_data/with_account_info.rs (1)
read_only_accounts(321-323)program-libs/compressed-account/src/instruction_data/with_readonly.rs (1)
read_only_accounts(277-279)program-libs/compressed-account/src/instruction_data/zero_copy.rs (2)
read_only_accounts(444-446)read_only_accounts(568-570)program-libs/compressed-account/src/instruction_data/traits.rs (1)
read_only_accounts(17-17)
⏰ 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). (22)
- GitHub Check: Test batched-merkle-tree-simulate
- GitHub Check: cli-v1
- GitHub Check: Test program-libs-slow
- GitHub Check: Test program-libs-fast
- GitHub Check: lint
- GitHub Check: system-programs (sdk-libs, light-macros light-sdk light-program-test light-client light-batched-m...
- GitHub Check: Test concurrent-merkle-tree
- GitHub Check: system-programs (system-cpi-test, ["cargo-test-sbf -p system-cpi-test", "cargo test -p light-syst...
- GitHub Check: system-programs (random-e2e-test, ["cargo-test-sbf -p e2e-test"])
- GitHub Check: stateless-js-v1
- GitHub Check: stateless-js-v2
- GitHub Check: system-programs (system-cpi-test-v2-event, ["cargo-test-sbf -p system-cpi-v2-test -- event::parse"])
- GitHub Check: system-programs (sdk-test-program, ["cargo-test-sbf -p sdk-native-test"])
- GitHub Check: system-programs (system-cpi-test-v2-functional, ["cargo-test-sbf -p system-cpi-v2-test -- functio...
- GitHub Check: cli-v2
- GitHub Check: system-programs (sdk-anchor-test-program, ["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -...
- GitHub Check: system-programs (system-cpi-test-v2-other, ["cargo-test-sbf -p system-cpi-v2-test -- --skip funct...
- GitHub Check: system-programs (light-compressed-token, ["cargo-test-sbf -p compressed-token-test"])
- GitHub Check: system-programs (account-compression, ["cargo-test-sbf -p account-compression-test"])
- GitHub Check: system-programs (light-registry, ["cargo-test-sbf -p registry-test"])
- GitHub Check: system-programs (light-system-program, ["cargo-test-sbf -p system-test"])
- GitHub Check: Forester e2e test
🔇 Additional comments (6)
sparse-merkle-tree/src/merkle_tree.rs (1)
49-61: Modernized parity check looks good.
is_multiple_of(2)keeps the even-branch logic unchanged while aligning with the std API updates introduced in the 1.90 toolchain bump. All downstream assignments remain intact, so behavior is preserved.programs/system/src/account_compression_state/state.rs (1)
52-66: Explicit lifetime placeholder matches the borrowed sliceReturning
ConcurrentMerkleTreeZeroCopy/Mutwith the `'_' placeholder keeps the lifetime correctly tied to the provided account data while satisfying the updated type signature expectations. Looks good.program-libs/indexed-merkle-tree/src/array.rs (1)
172-178: Explicit lifetime on iterator return is spot onExposing
iterasIndexingArrayIter<'_, H, I>keeps the iterator lifetime tied to&self, matching the struct definition and sidestepping the new toolchain’s stricter lifetime inference. Looks good to me.program-libs/batched-merkle-tree/src/batch.rs (3)
613-618: Scoped lint suppression is the right call hereWith the Rust 1.90 toolchain Clippy flags this modulo check, but keeping the check as-is in the test avoids pulling in extra helpers. The targeted
allowkeeps diagnostics clean without obscuring intent.
867-884: Consistent handling of the new lintApplying the same localized
manual_is_multiple_ofsuppression here keeps the loop logic unchanged while satisfying Clippy on the upgraded toolchain. Good call.
959-968: Thanks for keeping the lint scopedMirroring the suppression at this site maintains readability of the control flow and keeps Clippy quiet post-upgrade. Looks good.
bb47bef to
81887db
Compare
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 (5)
sparse-merkle-tree/src/merkle_tree.rs (1)
49-54:is_multiple_ofis unavailable onusizein Rust 1.90The new toolchain does not expose an inherent
is_multiple_ofon primitive integers, and we don’t import a trait that would add it. This introduces a compile error:method not found in usize. Please keep the modulo check (or bring in an appropriate helper) so the build stays green on stable 1.90.- if current_index.is_multiple_of(2) { + if current_index % 2 == 0 {prover/client/src/helpers.rs (1)
61-65: Sameis_multiple_ofregression here
u32doesn’t gainis_multiple_ofin Rust 1.90 either, so this change fails to compile for the same reason noted above. Please revert to the modulo check (or add a compatible helper) to keep parity detection working.- if current_index.is_multiple_of(2) { + if current_index % 2 == 0 {xtask/src/new_deployment.rs (1)
17-23: Upgrade Solana split crates to v2.3 before refactoring imports
Cargo.toml currently pins solana-transaction, solana-keypair, and solana-signer at version “2.2” (lines 89, 97, 99); bump them to “2.3” and then apply the import changes to narrow#[allow(deprecated)].forester/src/processor/v1/send_transaction.rs (2)
324-329: Classify timeout vs cancellation correctly before sendingPre-check maps both conditions to Cancelled. Return Timeout when the deadline is hit; keep Cancelled for the explicit signal. Also a lighter memory ordering is sufficient for loads.
- if cancel_signal_clone.load(Ordering::SeqCst) || Instant::now() >= timeout_deadline { - return TransactionSendResult::Cancelled; // Or Timeout - } + if Instant::now() >= timeout_deadline { + return TransactionSendResult::Timeout; + } + if cancel_signal_clone.load(Ordering::Acquire) { + return TransactionSendResult::Cancelled; + }
246-256: Remove manual +150 offset on last_valid_block_height
Solana’sgetLatestBlockhashRPC already returnslastValidBlockHeightinclusive of the default 150-slot validity window (solana.com). Manually adding+150doubles that window and risks using an expired blockhash locally. Change to:(recent_blockhash, last_valid_block_height) = (r_blockhash.0, r_blockhash.1);No other
+150adjustments were found in RPC call sites.
🧹 Nitpick comments (15)
program-tests/merkle-tree/src/lib.rs (3)
233-235: Drop lint allow and use bitwise parity checkAvoid suppressing clippy; use a cheap, clear bitwise check.
- #[allow(clippy::manual_is_multiple_of)] - let is_left = index % 2 == 0; + let is_left = (index & 1) == 0;
256-258: Same here: remove allow and replace% 2with bitwiseKeeps intent while satisfying the lint.
- #[allow(clippy::manual_is_multiple_of)] - let is_left = index % 2 == 0; + let is_left = (index & 1) == 0;
329-331: And here: avoid per-line clippy allowBitwise check eliminates the need for suppression.
- #[allow(clippy::manual_is_multiple_of)] - let is_left = current_index % 2 == 0; + let is_left = (current_index & 1) == 0;Optional: if you prefer keeping
% 2 == 0for readability, move a single#[allow(clippy::manual_is_multiple_of)]to the function level forget_proof_of_leaf,get_proof_by_indices, andverifyinstead of repeating it inline.forester/src/processor/v1/send_transaction.rs (4)
376-401: Report Cancelled and Timeout separately in chunk summaryYou added distinct variants but aggregate them into one counter, losing signal for ops/alerting.
- let mut cancelled_or_timeout = 0; + let mut cancelled = 0; + let mut timeouts = 0; @@ - TransactionSendResult::Cancelled | TransactionSendResult::Timeout => { - cancelled_or_timeout += 1; - } + TransactionSendResult::Cancelled => { cancelled += 1; } + TransactionSendResult::Timeout => { timeouts += 1; } } } - debug!( - "Chunk send summary: {} successes, {} failures, {} cancelled/timeout", - successes, failures, cancelled_or_timeout - ); + debug!( + "Chunk send summary: {} successes, {} failures, {} cancelled, {} timeouts", + successes, failures, cancelled, timeouts + );
315-320: Avoid hard-coding send config (skip_preflight, retries) in hot pathHard-coding skip_preflight=true and max_retries=0 can silently drop txs under network hiccups. Thread these via SendBatchedTransactionsConfig (with sensible defaults) so ops can tune behavior per environment.
I can wire RpcSendTransactionConfig into config and update callers if you want.
258-279: Default priority fee constantThe fallback of 10_000 lamports may be off on busy clusters. Consider making this configurable and logging the source (estimated vs default) to aid tuning.
46-52: Allowing large enum variantAllowance is fine given Failure carries a ForesterError. If enum size ever hurts perf in channels/collections, consider boxing the large variant.
forester/src/health_check.rs (1)
173-196: Compare balances in lamports to avoid float rounding trapsDo the threshold check in integer lamports; still print SOL for UX.
- Ok(lamports) => { - let sol_balance = lamports as f64 / LAMPORTS_PER_SOL as f64; - - if sol_balance >= min_balance { + Ok(lamports) => { + let sol_balance = lamports as f64 / LAMPORTS_PER_SOL as f64; + let min_lamports = (min_balance * LAMPORTS_PER_SOL as f64).ceil() as u64; + if lamports >= min_lamports { HealthCheckResult::new( "balance", true, format!( "Wallet balance: {:.4} SOL (minimum: {:.4} SOL)", sol_balance, min_balance ), start.elapsed().as_millis() as u64, ) } else {programs/system/src/context.rs (7)
392-406: Consider taking iterators instead of slices to simplify call sites and avoid&[]typing pitfallsAccepting
Iterator<Item = &'a dyn OutputAccount<'b>>lets callers usestd::iter::empty()and removes the repeated map-to-dyn in multiple places.Apply:
-pub fn chain_outputs<'a, 'b: 'a>( - slice1: &'a [impl OutputAccount<'b>], - slice2: &'a [impl OutputAccount<'b>], -) -> impl Iterator<Item = &'a dyn OutputAccount<'b>> { - slice1 - .iter() - .filter(|x| !x.skip()) - .map(|item| item as &dyn OutputAccount<'b>) - .chain( - slice2 - .iter() - .filter(|x| !x.skip()) - .map(|item| item as &dyn OutputAccount<'b>), - ) -} +pub fn chain_outputs<'a, 'b: 'a, I1, I2>( + iter1: I1, + iter2: I2, +) -> impl Iterator<Item = &'a dyn OutputAccount<'b>> +where + I1: Iterator<Item = &'a dyn OutputAccount<'b>>, + I2: Iterator<Item = &'a dyn OutputAccount<'b>>, +{ + iter1.chain(iter2) +}Then, at call sites (example):
chain_outputs( self.instruction_data .output_accounts() .iter() .filter(|x| !x.skip()) .map(|x| x as &dyn OutputAccount<'a>), cpi_context.context[0] .output_accounts() .iter() .filter(|x| !x.skip()) .map(|x| x as &dyn OutputAccount<'a>), ) // or `std::iter::empty()` when no second source
408-422: Inputs: same feedback as outputsChange is correct; consider the same iterator-based signature to enable
std::iter::empty()and remove&[].-pub fn chain_inputs<'a, 'b: 'a>( - slice1: &'a [impl InputAccount<'b>], - slice2: &'a [impl InputAccount<'b>], -) -> impl Iterator<Item = &'a dyn InputAccount<'b>> { - slice1 - .iter() - .filter(|x| !x.skip()) - .map(|item| item as &dyn InputAccount<'b>) - .chain( - slice2 - .iter() - .filter(|x| !x.skip()) - .map(|item| item as &dyn InputAccount<'b>), - ) -} +pub fn chain_inputs<'a, 'b: 'a, I1, I2>( + iter1: I1, + iter2: I2, +) -> impl Iterator<Item = &'a dyn InputAccount<'b>> +where + I1: Iterator<Item = &'a dyn InputAccount<'b>>, + I2: Iterator<Item = &'a dyn InputAccount<'b>>, +{ + iter1.chain(iter2) +}
424-432: New addresses: return type LGTM; consider iterator-based overload for consistencyBehavior is unchanged and fine. If you adopt iterator-based helpers above, mirror it here to avoid
let empty_slice = &[].-pub fn chain_new_addresses<'a, 'b: 'a>( - slice1: &'a [impl NewAddress<'b>], - slice2: &'a [impl NewAddress<'b>], -) -> impl Iterator<Item = &'a dyn NewAddress<'b>> { - slice1 - .iter() - .map(|item| item as &dyn NewAddress<'b>) - .chain(slice2.iter().map(|item| item as &dyn NewAddress<'b>)) -} +pub fn chain_new_addresses<'a, 'b: 'a, I1, I2>( + iter1: I1, + iter2: I2, +) -> impl Iterator<Item = &'a dyn NewAddress<'b>> +where + I1: Iterator<Item = &'a dyn NewAddress<'b>>, + I2: Iterator<Item = &'a dyn NewAddress<'b>>, +{ + iter1.chain(iter2) +}
251-273: Unify trait-object reference style for readabilityReturn type can be simplified to
Option<&'b dyn OutputAccount<'a>>to match the new&dynstyle elsewhere.-pub fn get_output_account(&'b self, index: usize) -> Option<&'b (dyn OutputAccount<'a> + 'b)> { +pub fn get_output_account(&'b self, index: usize) -> Option<&'b dyn OutputAccount<'a>> { @@ - context.output_accounts().get(index).map(|account| { - let output_account_trait_object: &'b (dyn OutputAccount<'a> + 'b) = account; - output_account_trait_object - }) + context + .output_accounts() + .get(index) + .map(|account| account as &'b dyn OutputAccount<'a>) } @@ - accounts - .get(index) - .map(|account| account as &(dyn OutputAccount<'a> + 'b)) + accounts + .get(index) + .map(|account| account as &'b dyn OutputAccount<'a>)
85-108: Bounds-checkix_data_indexbefore indexingremaining_accountsIndexing with
remaining_accounts[ix_data_index as usize]can panic on malformed input. Prefer.get(...).ok_or(...)and surface a typed error.Would you like a patch returning
SystemProgramError::InvalidAccountIndexhere?
131-136: Guard against OOB when transferring fees
accounts[*i as usize]will panic if an index is missing. Consider.get(..).ok_or(...)and fail gracefully.I can propose a small patch returning a descriptive error instead of panicking.
297-318: Annotate empty slices for slice-based helpers to prevent Rust 1.90 inference errors
In programs/system/src/context.rs, replace untyped&[](and theempty_slice = &[]) with explicitly typed slices, for example:let empty_slice: &[&dyn NewAddress<'a>] = &[]; chain_new_addresses(self.instruction_data.new_addresses(), empty_slice);chain_outputs( self.instruction_data.output_accounts(), &[] as &[&dyn OutputAccount<'a>], );Or switch to
std::iter::empty::<&dyn Trait>()for a zero-overhead iterator.
📜 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 (44)
Cargo.toml(3 hunks)forester-utils/src/lib.rs(1 hunks)forester/src/config.rs(1 hunks)forester/src/health_check.rs(1 hunks)forester/src/main.rs(1 hunks)forester/src/processor/v1/send_transaction.rs(1 hunks)forester/tests/e2e_test.rs(2 hunks)program-libs/batched-merkle-tree/src/batch.rs(3 hunks)program-libs/batched-merkle-tree/src/queue_batch_metadata.rs(1 hunks)program-libs/concurrent-merkle-tree/src/lib.rs(2 hunks)program-libs/hash-set/src/lib.rs(1 hunks)program-libs/indexed-array/src/array.rs(1 hunks)program-libs/indexed-merkle-tree/src/array.rs(1 hunks)program-libs/zero-copy-derive/src/shared/utils.rs(1 hunks)program-libs/zero-copy-derive/tests/instruction_data.rs(1 hunks)program-libs/zero-copy-derive/tests/random.rs(1 hunks)program-tests/account-compression-test/tests/batched_merkle_tree_test.rs(1 hunks)program-tests/account-compression-test/tests/group_authority_tests.rs(5 hunks)program-tests/compressed-token-test/tests/test.rs(5 hunks)program-tests/merkle-tree/src/lib.rs(3 hunks)program-tests/registry-test/tests/tests.rs(2 hunks)program-tests/system-cpi-test/src/create_pda.rs(2 hunks)program-tests/system-cpi-test/tests/test.rs(1 hunks)program-tests/system-cpi-test/tests/test_program_owned_trees.rs(1 hunks)program-tests/system-test/tests/test.rs(1 hunks)program-tests/utils/src/test_keypairs.rs(3 hunks)programs/account-compression/src/instructions/migrate_state.rs(1 hunks)programs/account-compression/src/state/address.rs(3 hunks)programs/account-compression/src/state/public_state_merkle_tree.rs(3 hunks)programs/account-compression/src/state/queue.rs(2 hunks)programs/system/src/account_compression_state/address.rs(2 hunks)programs/system/src/account_compression_state/state.rs(2 hunks)programs/system/src/context.rs(3 hunks)programs/system/src/invoke/verify_signer.rs(1 hunks)prover/client/src/helpers.rs(1 hunks)sdk-libs/client/Cargo.toml(2 hunks)sdk-libs/client/src/rpc/errors.rs(2 hunks)sdk-libs/client/src/rpc/mod.rs(1 hunks)sdk-libs/program-test/src/lib.rs(1 hunks)sdk-libs/program-test/src/utils/setup_light_programs.rs(1 hunks)sparse-merkle-tree/src/merkle_tree.rs(1 hunks)xtask/src/bench.rs(1 hunks)xtask/src/hash_set.rs(1 hunks)xtask/src/new_deployment.rs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (23)
- forester-utils/src/lib.rs
- programs/account-compression/src/instructions/migrate_state.rs
- program-libs/zero-copy-derive/tests/random.rs
- program-tests/system-test/tests/test.rs
- program-libs/concurrent-merkle-tree/src/lib.rs
- sdk-libs/client/src/rpc/mod.rs
- forester/src/config.rs
- program-tests/system-cpi-test/tests/test.rs
- program-libs/batched-merkle-tree/src/queue_batch_metadata.rs
- sdk-libs/program-test/src/utils/setup_light_programs.rs
- program-tests/account-compression-test/tests/group_authority_tests.rs
- programs/system/src/account_compression_state/state.rs
- forester/tests/e2e_test.rs
- program-libs/indexed-array/src/array.rs
- sdk-libs/client/src/rpc/errors.rs
- program-tests/system-cpi-test/src/create_pda.rs
- forester/src/main.rs
- program-tests/utils/src/test_keypairs.rs
- program-libs/hash-set/src/lib.rs
- program-libs/batched-merkle-tree/src/batch.rs
- program-libs/zero-copy-derive/tests/instruction_data.rs
- sdk-libs/program-test/src/lib.rs
- xtask/src/bench.rs
🧰 Additional context used
🧬 Code graph analysis (2)
program-libs/indexed-merkle-tree/src/array.rs (2)
program-libs/hash-set/src/lib.rs (1)
iter(534-539)program-libs/indexed-array/src/array.rs (1)
iter(183-189)
sparse-merkle-tree/src/merkle_tree.rs (1)
program-libs/concurrent-merkle-tree/src/lib.rs (1)
current_index(252-259)
⏰ 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). (22)
- GitHub Check: stateless-js-v1
- GitHub Check: system-programs (random-e2e-test, ["cargo-test-sbf -p e2e-test"])
- GitHub Check: system-programs (system-cpi-test-v2-event, ["cargo-test-sbf -p system-cpi-v2-test -- event::parse"])
- GitHub Check: system-programs (light-compressed-token, ["cargo-test-sbf -p compressed-token-test"])
- GitHub Check: system-programs (system-cpi-test, ["cargo-test-sbf -p system-cpi-test", "cargo test -p light-syst...
- GitHub Check: system-programs (system-cpi-test-v2-functional, ["cargo-test-sbf -p system-cpi-v2-test -- functio...
- GitHub Check: system-programs (account-compression, ["cargo-test-sbf -p account-compression-test"])
- GitHub Check: system-programs (light-registry, ["cargo-test-sbf -p registry-test"])
- GitHub Check: system-programs (light-system-program, ["cargo-test-sbf -p system-test"])
- GitHub Check: system-programs (system-cpi-test-v2-other, ["cargo-test-sbf -p system-cpi-v2-test -- --skip funct...
- GitHub Check: cli-v1
- GitHub Check: Forester e2e test
- GitHub Check: cli-v2
- GitHub Check: lint
- GitHub Check: Test program-libs-slow
- GitHub Check: Test concurrent-merkle-tree
- GitHub Check: Test batched-merkle-tree-simulate
- GitHub Check: Test program-libs-fast
- GitHub Check: system-programs (sdk-libs, light-macros light-sdk light-program-test light-client light-batched-m...
- GitHub Check: system-programs (sdk-anchor-test-program, ["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -...
- GitHub Check: system-programs (sdk-test-program, ["cargo-test-sbf -p sdk-native-test"])
- GitHub Check: stateless-js-v2
🔇 Additional comments (23)
programs/account-compression/src/state/queue.rs (2)
74-78: Align zero-copy result lifetime with backing sliceReturning
HashSetZeroCopy<'_>keeps the borrow tied to the caller-provided slice and prevents accidental'staticassumptions. This is the right fix for the lifetime upgrade.
90-95: Consistent lifetime propagation through init helperMatching the init helper’s return type with the lifetime-aware zero-copy API keeps both constructors aligned and avoids unnecessary clones.
program-libs/indexed-merkle-tree/src/array.rs (1)
172-178: Explicit lifetime keeps iterator sound under 1.90Tying the iterator’s lifetime directly to
&selfis the right adjustment for the stricter borrow checking in Rust 1.90, and mirrors the other iterator updates in this PR. Nicely done.program-libs/zero-copy-derive/src/shared/utils.rs (1)
68-99: ReturningInputType<'_>matches the borrowed dataThe explicit lifetime parameter ensures the enum keeps pointing at the data owned by the passed-in
DeriveInput, so this signature change is exactly what we need for the newer compiler.programs/system/src/account_compression_state/address.rs (2)
20-30: Lifetimes aligned with zero-copy borrow requirements.Returning
IndexedMerkleTreeZeroCopy<'_, ...>ties the borrow to the input slice and matches the updated zero-copy API surface. No further changes needed.
32-42: Mutable accessor updated consistently.The mutable variant now advertises the correct lifetime as well, keeping the API coherent with the underlying zero-copy type.
programs/account-compression/src/state/public_state_merkle_tree.rs (3)
49-66: Init helper matches new lifetime expectations.Propagating
'_in the return type makes the init path compatible with the revised concurrent tree zero-copy signature.
68-75: Read-only accessor exposes correct borrow lifetime.The returned tree now reflects the borrow from the backing slice, which is required after the dependency update.
77-84: Mutable accessor stays in sync.Great to see the mutable constructor updated in lockstep with the new lifetime parameter.
programs/account-compression/src/state/address.rs (3)
65-72: Return type now advertises the borrow lifetime.This keeps the zero-copy accessor valid under the new type definition—looks good.
74-93: Init path updated consistently.The explicit lifetime ensures callers get a tree bound to the underlying slice; no other adjustments needed here.
95-102: Mutable accessor remains correct with lifetime in place.API surface is consistent across all address helpers after the toolchain update.
programs/system/src/invoke/verify_signer.rs (1)
62-65: Confirms zero-copy friendly slice creation.Switching to
std::slice::from_refkeeps the borrow alive without requiring the zero-copy wrapper to beCopy, so this test keeps working even as the type evolves. Solid change.xtask/src/hash_set.rs (1)
174-181: Modulo replacement reads cleanerSwitching to
is_multiple_ofkeeps the logic intact while avoiding explicit%checks and gracefully handles any hypothetical zero divisors, so the change looks good to me.program-tests/system-cpi-test/tests/test_program_owned_trees.rs (1)
221-223: Switch totry_frommatches the updated APIUsing
Keypair::try_from(... .as_slice())keeps the validation semantics intact while aligning with the modern constructor. The constants stay 64 bytes, so the unwrap remains sound. Nice cleanup.program-tests/compressed-token-test/tests/test.rs (2)
67-75: Scoped deprecation allowance is appropriateAnnotating the
solana_sdkimport with#[allow(deprecated)]keeps the warning localized without hiding potential issues elsewhere. This is a tidy way to acknowledge the upstream deprecation while the migration work happens.
5620-5643: Consistent keypair constructionThe move to
Keypair::try_from(... .as_slice())is spot on—same runtime checks as before, but compatible with the newer trait-based API. The fixed-size arrays make the unwrap safe.program-tests/registry-test/tests/tests.rs (1)
200-339: Modernized keypair init looks goodAdopting
Keypair::try_from(... .as_slice())keeps the tests future-proof against the deprecated helper while preserving the existing behavior and error handling. Looks solid.Cargo.toml (1)
63-103: Unify split Solana crates to 2.3 to prevent duplicate types and linkage issuesSeveral split crates remain at 2.2 while the SDK is 2.3. This will produce multiple copies of core types (Transaction, ProgramError, Pubkey, etc.) and cause compilation/type-mismatch pain.
Bump the remaining 2.2 entries to 2.3 (and keep them consistent across the workspace):
solana-cpi = "2.2" +solana-cpi = "2.3" solana-msg = { version = "2.2" } +solana-msg = { version = "2.3" } solana-bn254 = "2.2" +# optional: if a 2.3 exists, align it too; otherwise keep as-is solana-sysvar = { version = "2.2" } +solana-sysvar = { version = "2.3" } solana-program-error = { version = "2.2" } +solana-program-error = { version = "2.3" } solana-account-info = { version = "2.2" } +solana-account-info = { version = "2.3" } -solana-transaction = { version = "2.2" } +solana-transaction = { version = "2.3" } -solana-transaction-error = { version = "2.2" } +solana-transaction-error = { version = "2.3" } solana-clock = { version = "2.2" } +solana-clock = { version = "2.3" } solana-commitment-config = { version = "2.2" } +solana-commitment-config = { version = "2.3" } solana-account = { version = "2.2" } +solana-account = { version = "2.3" } solana-epoch-info = { version = "2.2" } +solana-epoch-info = { version = "2.3" } solana-keypair = { version = "2.2" } +solana-keypair = { version = "2.3" } solana-compute-budget-interface = { version = "2.2" } +solana-compute-budget-interface = { version = "2.3" } solana-signer = { version = "2.2" } +solana-signer = { version = "2.3" }After bumping, run a sweep to catch any lingering 2.2 pins:
#!/bin/bash rg -nP 'solana-[a-z0-9-]+"\s*=\s*"2\.2' -SAnd (optional) ensure no duplicate versions in lockfile with cargo tree.
Also verify your [patch.crates-io] pins align with 2.3 runtime:
#!/bin/bash rg -nC2 '^\s*solana-(program-runtime|bpf-loader-program)\s*=\s*\{ git: .*agave.*rev:'If you want, I can generate a follow-up PR to align these versions and run a quick cargo tree audit.
program-tests/account-compression-test/tests/batched_merkle_tree_test.rs (1)
54-61: Adopt workspace-wide split-crates migration
This PR correctly refactors the batched_merkle_tree_test imports, but the repo scan surfaced many remaininguse solana_sdk::…statements across xtask, sdk-libs, program-tests, programs, and forester. Please bump all Solana split crates to v2.3 in Cargo.toml and replace these deprecated re-exports with their respectivesolana_account,solana_instruction,solana_pubkey,solana_keypair,solana_signature, andsolana_signercrates (keeping onlysolana_sdk::system_instructionas needed) in a coordinated, bulk migration.sdk-libs/client/Cargo.toml (1)
12-12: Feature gating confirmed:litesvmis optional behind theprogram-testfeature, no crates enable it by default, and alllitesvmimports are enclosed in#[cfg(feature = "program-test")].forester/src/health_check.rs (1)
154-164: Migration to Keypair::try_from(.. .as_slice()) looks goodError path is preserved and message avoids leaking key material. Nice.
programs/system/src/context.rs (1)
392-406: Return type tweak to &'a dyn OutputAccount<'b> looks goodThe lifetimes are correct (
'b: 'a), and the object coercions are sound.
Summary by CodeRabbit
New Features
Improvements
Tests
Chores