verifier_tools: Support prefetching and local caching of log entries. - #18
Merged
Merged
Conversation
cmd/verifier/verifier.go: - added `--fetch_entries` flag to pre-fetch and cache entries locally up to the current checkpoint without requiring a payload or running inclusion proofs. - added `--concurrency` flag to configure worker threads for Tessera tiles. - added `--cache_dir` flag to specify a custom root directory for the cache. - updated error handling and `flag.Usage` to improve usability. internal/tiles/reader.go: - added log entry prefetching utilities for both legacy and Tessera logs, supporting bounded concurrency and incremental caching of immutable tiles. - introduced configurable cache directory management with automatic eviction of stale partial tiles. - modernized HTTP transport with connection pooling, timeouts, and context-aware cancellation. internal/tiles/reader_test.go: - added `TestFetchAllLegacyEntries` testing multi-file caching and cache hits. - added `TestFetchAllTesseraEntries` testing concurrent tile downloads, skip logic, and error/cancellation handling. - added `TestSetCacheDir` verifying custom cache directory redirection. - hermetically isolated test caches across platforms ($HOME and $XDG_CACHE_HOME). README.md: - documented Verification Mode and Pre-fetching & Offline Cache Mode. - added flags reference table covering new flags and aliases. Change-Id: I411b1587280aaf0df03915ab946baf7b5076cf4a
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.
cmd/verifier/verifier.go:
--fetch_entriesflag to pre-fetch and cache entries locally up to the current checkpoint without requiring a payload or running inclusion proofs.--concurrencyflag to configure worker threads for Tessera tiles.--cache_dirflag to specify a custom root directory for the cache.flag.Usageto improve usability.internal/tiles/reader.go:
internal/tiles/reader_test.go:
TestFetchAllLegacyEntriestesting multi-file caching and cache hits.TestFetchAllTesseraEntriestesting concurrent tile downloads, skip logic, and error/cancellation handling.TestSetCacheDirverifying custom cache directory redirection.README.md:
Change-Id: I411b1587280aaf0df03915ab946baf7b5076cf4a