Skip to content

chore: bump toolchain to 1.90#1945

Merged
SwenSchaeferjohann merged 2 commits intomainfrom
jorrit/chore-bump-toolchain
Sep 27, 2025
Merged

chore: bump toolchain to 1.90#1945
SwenSchaeferjohann merged 2 commits intomainfrom
jorrit/chore-bump-toolchain

Conversation

@ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Sep 26, 2025

Summary by CodeRabbit

  • New Features

    • Optional LiteSVM support for program-test; transaction sending reports Cancelled and Timeout outcomes.
  • Improvements

    • Upgraded Solana workspace deps to 2.3 and Rust toolchain to 1.90.
    • RPC error handling extended to include LiteSVM; safer slice/iterator ergonomics and minor API lifetime clarifications.
  • Tests

    • Updated test keypair construction and single-instruction handling; added lint allowances.
  • Chores

    • Broad dependency and tooling updates with no user-visible behavior changes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Walkthrough

Workspace dependency and toolchain upgrades (Solana crates to 2.3, Rust to 1.90); many APIs gained explicit lifetimes; Keypair deserialization switched from from_bytes to try_from(... .as_slice()); % checks replaced with .is_multiple_of; LiteSVM added to program-test; several lint suppressions and small test adjustments.

Changes

Cohort / File(s) Summary
Workspace & toolchain
Cargo.toml, rust-toolchain.toml
Bump Solana workspace crates from 2.2→2.3, add/change patch entries, add/upgrade litesvm to workspace deps, and set Rust toolchain channel 1.90.
Forester
forester-utils/src/lib.rs, forester/src/config.rs, forester/src/health_check.rs, forester/src/main.rs, forester/src/processor/v1/send_transaction.rs, forester/tests/e2e_test.rs
Add crate/file lint allows; replace Keypair::from_bytes with Keypair::try_from(... .as_slice()); add TransactionSendResult::Cancelled and ::Timeout and wire them into send flow.
Iterator & zero-copy lifetimes
program-libs/hash-set/src/lib.rs, program-libs/indexed-array/src/array.rs, program-libs/indexed-merkle-tree/src/array.rs, program-libs/zero-copy-derive/src/shared/utils.rs, programs/**/state/*.rs, programs/account-compression/src/instructions/migrate_state.rs, programs/system/src/account_compression_state/*.rs
Public return types updated to include explicit lifetimes (e.g., <'_>) for iterators and zero-copy/merkle-tree types.
Modulo → is_multiple_of refactors
program-libs/batched-merkle-tree/src/batch.rs, .../queue_batch_metadata.rs, program-libs/concurrent-merkle-tree/src/lib.rs, program-tests/merkle-tree/src/lib.rs, prover/client/src/helpers.rs, sparse-merkle-tree/src/merkle_tree.rs, xtask/src/bench.rs, xtask/src/hash_set.rs
Replace % parity/divisibility checks with .is_multiple_of(...); add #[allow(clippy::manual_is_multiple_of)] where applicable.
Tests: Keypair, slice usage, lints
program-tests/**/*, program-tests/utils/src/test_keypairs.rs, forester/tests/e2e_test.rs
Replace Keypair::from_bytes with Keypair::try_from(... .as_slice()); use std::slice::from_ref for single-item slices; add #[allow(deprecated)] / #[allow(dead_code)] in tests.
System context iterator item types
programs/system/src/context.rs
Change iterator item types to return &'a dyn Trait (explicit trait-object references) for chain helpers.
SDK client & program-test (LiteSVM)
sdk-libs/client/Cargo.toml, sdk-libs/client/src/rpc/errors.rs, sdk-libs/client/src/rpc/mod.rs, sdk-libs/program-test/src/lib.rs, sdk-libs/program-test/src/utils/setup_light_programs.rs
Add optional workspace litesvm and include in program-test feature; add RpcError::LiteSvmError + From<litesvm::error::LiteSVMError> (cfg feature); add lint suppressions and small arg adjustment for add_program_from_file.
Small control-flow/refactors & lints
program-tests/system-cpi-test/src/create_pda.rs, programs/system/src/invoke/verify_signer.rs, xtask/src/new_deployment.rs, program-libs/zero-copy-derive/tests/*.rs, program-tests/account-compression-test/tests/batched_merkle_tree_test.rs
Replace unwraps with if let Some(...) = &mut ... patterns, use from_ref for single slices, add imports and lint allowances, and add #[allow(dead_code)] in tests.

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
Loading
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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • sergeytimoshin
  • SwenSchaeferjohann

Poem

A rabbit hops through code so green,
Lifetimes tucked where bytes have been.
Modulos softened to multiples’ tune,
Keys now try from slices soon.
LiteSVM joins the test-day cheer — hop, hop, hooray! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “chore: bump toolchain to 1.90” accurately describes one part of the changeset but omits the extensive dependency upgrades (e.g., Solana crates to v2.3), API lifetime adjustments, lint suppressions, and new feature additions that constitute the bulk of the pull request. Please update the title to reflect the primary work of this pull request—for example, “chore: upgrade Solana workspace dependencies to v2.3 and bump Rust toolchain to 1.90” so that the scope of the major changes is immediately clear.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jorrit/chore-bump-toolchain

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 missing is_multiple_of trait import

u32 doesn’t expose is_multiple_of as an inherent method. Without the num_integer::Integer trait 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 the dead_code allowance more narrowly

A 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 in instruction_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 the dead_code allowance more narrowly

Putting #![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 a mod-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_err lint 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 allowance

Blanket #![allow(deprecated)] at the crate root hides every deprecation warning in forester-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 hit

Right now we still return Cancelled even when the only reason we bail is Instant::now() >= timeout_deadline. With the new Timeout variant 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 off solana_sdk).

The item-level #[allow(deprecated)] only applies to this use item. 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 for allow(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

📥 Commits

Reviewing files that changed from the base of the PR and between 0b783c9 and 246d8ee.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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 cleanup

The if let refactor removes the redundant unwrap while keeping the mutation flow intact. Looks great.


325-373: Solid ergonomic win

Switching to if let here 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_ID now being a Pubkey means 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 good

The 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 of is_multiple_of looks 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() to Keypair::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 diagnostics
xtask/src/hash_set.rs (2)

174-174: LGTM! Modernized divisibility checks.

The change from n % 2 == 0 || n % 3 == 0 to n.is_multiple_of(2) || n.is_multiple_of(3) is more expressive and aligns with Rust's modern idioms. The is_multiple_of method was stabilized and provides clearer intent.


179-179: LGTM! Consistent modernization of divisibility checks.

The change from n % i == 0 || n % (i + 2) == 0 to n.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 clone

Switching to std::slice::from_ref keeps the call-site semantics intact while avoiding the temporary allocation and Clone hit. Nice cleanup.

program-tests/system-cpi-test/tests/test_program_owned_trees.rs (1)

223-224: Good move to Keypair::try_from

Adopting 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 deserialization

Migrating both branches to Keypair::try_from gives us uniform error handling across the byte-array and base58 paths, and avoids the deprecated from_bytes. 👍

program-libs/indexed-merkle-tree/src/array.rs (1)

172-177: Signature tweak looks right

Returning IndexingArrayIter<'_, H, I> ties the iterator lifetime to self, 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 shape

Bringing iter in 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 LGTM

Switching to Keypair::try_from matches 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 good

Using Keypair::try_from here 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 confirmed

Adding 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-proof

This keeps the fixture in sync with the Solana keypair constructors without changing behavior.


377-378: Nice use of from_ref to avoid a temporary Vec

Reusing the instruction slice directly avoids an allocation and reads cleaner.


403-404: Same improvement here

Applying from_ref again keeps this path consistent and eliminates the extra Vec.


446-447: Consistent slice handling

Repeating 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 solid

Line 399 cleanly coerces the filtered concrete accounts into &dyn trait objects, so downstream consumers get the expected zero-copy view without extra allocations.


408-422: Input chaining mirrors outputs well

Line 415 reuses the same lazy filtering/casting pattern for inputs, keeping behavior consistent while avoiding the previous eager collection.


424-432: Lean address iterator

Line 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: Ensure litesvm usage is feature-gated in the client

  • In sdk-libs/client/src/rpc/errors.rs, all litesvm::… imports are guarded by #[cfg(feature = "program-test")].
  • Run cargo check -p light-client with and without --features program-test to confirm successful compilation.
sdk-libs/client/src/rpc/errors.rs (1)

46-49: LGTM: LiteSvmError variant and its From<LiteSVMError> impl are correctly feature-gated. Please verify locally via

cargo check -p light-client  
cargo check -p light-client --features program-test
Cargo.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.

@ananas-block ananas-block force-pushed the jorrit/chore-bump-toolchain branch from 246d8ee to bb47bef Compare September 27, 2025 00:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 246d8ee and bb47bef.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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 slice

Returning ConcurrentMerkleTreeZeroCopy/Mut with 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 on

Exposing iter as IndexingArrayIter<'_, 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 here

With 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 allow keeps diagnostics clean without obscuring intent.


867-884: Consistent handling of the new lint

Applying the same localized manual_is_multiple_of suppression here keeps the loop logic unchanged while satisfying Clippy on the upgraded toolchain. Good call.


959-968: Thanks for keeping the lint scoped

Mirroring the suppression at this site maintains readability of the control flow and keeps Clippy quiet post-upgrade. Looks good.

@ananas-block ananas-block force-pushed the jorrit/chore-bump-toolchain branch from bb47bef to 81887db Compare September 27, 2025 15:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_of is unavailable on usize in Rust 1.90

The new toolchain does not expose an inherent is_multiple_of on 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: Same is_multiple_of regression here

u32 doesn’t gain is_multiple_of in 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 sending

Pre-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’s getLatestBlockhash RPC already returns lastValidBlockHeight inclusive of the default 150-slot validity window (solana.com). Manually adding +150 doubles 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 +150 adjustments 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 check

Avoid 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 % 2 with bitwise

Keeps 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 allow

Bitwise 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 == 0 for readability, move a single #[allow(clippy::manual_is_multiple_of)] to the function level for get_proof_of_leaf, get_proof_by_indices, and verify instead of repeating it inline.

forester/src/processor/v1/send_transaction.rs (4)

376-401: Report Cancelled and Timeout separately in chunk summary

You 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 path

Hard-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 constant

The 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 variant

Allowance 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 traps

Do 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 pitfalls

Accepting Iterator<Item = &'a dyn OutputAccount<'b>> lets callers use std::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 outputs

Change 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 consistency

Behavior 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 readability

Return type can be simplified to Option<&'b dyn OutputAccount<'a>> to match the new &dyn style 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-check ix_data_index before indexing remaining_accounts

Indexing 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::InvalidAccountIndex here?


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 the empty_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

📥 Commits

Reviewing files that changed from the base of the PR and between bb47bef and 81887db.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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 slice

Returning HashSetZeroCopy<'_> keeps the borrow tied to the caller-provided slice and prevents accidental 'static assumptions. This is the right fix for the lifetime upgrade.


90-95: Consistent lifetime propagation through init helper

Matching 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.90

Tying the iterator’s lifetime directly to &self is 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: Returning InputType<'_> matches the borrowed data

The 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_ref keeps the borrow alive without requiring the zero-copy wrapper to be Copy, so this test keeps working even as the type evolves. Solid change.

xtask/src/hash_set.rs (1)

174-181: Modulo replacement reads cleaner

Switching to is_multiple_of keeps 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 to try_from matches the updated API

Using 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 appropriate

Annotating the solana_sdk import 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 construction

The 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 good

Adopting 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 issues

Several 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' -S

And (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 remaining use 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 respective solana_account, solana_instruction, solana_pubkey, solana_keypair, solana_signature, and solana_signer crates (keeping only solana_sdk::system_instruction as needed) in a coordinated, bulk migration.

sdk-libs/client/Cargo.toml (1)

12-12: Feature gating confirmed: litesvm is optional behind the program-test feature, no crates enable it by default, and all litesvm imports are enclosed in #[cfg(feature = "program-test")].

forester/src/health_check.rs (1)

154-164: Migration to Keypair::try_from(.. .as_slice()) looks good

Error 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 good

The lifetimes are correct ('b: 'a), and the object coercions are sound.

Copy link
Contributor

@SwenSchaeferjohann SwenSchaeferjohann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SwenSchaeferjohann SwenSchaeferjohann merged commit 93c5828 into main Sep 27, 2025
32 of 33 checks passed
@SwenSchaeferjohann SwenSchaeferjohann deleted the jorrit/chore-bump-toolchain branch September 27, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants