Add STH caching with configurable timeouts and intelligent retry#2583
Open
bobcallaway wants to merge 8 commits intosigstore:mainfrom
Open
Add STH caching with configurable timeouts and intelligent retry#2583bobcallaway wants to merge 8 commits intosigstore:mainfrom
bobcallaway wants to merge 8 commits intosigstore:mainfrom
Conversation
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2583 +/- ##
===========================================
- Coverage 66.46% 26.93% -39.53%
===========================================
Files 92 193 +101
Lines 9258 20583 +11325
===========================================
- Hits 6153 5544 -609
- Misses 2359 14179 +11820
- Partials 746 860 +114
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hayden-IO
reviewed
Aug 22, 2025
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
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.
This PR adds an optional cached Signed Tree Head (STH) path to the Trillian client to reduce repeated root-fetch overhead on hot paths while preserving correctness guarantees.
When
--trillian_log_server.cache_sth=True, the client maintains a background root updater, stores the latest verified root for fast concurrent reads, and wakes waiting callers when the tree advances. The non-cached behavior remains available as the default path.What changed
Why
The previous flow repeatedly fetched/validated roots during high concurrency, creating avoidable latency and contention. Caching the latest verified root allows callers to read quickly while still reacting to tree advancement.
Impact
Safety / rollout
trillian_log_server.cache_sth(experimental) command line argument.