Skip to content

ci: pin sbpf and Solana versions in ASM workflow#625

Open
MarkFeder wants to merge 2 commits into
solana-foundation:mainfrom
MarkFeder:ci-pin-asm-sbpf-solana
Open

ci: pin sbpf and Solana versions in ASM workflow#625
MarkFeder wants to merge 2 commits into
solana-foundation:mainfrom
MarkFeder:ci-pin-asm-sbpf-solana

Conversation

@MarkFeder

Copy link
Copy Markdown
Contributor

Problem

The ASM build-and-test job has been red on main since 2026-06-29, failing every ASM example with:

Program is not deployed
Program ... failed: invalid account data for instruction

Tests that expect custom program error: 0x1..0x6 instead get invalid account data for instruction, so checking-accounts, create-account, hello-solana, transfer-sol (and the rest of the ASM group) all fail.

Root cause

solana-asm.yml installs both tools unpinned, so they drift with upstream:

Tool Last green (06-29 00:44 UTC) Current
sbpf v0.1.9 (0223df0e) v0.2.2 (54a3a273)
solana-cli (stable) 4.0.3 4.1.1

sbpf bumped 0.1.9 → 0.2.2 and now emits an sBPF binary the runtime loader rejects at execution ("Program is not deployed"). The build still succeeds; the failure is at load/execute time. No repo commit touched the ASM examples in the break window — it is pure toolchain drift.

Fix

Pin to the exact last-green combination:

  • sbpf--rev 0223df0e (v0.1.9)
  • Solana stable leg → 4.0.3

The beta leg is intentionally left unpinned — it is already continue-on-error and is meant to track the moving channel, so it cannot fail the job.

Note / follow-up

This restores CI by freezing the ASM toolchain to the last-known-good pair. A forward-fix (making the ASM examples compatible with sbpf 0.2.x / Solana 4.1.x) is the longer-term path and can be done separately; this unblocks the currently-red ASM check in the meantime.

The ASM build-and-test job installs sbpf from the git tip and Solana from
the floating "stable" channel, both unpinned. Around 2026-06-29 sbpf moved
0.1.9 -> 0.2.2 and Solana stable moved 4.0.3 -> 4.1.1; the new sbpf emits an
sBPF binary the runtime loader rejects at execution ("Program is not
deployed"), failing every ASM example (checking-accounts, create-account,
hello-solana, transfer-sol, ...).

Pin sbpf to 0223df0e (v0.1.9) and Solana stable to 4.0.3 -- the exact
last-green combination -- to restore the ASM workflow. The beta leg is left
unpinned since it is continue-on-error and intentionally tracks the moving
channel.
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR freezes the ASM CI toolchain to the last-known-good combination after unpinned versions broke every ASM example on main starting 2026-06-29. Both the sbpf assembler (pinned via full 40-char git SHA to v0.1.9) and the Solana CLI (pinned to 4.0.3) now match the last state where all examples passed.

  • sbpf pinned: cargo install now uses --rev 0223df0e7ba622d4956b4ecf3cf2397f6945b76b, preventing accidental uptake of v0.2.x which produces binaries the runtime loader rejects.
  • Solana CLI pinned: solana-cli-version: 4.0.3 replaces the drifting stable alias that had advanced to 4.1.1.
  • Beta leg: the Solana beta version remains unpinned with continue-on-error: true as intended; note that since sbpf is installed once before both legs, the beta build will also run against the pinned sbpf v0.1.9 until a forward-fix is landed.

Confidence Score: 5/5

Safe to merge — the change is a targeted toolchain freeze with well-documented rationale and no functional logic changes.

Both pins use immutable references (a full 40-character git SHA for sbpf, an explicit version number for Solana CLI) and are accompanied by comments explaining the pairing. The beta leg remains non-blocking as before. The only minor nuance is that sbpf is installed once and therefore also affects the beta build, but this is an acceptable trade-off for a temporary stabilisation fix and is unlikely to cause unexpected failures given that beta already runs with continue-on-error.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/solana-asm.yml Pins sbpf to full-SHA rev 0223df0e… (v0.1.9) and Solana CLI to 4.0.3 with explanatory comments; beta leg stays unpinned on the Solana version; overall a correct and well-documented toolchain freeze.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Setup build environment] --> B[Install pnpm@10.33.0]
    B --> C["cargo install sbpf\n--rev 0223df0e... (v0.1.9)\nPINNED"]
    C --> D[Setup Solana Stable\nv4.0.3 PINNED]
    D --> E[Build and Test with Stable\nMUST PASS]
    E --> F[Setup Solana Beta\nunpinned, continue-on-error]
    F --> G[Build and Test with Beta\ncontinue-on-error]
    E -->|uses pinned sbpf v0.1.9| E
    G -->|also uses pinned sbpf v0.1.9| G
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Setup build environment] --> B[Install pnpm@10.33.0]
    B --> C["cargo install sbpf\n--rev 0223df0e... (v0.1.9)\nPINNED"]
    C --> D[Setup Solana Stable\nv4.0.3 PINNED]
    D --> E[Build and Test with Stable\nMUST PASS]
    E --> F[Setup Solana Beta\nunpinned, continue-on-error]
    F --> G[Build and Test with Beta\ncontinue-on-error]
    E -->|uses pinned sbpf v0.1.9| E
    G -->|also uses pinned sbpf v0.1.9| G
Loading

Reviews (2): Last reviewed commit: "ci: use full 40-char SHA for sbpf pin" | Re-trigger Greptile

Comment thread .github/workflows/solana-asm.yml Outdated
Expand the sbpf --rev from the 8-char short SHA to the full
40-char SHA (0223df0e7ba622d4956b4ecf3cf2397f6945b76b) for an
explicit, unambiguous immutable reference, per review feedback.
@MarkFeder

Copy link
Copy Markdown
Contributor Author

Hi @Perelyn-sama — thanks again for reviewing my earlier pinocchio PRs! When you have a moment, could you take a look at this one? It's a small, self-contained ASM CI fix: it pins sbpf (rev 0223df0e…76b, v0.1.9) and Solana CLI (4.0.3) to the last-known-good combo, restoring the repo-wide ASM job that's been red on every PR since the toolchain drift on 2026-06-29. It's fully green. Merging this also clears the lone ASM red X on #624. Thanks!

@Perelyn-sama

Copy link
Copy Markdown
Contributor

LGTM but I don't have write access after the repo move.

@dev-jodee can you approve this PR

@dev-jodee

Copy link
Copy Markdown
Collaborator

@MarkFeder thanks for this ! we require signed commits for our open source repo now, if you can re-sign that commit, i'll be happy to merge :)

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.

3 participants