Skip to content

Add reproducible builds #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

SozinM
Copy link
Collaborator

@SozinM SozinM commented Aug 12, 2025

πŸ“ Summary

From reth
https://github.com/paradigmxyz/reth/blob/f30016019d592e36b31b48feb8adf3292c04b626/Makefile#L83

πŸ’‘ Motivation and Context


βœ… I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@SozinM SozinM force-pushed the msozin/make-release-reproducible branch from 6fae7bb to cb9b9c8 Compare August 13, 2025 12:29
@SozinM SozinM changed the title Remove timestamp for reproducible builds Add reproducible builds Aug 13, 2025
@alexhulbert
Copy link
Member

@SozinM manually requesting you to review since Github won't let me request your review on your own PR

@@ -100,8 +100,12 @@ jobs:
run: |
git config --global --add safe.directory "$(pwd)"
. $HOME/.cargo/env
cargo build --release --features=${{ matrix.features }} --target ${{ matrix.configs.target }} --package op-rbuilder

SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure it will work

@@ -0,0 +1,33 @@
name: Verify Reproducible Build
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think the best idea is to run this on schedule once a week / couple of days for example
This way we will notice if something has broken repro builder, but won't wait for this to pass on every PR, because it will take a LOT of time

Copy link
Member

Choose a reason for hiding this comment

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

I figured we were just going to run this manually whenever we have a release that we want to put in a new image. Every 3-4 days def wouldn't hurt though. I'll add that.

ARG FEATURES
WORKDIR /app
COPY . .
RUN SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will force docker to build this 2 times (and one of them would be slow build), let's do it better

Copy link
Member

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are compiling regular build + reproducible build
Doesn't really make sense, because you could separate them or use a flag to build one or the other.
This now inside the check we are running instead of compiling once we would compile both of the, and probably go from 2min -> 10min

Copy link
Member

@alexhulbert alexhulbert Aug 18, 2025

Choose a reason for hiding this comment

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

Ahh I see. That RUN command means that the builds are actually happening during docker build, not docker run. I can just add a --target flag to the PR workflow to force it to build only the non-reproducible. Does that solve the problem?

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.

2 participants