Skip to content

[WIP] Verify reproducible builds and run differential E2E tests#468

Draft
elle-j wants to merge 25 commits intomainfrom
lj/ci-retester
Draft

[WIP] Verify reproducible builds and run differential E2E tests#468
elle-j wants to merge 25 commits intomainfrom
lj/ci-retester

Conversation

@elle-j
Copy link
Contributor

@elle-j elle-j commented Feb 2, 2026

🚧 WIP

Description

This adds verification for reproducible builds by:

  1. Compiling contracts from resolc-compiler-tests
    • With the resolc builds:
      • linux musl
      • macos universal
      • windows
      • wasm32 emscripten
    • With optimization levels 0, 3, z for each contract
  2. Generating hashes from each contract's bytecode
  3. Comparing hashes
    • For each optimization level:
      • Checks if each hash for a specific contract is identical across the platforms

Notes

Failed compilations

Since resolc-compiler-tests includes contracts that are expected to fail (e.g. due to unsupported pragma solidity version specified), the compile-and-hash workflow jobs are not expected to fail if compilation fails for a contract. (Although, if none of the contracts provided compile to bytecode, the job will fail.)

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.

Detected mismatched hashes for Windows

We've currently detected some mismatched hashes for Windows for optimization level 0 and 3. See the "Compare Hashes Across Platforms" step in this run.

elle-j added 25 commits February 2, 2026 13:16
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.
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

Comments