-
Notifications
You must be signed in to change notification settings - Fork 101
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
Please assist in reproducing version 1.4.0 of your app #112
Comments
Thanks for reporting the issue. It looks like the diff is mostly classes
that are generated by the SQLDelight library, which is used for the new
database storing payments metadata.
The way this lib works is that you write a description of the database,
with tables and SQL queries and for convenience the library generates all
the necessary DAO classes etc. This generation is probably not
reproducible, I'll have to take a look at it and fix that for the next
release.
…On Sun, Oct 25, 2020, 01:05 Leo Wandersleb ***@***.***> wrote:
I tried to reproduce the latest version 1.4.0 of Phoenix and got a
significant diff as also documented here
<https://walletscrutiny.com/android/fr.acinq.phoenix.mainnet/>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#112>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABL7SO3IWT2VPOBLBKKWXV3SMNMVNANCNFSM4S543S7Q>
.
|
Oh! Ok. That means I should try this on a different system because I have issues reproducing one other repositpry, too in a very weird way. Check out this issue. And sqldelight is not giving this issue attention since 10 months. |
I now ran my test script on a different machine (Digital Ocean server) and got a similar huge diff. In contrast to Mycelium, I did not use disorderfs, partly because I'm not sure where to add it to the mix. Your build instructions include docker build as a way to get the current revision into the docker container here. (I find it surprising you are adding the folder in the The diff from my server:
and yes, all the diffs are DB related. |
Here is some output from diffoscope:
It looks indeed like some sorting issue. Hope sqldelight fixes this. |
I checked the latest release but it appears there is no according tag "v1.4.2". Also let me know if you manage to reproduce the build using disorderfs the way Mycelium does it and update build instructions accordingly. |
The |
Is Phoenix not working on reproducibility? It's my favorite lightning wallet for beginners but I really care a lot about the funds not being for grab that easily. |
We're migrating Phoenix to a new stack: We'll work on reproducibility on this new stack. |
Looking at code & this thread, 2 reproducibility problems found:
the usage of latest commit for repo https://github.com/ACINQ/Tor_Onion_Proxy_Library instead of specific commit in Dockerfile is not reproducible: Lines 66 to 71 in 67e5a97
also explained in The 3 issue in: #166 |
We've been working on migrating Phoenix to a completely new stack based on Kotlin multi-platform: Any work on deterministic builds will be done over there. |
- add a new `UserDefaults` to store a boolean saying if Tor is enabled - add a screen to toggle this boolean - add an observer to post any changes to the shared module that will be responsible to forward socket connections through Tor's proxy.
Compiled version 1.4.21 using Dockerfile at: #240 (comment)
diff from running apktool
looks like ordering issue in file |
There more diffs in latest version 1.4.22, also tried to use disorderfs to fix ordering issues, with commands: git clone https://github.com/ACINQ/phoenix;
cd phoenix;
git checkout android-legacy-v1.4.22;
sed -i 's/ubuntu:21.10/docker.io\/ubuntu:21.10/g' Dockerfile;
sed -i 's/eclipse-temurin:11.0.14.1_1-jdk-alpine/docker.io\/eclipse-temurin:11.0.14.1_1-jdk-alpine/g' Dockerfile;
podman build --pull --rm -t phoenix_1422_build_apk -f Dockerfile;
podman run --device /dev/fuse --cap-add SYS_ADMIN --rm -ti -v $(pwd):/home/ubuntu/phoenix/phoenix-legacy/build/outputs:Z -w /home/ubuntu/phoenix phoenix_1422_build_apk in container run: apt-get update;
apt-get install --yes --no-install-recommends disorderfs;
mkdir /home/ubuntu/phoenixorderfs;
mkdir /home/ubuntu/phoenixrevorderfs;
disorderfs --sort-dirents=yes --reverse-dirents=no /home/ubuntu/phoenix /home/ubuntu/phoenixorderfs;
disorderfs --sort-dirents=no --reverse-dirents=yes /home/ubuntu/phoenix /home/ubuntu/phoenixrevorderfs;
cd /home/ubuntu/phoenixorderfs;
./gradlew :phoenix-legacy:assemble
cd /home/ubuntu/phoenixrevorderfs;
./gradlew :phoenix-legacy:assemble diff results:
also there was network errors regarding gradle-kotlin-dsl-plugins which might be related to issue #258 after multiple retries the command
|
The latest version 1.4.26 is again not reproducible. The diff is probably due to sqldelight and baseline profile:
|
a fix for the sqldelight issue is to either to use upstream newer version 2.x (which is currently in alpha-05) as fix for the rb issue was introduced in release https://github.com/cashapp/sqldelight/releases/tag/2.0.0-alpha01 or by using a fork of older version of sqldelight and apply the patch to it as it isn't backported to stable releases, as done for example in branch: https://github.com/muun/sqldelight/tree/reproducible-builds |
As @emanuelb mentioned in the previous post as well as here (sqldelight/sqldelight#1548 (comment)), Phoenix could upgrade to sqldelight v2 in order to resolve this issue. I discussed this with @t-bast last night, and he seemed to be amenable to this idea. |
Thanks for reporting this @moneyball ! we'll certainly give it a try. |
Version 2.11.0 appears to not be reproducible but maybe I did something wrong? The build instructions link on the main readme is broken and I did some guessing there. Full report briefly on walletscrutiny.
Diffoscope finds mostly ordering issues around SQL statements apart from assets/dexopt/baseline.prof |
We haven't moved to SQLDelight 2 yet, so it's expected that this isn't reproducible since SQLDelight 1.5 isn't reproducible. |
Ok, cool. Keeping an eye on this issue. Any plans to update SQLDelight soon? |
We plan to update SQLDelight in the coming weeks, and if there's no issues with Kotlin Multiplatform we should be good. |
It's 2024 ... still looking at huge diffs for version 2.1.2. Can we help with anything? Testing? Writing PRs? |
Hello team Phoenix! 😃 Danny here from WalletScrutiny I seem to have gotten v2.3.9 to build with the minimum of diffs Now, it's just a matter of duplicating what I just did. Previously, our current script gave:
The persistence of classes5.dex and baseline.prof indicate a significant diff than expected. In reference to this, we dig a little deeper to find out the reasons why. It should be noted that in our issue, there seems to be some resolution which is on another issue entitled, "Fix APK builds to enhance build reproduceability". To quote:
This was last mentioned on April 4, 2024. They have since upgraded to SQLDelight v2.0.1 After the build, we compared the pertinent files:
The minimal diff results at the start of my report, was from a manual build. I am now in the process of duplicating it. If successful, I would then incorporate it in our script to get Phoenix a verdict of reproducible. Update: 2024-09-25 18:38 PHTI was able to replicate the build! The results:
Asciicast |
I tried to reproduce the latest version 1.4.0 of Phoenix and got a significant diff as also documented here.
The text was updated successfully, but these errors were encountered: