Skip to content

feat(compilers): pin Solar release checksums - #351

Merged
figtracer merged 4 commits into
mainfrom
fig/solar-version-manager
Nov 26, 2026
Merged

figtracer merged 4 commits into
mainfrom
fig/solar-version-manager

Conversation

@figtracer

Copy link
Copy Markdown
Member

Why

Before: a Solar install checked the archive against the .sha256 file in the same GitHub release. That catches a corrupted download, but a replaced release asset passes. Tools also had no way to list or remove Solar installs.

After: known Solar releases must match checksums pinned in this crate, and Solc can list known and installed Solar versions and remove one, as svm does for solc.

Change

solar_releases.rs holds the SHA-256 of every archive of each Solar release from 0.2.0. scripts/update-solar-releases.sh regenerates it from each release's sha256.sum, and must run after each Solar release. A release that is not in the table still installs with the old .sha256 check, so a new Solar release does not need a foundry-core release first. The trade-off is that new releases get only the weaker check until someone regenerates the table. remove_solar deletes the binary under the install lock and keeps the lock file, as installs do.

Downstream

Adds public Solc::released_solar_versions, Solc::installed_solar_versions, and Solc::remove_solar under svm-solc. No existing API changes. Foundry uses these for forge compiler install|list|remove in a follow-up PR.

Solar installs checked the archive against the `.sha256` file served
next to it, which only detects corrupted downloads. Known releases now
use checksums pinned in this crate, generated from each release's
`sha256.sum` by `scripts/update-solar-releases.sh`. Unknown releases
keep the old check.

Add `Solc::released_solar_versions`, `Solc::installed_solar_versions`,
and `Solc::remove_solar`, so tools can list and manage Solar installs
the way svm does for solc.
stevencartavia
stevencartavia previously approved these changes Nov 25, 2026

@stevencartavia stevencartavia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solar v0.3.1 was published on 2026-11-24, after this commit, and is not in solar_releases.rs, so it installs with the release-hosted .sha256 check only. Running scripts/update-solar-releases.sh adds it.

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the inline finding before merging.

Comment thread scripts/update-solar-releases.sh Resolved
@figtracer
figtracer requested a review from mattsse November 25, 2026 11:13
@figtracer
figtracer merged commit dee3fe1 into main Nov 26, 2026
21 checks passed
@figtracer
figtracer deleted the fig/solar-version-manager branch November 26, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants