Implement verification of reproducible builds and run differential E2E tests#468
Merged
Implement verification of reproducible builds and run differential E2E tests#468
Conversation
Prior to adding cache to this workflow, the build steps always ran,
which invoked the following: "make install-wasm" > "make install-npm" >
installed the solc npm package defined in "js/emscripten/package.json".
Thus, the explicitly downloaded soljson.js was never used since npm
module resolution first looks for an npm package when required with
"require('solc/soljson')" as before. With cache now added and on cache
hits, the build step no longer runs and just performs the sanity check,
which now detects this unintended behavior and fails since there is no
solc npm package. This commit updates it to look for the local file.
This allows using the same script for all builds including Wasm, and to make it more readable, maintainable, testable, and more easily allow for parallel compilations with Node async APIs.
Includes building LLVM for Windows using clang-cl, and applies LLVM patches for deterministic operand order and correct peephole optimization for large integers for minsize (thus, the custom stripping of minsize has been removed). The patches are applied as part of llvm-builder, instead of in the workflow step as previously tested.
elle-j
commented
Apr 9, 2026
elle-j
commented
Apr 10, 2026
xermicus
reviewed
Apr 10, 2026
Member
xermicus
left a comment
There was a problem hiding this comment.
Running differential tests needs build caches for revive dev node and rpc binaries since (--profile production builds take long time to build)
elle-j
commented
Apr 13, 2026
Previous file was from a run with polkdaot-sdk sha 9d8a2fefd2414591c4a243460f3ffc5195a71deb, now updated to 60f0f390c895d79f9cccedd6e73c8266ab0860a8 (2507.4.0).
xermicus
approved these changes
Apr 14, 2026
Member
xermicus
left a comment
There was a problem hiding this comment.
Good stuff! This is looking much better now, thanks for taking on all that effort!
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.
Description
This adds verification for reproducible builds (via revive-differential-tests testing framework) by:
0,3,zfor each contractThis PR also runs the differential E2E tests (via
retester) with the resolc linux musl build.All of the above only runs if our
testworkflow succeeds.Related
This PR initially implemented the above in this repo but has now been implemented into the separate testing framework instead. The most relevant PRs implemented alongside this PR as prerequisites are:
revive-differential-tests:modeand allow setting solc optimizer enabledcompilecontext/subcommand for standalone compilation mode--modeCLI argument forcompileexport-hashesandcompare-hashessubcommands for report processorcfg(unix)to fix Windows builds--compilecommandrevive:minsizellvm-project:SelectionDAGtype legalization produces different operand ordering fori256multiply across platformssolidity:Notes
Failed compilations
Since resolc-compiler-tests currently includes contracts that are expected to fail resolc compilation (e.g. due to unsupported instructions, contracts that are expected to work with solc for evm/revm), the compilation workflow job is not expected to fail if compilation fails for a contract.
Instead, if a contract compiles with one build but not with another, a hash will be missing and will thereby generate a mismatch when comparing all hashes, failing at the verification step.
Resolved Issues
Closes #175