Skip to content

Commit 69a516c

Browse files
chore: add reproducible build verification script
1 parent 6e20f4c commit 69a516c

2 files changed

Lines changed: 1378 additions & 0 deletions

File tree

reproducibility/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Reproducible Build Verification for Bull Bitcoin Mobile
2+
3+
This directory contains tools and documentation for verifying that Bull Bitcoin Mobile builds are reproducible - meaning anyone can independently build the app from source code and verify they get the exact same binary.
4+
5+
### Prerequisites
6+
7+
- **Docker or Podman**
8+
- **Recommended 8GB RAM**
9+
- **~50GB free disk space**
10+
11+
### Usage
12+
13+
```bash
14+
# Verify from GitHub release (universal APK)
15+
./verify_build --version <version>
16+
17+
# Verify from device (split APKs)
18+
./verify_build --version <version> --apk /path/to/apk/directory/
19+
20+
# Clean up workspace after verification
21+
./verify_build --version <version> --cleanup
22+
23+
# Preserve built APKs for analysis
24+
./verify_build --version <version> --preserve
25+
```
26+
27+
### What the Script Does
28+
29+
1. Sets up build environment: Creates a containerized Ubuntu environment with Flutter, Android SDK, and Rust
30+
2. Clones source code: Checks out the exact release tag from GitHub
31+
3. Builds from source: Compiles the app using the same process as the official release
32+
4. Extracts APKs: Uses bundletool to extract APKs from the built AAB
33+
5. Compares binaries: Decodes and compares the built APK against the official release
34+
6. Reports results: Shows whether the build is reproducible or not
35+
36+
### Understanding Results
37+
38+
- **Reproducible**: Built APK matches official release exactly (excluding signatures)
39+
- **Differences found**: Built APK differs from official release - investigate diff files in workspace
40+
41+
Diff files are saved in `bullbitcoin_<version>_verification/results/` for detailed analysis.
42+
43+
## Notes
44+
45+
- This script losely follows [WalletScrutiny's Script Standards](https://gitlab.com/walletScrutiny/walletScrutinyCom/-/blob/master/docs/script_verifications.md) for reproducible verification scripts.
46+
- The binary verification system using nostr built by WalletScrutiny produces `kind: 30301` verification events. [This verification event](https://nostr.at/nevent1qqsvkpulglcjqrka866rtnw7ehgh9c778dzlserwul20pgwsrt34aegzyq0eu4ru9ucegf3rhzk36pm3x2pwseq0mr85wn5l08cc4n527gtw6z9rvwa) was a result of running [this script](https://nostr.at/nevent1qqszpl97xn5udw8vmxc8wdh2673lu53dmeyw90fnegfqn9f44g5l04qzyq0eu4ru9ucegf3rhzk36pm3x2pwseq0mr85wn5l08cc4n527gtw65sudg7). Our script is an iteration of that, with some fixes.
47+
48+
49+
## References
50+
51+
- WalletScrutiny Verification NIP: [verifications.md](https://gitlab.com/walletScrutiny/walletScrutinyCom/-/blob/master/docs/verifications.md)
52+
- WalletScrutiny Script Standards: [script_verifications.md](https://gitlab.com/walletScrutiny/walletScrutinyCom/-/blob/master/docs/script_verifications.md)

0 commit comments

Comments
 (0)