Skip to content

use less expensive gRPC call to implement GetLeafAndProofByHash#2581

Merged
bobcallaway merged 2 commits intosigstore:mainfrom
bobcallaway:GetLeafAndProofByHashOptimization
Aug 14, 2025
Merged

use less expensive gRPC call to implement GetLeafAndProofByHash#2581
bobcallaway merged 2 commits intosigstore:mainfrom
bobcallaway:GetLeafAndProofByHashOptimization

Conversation

@bobcallaway
Copy link
Copy Markdown
Member

Similar to #2580, GetLeafAndProofByHash needs to call two Trillian endpoints:

  • GetInclusionProofByHash to get the index
  • another method to get the leaf content

We were previously calling GetEntryAndProof via GetLeafAndProofByIndex but since we already have the proof from GetInclusionProofByHash, this is a cheaper sequence of calls for Trillian with equivalent functionality.

@bobcallaway bobcallaway requested a review from a team as a code owner August 13, 2025 19:38
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 38.18182% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.98%. Comparing base (488eb97) to head (13b47d2).
⚠️ Report is 490 commits behind head on main.

Files with missing lines Patch % Lines
pkg/trillianclient/trillian_client.go 38.18% 29 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2581       +/-   ##
===========================================
- Coverage   66.46%   24.98%   -41.48%     
===========================================
  Files          92      190       +98     
  Lines        9258    24527    +15269     
===========================================
- Hits         6153     6129       -24     
- Misses       2359    17612    +15253     
- Partials      746      786       +40     
Flag Coverage Δ
e2etests 46.67% <38.18%> (-0.89%) ⬇️
unittests 15.86% <0.00%> (-31.83%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Hayden-IO
Hayden-IO previously approved these changes Aug 13, 2025
Signed-off-by: Bob Callaway <[email protected]>
@bobcallaway bobcallaway merged commit cdd9572 into sigstore:main Aug 14, 2025
16 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.

2 participants