fix: support Solana SDK v3.x projects missing solana-program in Cargo.lock#228
Open
MidTermDev wants to merge 1 commit intoEllipsis-Labs:masterfrom
Open
fix: support Solana SDK v3.x projects missing solana-program in Cargo.lock#228MidTermDev wants to merge 1 commit intoEllipsis-Labs:masterfrom
MidTermDev wants to merge 1 commit intoEllipsis-Labs:masterfrom
Conversation
….lock In Solana SDK v3.x, the `solana-program` crate was split into subcrates (e.g. `solana-program-error`, `solana-account-info`). Programs built with pinocchio or the new SDK no longer have `solana-program` in their Cargo.lock, causing `solana-verify build` to fail unconditionally with "Failed to parse solana-program version from Cargo.lock". This fixes two cases: 1. When `--base-image` is provided, the version parsing failure is now ignored since the Docker image is already explicitly specified. 2. When no base image is provided, the tool falls back to `solana-program-error` and `solana-account-info` crate names to determine the Solana version for automatic image selection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
solana-verify buildfailure for Solana SDK v3.x projects (e.g. pinocchio-based programs) wheresolana-programno longer exists as a standalone crate inCargo.lock--base-imageis provided, version parsing failure is now ignored instead of abortingsolana-program-errorandsolana-account-infocrate names for automatic Docker image selectionProblem
In Solana SDK v3.x, the
solana-programcrate was split into subcrates (solana-program-error,solana-program-runtime,solana-account-info, etc.). Programs built with pinocchio or the new SDK don't havesolana-programin theirCargo.lock, causing every build to fail with:This also affects the remote OtterSec verification service, making it impossible to verify any SDK v3.x program.
Fix
The version lookup in
build()was unconditional (line 835) and ran before checking--base-image. This PR:match base_imageblock--base-imageis provided: gracefully defaults to(0, 0, 0)ifsolana-programisn't foundsolana-program→solana-program-error→solana-account-infoas fallback crate names to determine the Solana versionTest plan
solana-programin Cargo.lock)solana-verify build --library-name pinocchio_token_programnow auto-detects Solana 3.0.0 and selects the correct Docker imagesolana-verify verify-from-repofull flow (clone → build → hash compare → PDA upload) works end-to-end🤖 Generated with Claude Code