uraniborg: Support local cache pre-fetching during inclusion proof ch… - #21
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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:
prefetch_log_entriesto invoke verifier with--fetch_entries, streaming progress directly to terminal with a configurable timeout.perform_inclusion_proof_check(whenpackagesis a non-empty list) and returned boolean check status (main()now exits 1 on failure).--cache_dir,--cache_prefetch_concurrency(default: 16),--cache_prefetch_timeout(default: 600), and--no_prefetchCLI flags.uraniborg/scripts/python/automate_observation.py:
--cache_dir,--cache_prefetch_concurrency,--cache_prefetch_timeout, and--no_prefetchCLI flags.packages.txtexists, retrying automatically on subsequent devices if pre-fetch fails.uraniborg/scripts/python/tests/:
test_inclusion_proof_check.pyandtest_automate_observation.pycovering CLI parsing, pre-fetching, timeout and fail-open fallback, input validation, and multi-device retry/latch..gitignore, uraniborg/.gitignore, uraniborg/README.md, & uraniborg/docs/:
venv/pytestsetup.uraniborg/.gitignorerules for Python virtual environments and pytest caches.Change-Id: I5f7f2f698a113cce1f5f4316865c178a4ba265fb