AddLeaf: use cheaper gRPC endpoint since we already have the inclusion proof#2580
Merged
bobcallaway merged 1 commit intosigstore:mainfrom Aug 13, 2025
Merged
Conversation
Signed-off-by: Bob Callaway <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2580 +/- ##
===========================================
- Coverage 66.46% 24.85% -41.61%
===========================================
Files 92 189 +97
Lines 9258 24390 +15132
===========================================
- Hits 6153 6063 -90
- Misses 2359 17561 +15202
- Partials 746 766 +20
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
approved these changes
Aug 13, 2025
Contributor
Hayden-IO
left a comment
There was a problem hiding this comment.
I assume we have sufficient test coverage in the e2e tests?
Member
Author
yup, this would be covered by all of our existing e2e write tests. |
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.
AddLeafqueues the proposed entry for inclusion into the Trillian log, and then polls to see that an inclusion proof exists for that hash. Finally, we need the integration timestamp to pass back along to the client as a timestamp, and the only way to get that value is to fetch the entire entry again. We currently do that by callingGetEntryAndProof, which results in a Trillian having to recompute the inclusion proof (which it's already given us) which is more expensive than just reading the leaf itself usingGetLeavesByRange.This swaps over to the less-complex
GetLeavesByRangefor a lower overhead implementation with equivalent function.