chore(toolchain): align stack to official Solana 3.x line#14
Merged
Conversation
Bumps the entire toolchain to match https://solana.com/docs/intro/installation: Solana CLI: 2.2.18 -> 3.0.10 Anchor CLI: 0.31.1 -> 0.32.1 Rust (host): 1.85.0 -> 1.91.1 Node.js: 20 -> 24 rust-version: 1.79 -> 1.91 Pinned platform-tools v1.54 (cargo 1.85) stays as the source of truth for the BPF compile — Solana 3.0.10 + Anchor 0.32.1 still default to older platform-tools (cargo 1.84) which can't parse edition2024 manifests, so the explicit `[workspace.metadata.solana] tools-version` override remains required. Repository field in Cargo.toml also updated from the stale lowercase graveyieldprotocol/protocol path to the canonical org path GraveYield-Protocol/protocol. Anchor 0.32 breaking-change surface (per release notes): - spl: anchor-spl deps bumped to latest. We removed all `anchor_spl::Account<T>::try_from` usage in m4 (manual byte parsing), so this should be neutral. - lang: `solana-program` crate replaced with smaller crates. We import `anchor_lang::solana_program::pubkey` in adapter files; if the re-export path moved, CI will surface it. - lang: deprecated realloc / clippy fixes. Our `#![allow(deprecated)]` and `#![allow(unexpected_cfgs)]` in grave-scanner/src/lib.rs may be redundant on 0.32; left in place for now, can drop in a follow-up. Local verification not run on this commit — host Rust 1.91 isn't installed in the sandbox and installing rustup through the sandbox proxy is fragile. CI will verify cargo fmt / clippy / test on 1.91 and BPF compile via Solana 3.0.10 + platform-tools v1.54. If CI surfaces an Anchor 0.32 migration issue, the follow-up patch lands as chore(toolchain)-bump.0.1.
…or Anchor 0.32 Anchor 0.32's `lang: Replace solana-program crate with smaller crates` refactor (PR #3819) moved the `pubkey!` macro re-export so the explicit `use anchor_lang::solana_program::pubkey;` we had in all 5 adapter files is now `unused_imports` under clippy. The macro itself resolves fine via the existing `use anchor_lang::prelude::*;` in each file. Local verification on rust 1.91.1 + anchor 0.32.1: - cargo fmt --all -- --check: clean - cargo clippy --workspace --all-targets -- -D warnings: clean - cargo test -p grave-scanner --lib: 19/19 pass
Collaborator
Author
|
@coderabbitai review (Manual trigger — CodeRabbit was reinstalled on the org after repo transfer. Triggering review now per the locked policy that CodeRabbit signs off before merge. CI is green on all 5 jobs against the new Solana 3.x stack.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns the entire repo toolchain to the official Solana 3.x stack per solana.com/docs/intro/installation. Follow-up to PR #13 which shipped m4 on the older Solana 2.2.18 + Anchor 0.31.1 line.
rust-version(MSRV)Why now
PR #13 surfaced that the original pin combo (Solana 2.0.21 + Anchor 0.31.1) was never internally consistent for BPF compile — anchor-lang 0.31.1 pulled in edition2024 deps that platform-tools' bundled cargo 1.75 couldn't parse. PR #13 worked around it with a
[workspace.metadata.solana] tools-version = "v1.54"pin to force a newer platform-tools.This PR brings the host toolchain pins forward to match the official current stack, removing the version drift that caused that diagnosis loop. The
tools-version = "v1.54"pin stays — Solana 3.0.10's default platform-tools is still v1.52 (cargo 1.84), which doesn't handle edition2024. Anchor and Solana CLIs themselves move to the official versions.Changes
rust-toolchain.toml: channel 1.85.0 → 1.91.1Cargo.toml:rust-version1.79 → 1.91;anchor-lang/anchor-spl0.31.1 → 0.32.1;repositoryURL corrected from stale lowercasegraveyieldprotocol/protocolto org-canonicalGraveYield-Protocol/protocol;[workspace.metadata.solana] tools-version = "v1.54"retainedAnchor.toml:anchor_version0.31.1 → 0.32.1;solana_version2.2.18 → 3.0.10.github/workflows/ci.yml: env updated (SOLANA_VERSION, ANCHOR_VERSION, RUST_TOOLCHAIN, NODE_VERSION)package.json(root + sdk + indexer):engines.node20 → 24;@types/node^20.19.40 → ^24.0.0; pnpm overrides updated to match;@coral-xyz/anchor(sdk) ^0.31.1 → ^0.32.1Anchor 0.32 breaking-change surface
Per the 0.32.0 release notes:
spl: Update SPL dependencies to latest compatible versions— anchor-spl deps bump. We removed allanchor_spl::Account<T>::try_fromusage during m4 (manual SPL byte parsing inraydium_v4::parse()), so this should be neutral.lang: Replace solana-program crate with smaller crates— internal refactor. We importanchor_lang::solana_program::pubkeyin all 6 adapter files. If the re-export path moved in 0.32, CI clippy will surface it as a compile error.lang: Fix deprecated realloc / clippy warnings— the#![allow(deprecated)]and#![allow(unexpected_cfgs)]we keep inprograms/grave-scanner/src/lib.rsmay be redundant on 0.32. Left in place; can be tightened in a follow-up if clippy starts flagging them as dead allows.lang: Add custom error when using init on SystemAccount— GraveVault usesinit_if_neededonlp_holder_pool_vault: SystemAccount<'info>per PR feat(grave-vault): m3 salvage_pool pre-flight + cert freshness gates #12's design. PR feat(grave-vault): m3 salvage_pool pre-flight + cert freshness gates #12 isn't on main yet, so not affected by this PR. PR feat(grave-vault): m3 salvage_pool pre-flight + cert freshness gates #12's rebase will need to handle this if 0.32 changes the semantics.Verification
cargo fmt --all -- --checkon Rust 1.91cargo clippy --workspace --all-targets -- -D warningson Rust 1.91 with Anchor 0.32.1cargo test -p grave-scanner --libshould still pass 19/19pnpm typecheckon Node 24 +@types/node24anchor buildvia Solana 3.0.10 + platform-tools v1.54 BPF compileterminology-lint.shcleanIf any CI job surfaces an Anchor 0.32 migration issue, the follow-up patch lands as
chore(toolchain)-bump.0.1— likely a simple import-path adjustment.Refs