-
Notifications
You must be signed in to change notification settings - Fork 221
drop: 0xb10c 27.0rc1 & 25.2rc2 (hash mismatch) #1201
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
drop: 0xb10c 27.0rc1 & 25.2rc2 (hash mismatch) #1201
Conversation
Similar to bitcoin-core#1197, this drops my SHA256SUMS as they don't match the others. I recently switched to a new GUIX build setup, which I think is the cause for this mismatch. Affected are: - 27.0 (added bitcoin-core#1194; removed bitcoin-core#1197) - 27.0rc1 (added bitcoin-core#1169; removed here) - 25.2rc2 (added bitcoin-core#1170; removed here) See also: https://github.com/bitcoin-core/guix.sigs/commits?author=0xB10C
Mind providing its description or steps to reproduce it? |
I've recently started using the NixOS GUIX module, which might be doing something slightly different resulting in different hashes. I've re-triggered a 27.0 build with this setup to then compare binaries. |
Might be related to bitcoin/bitcoin#29754, which implies not 100% isolated build environment. |
On a system running NixOS, enable the GUIX service in
then, make a GUIX build with |
Looking at the 27.0 output, curiously, these two files are the same as the others:
The others all diverge. i can understand about the source tarball, but that win64 also matches (but not any of the others) is... strange. It makes me think the source of the divergence is some filesystem metadata-related (the tarball is generated by git(?), and otherwise only the .exe won't have any extended UNIX file attributes).
Would imagine they all differ in a similar way. so for comarison it'd be enough to upload say, x86_64 linux and maybe the associated -debug (if we need to go that deep to compare symbol addresses). edit: i've installed guix on a nixos VM, let's try to reproduce ! |
i've been able to reproduce @0xB10C's results:
Will compare them to the release. Edit:
Nix:
Does Nix use a patched tar, maybe? But the same is true for No, it doesn't. But nix builds in a sandbox that sets all dates to 1980-01-01. This is what we're seeing here. |
In For tar, pass
For zip (windows), use touch to set the date before compressing using
Both don't work inside Nix Guix, somehow they get squashed to |
@0xB10C i think i solved it, just do unset SOURCE_DATE_EPOCH
contrib/guix/guix-build (we likely want to do this inside the build script, but this will work for now) |
Wow @laanwj good detective work! I can confirm that the files in the tar.gz archives are set to 1980-01-01 and hash to the same (incorrect) hash. I've |
Does it make sense to have a CI job that errors in cases where newly added hashes don't match the existing hashes for the same release? |
Thank you !
We've discussed this in the past and although it's useful for detecting flukes and misconfigurations early, broadly i'm against this: i think there needs to be evidence of diverging hashes in the repository (even if removed or replaced in later commits, like here). After all, in an actual compromise, it's not 100% clear who has the correct output, it's not necessarily who submitted them first. What i really like to avoid is anyone doing some crude hacks to get the same output just to "pass the CI" and have it merged (and introducing say, the backdoor), instead of investigating the difference. |
We do need some kind of warning system though if there are diverging outputs in the first place. If they go undetected it's also pointless 😄 But it shouldn't ideally prevent merging. |
A nightly CI job on |
That could work! In any case, it'd make sense to open a new issue in this repository for discussing this. |
Similar to #1197, this drops my recent SHA256SUMS as they don't match the others. I recently switched to a new GUIX build setup, which I think is the cause for this mismatch.
Affected are:
See also: https://github.com/bitcoin-core/guix.sigs/commits?author=0xB10C