-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update gradle-witness.jar #1901
Update gradle-witness.jar #1901
Conversation
ACK - works for me locally. But I leave it for @cbeams to merge as he knows more about possible additional implications. |
I leave it to @cbeams as well.... not my expertise... |
Thanks, @devinbileck. To be cautious, we should think about how we know that updates to this jar are legit. For example, I just built the jar against the same commit using Gradle 4.10.2 / OpenJDK 10.0.2 and got the following result:
Whereas when I sync up to your PR branch and run the same checksum, I get a different value:
So, while I trust you simply built the jar as you claim, there's no way of knowing right now that it's actually a representation of the sources at that commit. i.e. it could contain a trojan horse. Ideally, we should set up Travis CI in our new gradle-witness fork and print out a checksum at the end of the build, so that we have something objective to check against when the jar it produces is checked in here. That assumes that building this jar is deterministic under the same Gradle / JDK, and I think it should be. I unzipped the jar and checked for properties files with dates in them, etc, and I didn't see anything. So it should be possible to get the exact same checksum on different machines and operating systems. In the meantime, let's just see if we can align on the same checksum between our two versions of the jar. Did you build with Gradle 4.10.2 / OpenJDK 10.0.2 as well? I'm committing a Gradle wrapper pinned to 4.10.2 to make it a little easier. |
Excellent points. I thought I had used Gradle 4.10.2 / OpenJDK 10.0.2, but now am second guessing. I will verify. |
I confirmed I am using Gradle 4.10.2 / OpenJDK 10.0.2. I pulled from master with your latest commit and ran through the process again and got the same checksum that I got before.
However, I then did a clean build and got a completely different checksum:
Another clean build and yet another checksum:
So perhaps a checksum is not reliable
|
Aha! This article describes the issue and provides a simple solution and I verified it works. |
Right. We actually have this same configuration in Bisq's own build.gradle: https://github.com/bisq-network/bisq/blob/master/build.gradle#L206-L209. Are you putting together a PR for that in the gradle-witness repo, then? |
Yes, i will put together a PR. |
from my side $ git log -1 commit ecf0ffe77c270dc192a137ad373d2cfa8c7c5c38 Author: Chris Beams Date: Fri Nov 9 21:59:41 2018 +0100 Add Gradle wrapper at v4.10.2 See https://github.com/bisq-network/bisq/pull/1901#issuecomment-437493277 userz@DO790C:~/github/gradle-witness$ java -version openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment 18.3 (build 10.0.2+13) OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode) userz@DO790C:~/github/gradle-witness$ ./gradlew build BUILD SUCCESSFUL in 0s 3 actionable tasks: 3 up-to-date userz@DO790C:~/github/gradle-witness$ sum build/libs/gradle-witness.jar 56120 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK, per comments at bisq-network/gradle-witness#1 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Built from commit bisq-network/gradle-witness@44b0391 md5 hash ae4796f320ef3200515183fa9d3f4759
7bbedb2
to
286dd51
Compare
Note that I squashed and force-pushed out the earlier commits updating gradle-witness.jar. All that remains is the one correct commit now. |
I have built a new gradle-witness.jar from our new official bisq fork at https://github.com/bisq-network/gradle-witness which includes fixes for the following:
Resolves: #1897