Repository navigation
hardhat: give unsigned targets a fixed version - #97
Open
martinpitt wants to merge 1 commit into
Open
martinpitt wants to merge 1 commit into
martinpitt wants to merge 1 commit into
Conversation
A build that writes its targets with `--unsigned` wants them to be reproducible. But the version came from the wall-clock time, so every build wrote a different file. The version is as meaningless as the expiry there: a repository imports the file with `--include-from`, takes only its targets, and versions its own targets file when it signs it. Write version "1" (the lowest TUF allows), the same way the expiry is zero. Signed-off-by: Martin Pitt <martin@amutable.com>
martinpitt
added a commit
to amutable/tine
that referenced
this pull request
Nov 3, 2026
hardhat versions the targets by the wall-clock time, so every build of a release wrote a different file. It shouldn't do that with `--unsigned`, see <amutable/quarry#97>. Until that lands, let's hand it SOURCE_DATE_EPOCH as its reference time instead. Importing the targets into a repository keeps only their entries, so their version does not matter. Signed-off-by: Martin Pitt <martin@amutable.com>
Member
|
No that is exactly what The reason we don't use monotonic counters for version numbers is that it would mean we cannot do releases without looking at the existing releases, and I'm a little worried that using |
Member
|
Maybe take a look at #98? |
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.
A build that writes its targets with
--unsignedwants them to be reproducible. But the version came from the wall-clock time, so every build wrote a different file.The version is as meaningless as the expiry there: a repository imports the file with
--include-from, takes only its targets, and versions its own targets file when it signs it.Write version "1" (the lowest TUF allows), the same way the expiry is zero.
Spotted in an attempt in amutable/tine#382 to make the file reproducible. I added a
--ref-time SOURCE_DATE_EPOCHworkaround for that in the meantime, but it doesn't feel quite right. It works though, just in case this is wrong/unwanted.