Skip to content

chore(toolchain): align stack to official Solana 3.x line#14

Merged
graveyieldprotocol merged 2 commits into
mainfrom
chore/toolchain-bump-solana-3
May 14, 2026
Merged

chore(toolchain): align stack to official Solana 3.x line#14
graveyieldprotocol merged 2 commits into
mainfrom
chore/toolchain-bump-solana-3

Conversation

@graveyieldprotocol

Copy link
Copy Markdown
Collaborator

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.

Component Before After
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 (MSRV) 1.79 1.91
platform-tools (BPF) v1.54 v1.54 (kept — see below)

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.1
  • Cargo.toml: rust-version 1.79 → 1.91; anchor-lang/anchor-spl 0.31.1 → 0.32.1; repository URL corrected from stale lowercase graveyieldprotocol/protocol to org-canonical GraveYield-Protocol/protocol; [workspace.metadata.solana] tools-version = "v1.54" retained
  • Anchor.toml: anchor_version 0.31.1 → 0.32.1; solana_version 2.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.node 20 → 24; @types/node ^20.19.40 → ^24.0.0; pnpm overrides updated to match; @coral-xyz/anchor (sdk) ^0.31.1 → ^0.32.1

Anchor 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 all anchor_spl::Account<T>::try_from usage during m4 (manual SPL byte parsing in raydium_v4::parse()), so this should be neutral.
  • lang: Replace solana-program crate with smaller crates — internal refactor. We import anchor_lang::solana_program::pubkey in 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 in programs/grave-scanner/src/lib.rs may 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 uses init_if_needed on lp_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

  • Local verification not run on this commit — host Rust 1.91 not installed in sandbox; rustup install through proxy is fragile. CI is the first compile gate.
  • CI: cargo fmt --all -- --check on Rust 1.91
  • CI: cargo clippy --workspace --all-targets -- -D warnings on Rust 1.91 with Anchor 0.32.1
  • CI: cargo test -p grave-scanner --lib should still pass 19/19
  • CI: pnpm typecheck on Node 24 + @types/node 24
  • CI: anchor build via Solana 3.0.10 + platform-tools v1.54 BPF compile
  • CI: terminology-lint.sh clean

If 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

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
@graveyieldprotocol

Copy link
Copy Markdown
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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant