Skip to content

Pin sbpf assembler to specific revision for reproducible builds#86

Merged
mikemaccana merged 1 commit into
mainfrom
claude/solana-examples-ci-asm-jb73x0
Jun 30, 2026
Merged

Pin sbpf assembler to specific revision for reproducible builds#86
mikemaccana merged 1 commit into
mainfrom
claude/solana-examples-ci-asm-jb73x0

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Summary

Pin the sbpf assembler installation to a specific git revision instead of building from the latest branch HEAD. This ensures reproducible builds and prevents CI failures when sbpf makes breaking changes to its output format.

Changes

  • Updated the cargo install command for sbpf to use --rev 0223df0e7ba622d4956b4ecf3cf2397f6945b76b
  • Added detailed comments explaining why pinning is necessary:
    • Building from HEAD makes builds non-reproducible
    • sbpf merged SBPF v3 changes (PR #127) on 2026-06-29 that switched to the v3/0x03 OS-ABI ELF format
    • litesvm 0.11.0's loader rejects the v3 format, causing all asm tests to fail
    • The pinned revision is the last commit before v3 changes and matches the last successful CI run
    • The pin should be bumped together with litesvm upgrades

Implementation Details

The selected revision ensures compatibility with the current litesvm version while maintaining build reproducibility. This approach prevents unexpected CI failures from upstream sbpf changes until litesvm is updated to support the newer ELF format.

https://claude.ai/code/session_015ZgWN7hk3QzLuoDUPYrvdj

The ASM workflow installed the sbpf assembler from the branch HEAD with an
unpinned `cargo install --git`, making the build non-reproducible. On
2026-06-29 sbpf merged its SBPF v3 work (PR #127), switching the emitted ELF
to the v3 / 0x03 OS-ABI format. The pinned litesvm 0.11.0 loader rejects that
format, so every asm example began failing at `svm.add_program(...).unwrap()`
with `Instruction(InvalidAccountData)` (checking-accounts, create-account,
hello-solana, transfer-sol).

Pin sbpf to 0223df0e (the last commit before the v3 changes, which matches the
toolchain from the last green run) so the build is reproducible and compatible
with litesvm 0.11.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZgWN7hk3QzLuoDUPYrvdj
@mikemaccana mikemaccana merged commit 16fa715 into main Jun 30, 2026
18 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.

1 participant