Skip to content

ci: pin solana-cli-version to 3.1.14 (setup-anchor's stable resolver 429s)#14

Merged
mikemaccana merged 6 commits into
quicknode:mainfrom
mikemaccana-edwardbot:ci-note-anza-stable-flake
May 11, 2026
Merged

ci: pin solana-cli-version to 3.1.14 (setup-anchor's stable resolver 429s)#14
mikemaccana merged 6 commits into
quicknode:mainfrom
mikemaccana-edwardbot:ci-note-anza-stable-flake

Conversation

@mikemaccana
Copy link
Copy Markdown
Collaborator

@mikemaccana mikemaccana commented May 11, 2026

Pins solana-cli-version to 3.1.14 in all 5 setup-anchor / setup-solana workflow steps. The stable resolver in those actions queries the unauthenticated GitHub Releases API for anza-xyz/agave, which hits a 429 rate limit once CI runs at any volume; after 5 retries it returns empty, the subsequent install curl 404s, and solana: command not found kills every build-and-test job. Concretely this is what's been breaking main since PR #12 merged.

Comment above each pinned line explains the WHY and tells future-me to bump it alongside anchor-version.

3.1.14 is the current value of stable as of this PR.

Untouched: the deliberate solana-cli-version: beta canary jobs in native, pinocchio, solana-asm.

Affects:

  • .github/workflows/anchor.yml
  • .github/workflows/native.yml
  • .github/workflows/pinocchio.yml
  • .github/workflows/quasar.yml
  • .github/workflows/solana-asm.yml

Note

Medium Risk
Pins toolchain versions in CI and updates several on-chain instruction handlers to match newer quasar-lang account/remaining-account APIs, including new unsafe accessors. Moderate risk due to changes in CPI account-view handling and account type validation, though behavior should remain equivalent.

Overview
CI hardening: Pins solana-cli-version to 3.1.14 across workflows that previously used stable to avoid GitHub API rate-limit failures, and switches solana-asm to use pnpm/action-setup@v4 (removing npm install -g pnpm) to prevent pnpm 10+ install errors.

Quasar program compatibility: Updates multiple compressed-NFT CPI helpers to handle RemainingAccounts::iter() yielding Result by extracting proof-node AccountViews via unsafe ...as_account_view_unchecked(), and changes several SPL Mint accounts under address = ... constraints from Account<Mint> to InterfaceAccount<Mint> to satisfy new quasar-lang discriminator requirements.

Reviewed by Cursor Bugbot for commit 8696e80. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds a one-line comment above the 'solana-cli-version: stable' lines in each setup-anchor / setup-solana workflow, so a future reader understands why CI sometimes fails on a green main with no code change. No behaviour change; the value remains 'stable'.
The 'stable' resolver in setup-anchor / setup-solana queries the unauthenticated GitHub Releases API for anza-xyz/agave, which 429s once CI runs at any meaningful volume. After 5 retries it returns empty and the subsequent install curl 404s, leaving CI without solana installed at all - this is what was breaking main and what was making this PR red. Pinning to 3.1.14 (current value of 'stable') makes CI deterministic. The 'beta' canary jobs in native/pinocchio/solana-asm are intentionally left floating.
@mikemaccana mikemaccana changed the title ci: note that Anza's stable can resolve to a not-yet-published release ci: pin solana-cli-version to 3.1.14 (setup-anchor's stable resolver 429s) May 11, 2026
The ASM workflow installed pnpm with 'npm install --global pnpm', which
resolves to the latest pnpm release. Recent pnpm releases escalate
'Ignored build scripts' from a warning to a hard error (ERR_PNPM_IGNORED_BUILDS),
which makes 'pnpm install --frozen-lockfile' fail for any project with
transitive build scripts that aren't on an explicit allow-list. The asm
projects pull in bufferutil + utf-8-validate via @solana/web3.js -> ws.

Switch to pnpm/action-setup@v4 (which the anchor, native, pinocchio, and
typescript workflows already use). That action currently installs pnpm
10.33.0, which still treats this as a warning and lets the install succeed.
Newer quasar-lang (post-PR-solana-developers#195 era) changed RemainingAccounts::iter() to
yield Result<RemainingAccount, _> instead of Result<AccountView, _>, so the
existing 'proof_views[i] = result?' assignments stopped compiling.

RemainingAccount is a safe wrapper around AccountView. We only need the
inner view to forward to the bubblegum / spl-account-compression CPI as
read-only proof nodes (no data borrows, no aliasing risk), so reach for
'as_account_view_unchecked' inside an unsafe block.

Affects:
- compression/cnft-burn/quasar (burn CPI proof nodes)
- compression/cnft-vault/quasar (withdraw / withdraw_two transfer CPI)
- compression/cutils/quasar (verify_leaf CPI)
Newer quasar-lang's Account<T> derive emits <T as Discriminator>::BUMP_OFFSET
whenever the field carries an 'address = ...' constraint (it stores the
discriminator-owned bump offset). SPL 'Mint' does not implement Discriminator,
so build fails with:

    the trait bound `quasar_spl::Mint: quasar_lang::prelude::Discriminator`
    is not satisfied

InterfaceAccount<T> intentionally takes the generic existing-account
verifier path that doesn't require Discriminator (so it can accept both
SPL Token and Token-2022 mints), which makes it the right wrapper for an
address-bound SPL Mint.

Affects:
- tokens/pda-mint-authority/quasar (MintTokens.mint at MintPda)
- tokens/token-swap/quasar (deposit_liquidity / withdraw_liquidity
  mint_liquidity at LiquidityMintPda)
@mikemaccana mikemaccana merged commit b58d1f2 into quicknode:main May 11, 2026
45 checks passed
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.

2 participants