Repository navigation
feat(compilers): pin Solar release checksums - #351
Merged
Merged
Conversation
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.
figtracer
marked this pull request as ready for review
November 25, 2026 10:34
figtracer
requested review from
0xrusowsky,
DaniPopes,
grandizzy,
mablr,
mattsse,
onbjerg and
stevencartavia
as code owners
November 25, 2026 10:34
stevencartavia
previously approved these changes
Nov 25, 2026
stevencartavia
left a comment
Member
There was a problem hiding this comment.
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
requested changes
Nov 25, 2026
mattsse
left a comment
Member
There was a problem hiding this comment.
Please address the inline finding before merging.
mattsse
approved these changes
Nov 25, 2026
mablr
approved these changes
Nov 25, 2026
DaniPopes
approved these changes
Nov 25, 2026
mattsse
approved these changes
Nov 26, 2026
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.
Why
Before: a Solar install checked the archive against the
.sha256file 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
Solccan list known and installed Solar versions and remove one, as svm does for solc.Change
solar_releases.rsholds the SHA-256 of every archive of each Solar release from 0.2.0.scripts/update-solar-releases.shregenerates it from each release'ssha256.sum, and must run after each Solar release. A release that is not in the table still installs with the old.sha256check, 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_solardeletes 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, andSolc::remove_solarundersvm-solc. No existing API changes. Foundry uses these forforge compiler install|list|removein a follow-up PR.