Skip to content

uraniborg: Support local cache pre-fetching during inclusion proof ch… - #21

Merged
billy-lau merged 1 commit into
android:mainfrom
billy-lau:uraniborg/prefetch-cache
Sep 17, 2026
Merged

billy-lau merged 1 commit into
android:mainfrom
billy-lau:uraniborg/prefetch-cache

Conversation

@billy-lau

Copy link
Copy Markdown
Member

…ecks.

Enable pre-fetching and local caching of transparency log entries by default before running package APK split inclusion proof checks. This avoids slow, sequential HTTP tile downloads on cache misses during individual package verifications and allows multiple connected devices to share a single pre-fetched cache.

uraniborg/scripts/python/inclusion_proof_check.py:

  • added prefetch_log_entries to invoke verifier with --fetch_entries, streaming progress directly to terminal with a configurable timeout.
  • enabled pre-fetching by default in perform_inclusion_proof_check (when packages is a non-empty list) and returned boolean check status (main() now exits 1 on failure).
  • added --cache_dir, --cache_prefetch_concurrency (default: 16), --cache_prefetch_timeout (default: 600), and --no_prefetch CLI flags.

uraniborg/scripts/python/automate_observation.py:

  • added --cache_dir, --cache_prefetch_concurrency, --cache_prefetch_timeout, and --no_prefetch CLI flags.
  • pre-fetch log entries once across connected devices when packages.txt exists, retrying automatically on subsequent devices if pre-fetch fails.

uraniborg/scripts/python/tests/:

  • added pytest unit tests in test_inclusion_proof_check.py and test_automate_observation.py covering CLI parsing, pre-fetching, timeout and fail-open fallback, input validation, and multi-device retry/latch.

.gitignore, uraniborg/.gitignore, uraniborg/README.md, & uraniborg/docs/:

  • documented pre-fetching behavior, new CLI flags, fail-open timeout fallback, and venv/pytest setup.
  • added root and uraniborg/ .gitignore rules for Python virtual environments and pytest caches.

Change-Id: I5f7f2f698a113cce1f5f4316865c178a4ba265fb

…ecks.

Enable pre-fetching and local caching of transparency log entries by default
before running package APK split inclusion proof checks. This avoids slow,
sequential HTTP tile downloads on cache misses during individual package
verifications and allows multiple connected devices to share a single
pre-fetched cache.

uraniborg/scripts/python/inclusion_proof_check.py:
- added `prefetch_log_entries` to invoke verifier with `--fetch_entries`,
  streaming progress directly to terminal with a configurable timeout.
- enabled pre-fetching by default in `perform_inclusion_proof_check` (when
  `packages` is a non-empty list) and returned boolean check status (`main()`
  now exits 1 on failure).
- added `--cache_dir`, `--cache_prefetch_concurrency` (default: 16),
  `--cache_prefetch_timeout` (default: 600), and `--no_prefetch` CLI flags.

uraniborg/scripts/python/automate_observation.py:
- added `--cache_dir`, `--cache_prefetch_concurrency`,
  `--cache_prefetch_timeout`, and `--no_prefetch` CLI flags.
- pre-fetch log entries once across connected devices when `packages.txt`
  exists, retrying automatically on subsequent devices if pre-fetch fails.

uraniborg/scripts/python/tests/:
- added pytest unit tests in `test_inclusion_proof_check.py` and
  `test_automate_observation.py` covering CLI parsing, pre-fetching, timeout
  and fail-open fallback, input validation, and multi-device retry/latch.

.gitignore, uraniborg/.gitignore, uraniborg/README.md, & uraniborg/docs/:
- documented pre-fetching behavior, new CLI flags, fail-open timeout fallback,
  and `venv`/`pytest` setup.
- added root and `uraniborg/` `.gitignore` rules for Python virtual
  environments and pytest caches.

Change-Id: I5f7f2f698a113cce1f5f4316865c178a4ba265fb
@billy-lau
billy-lau merged commit aa62998 into android:main Sep 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant