Skip to content

Align subtrees with updated specs - #252

Closed
phbnf wants to merge 1 commit into
transparency-dev:mainfrom
phbnf:newspecs
Closed

Align subtrees with updated specs#252
phbnf wants to merge 1 commit into
transparency-dev:mainfrom
phbnf:newspecs

Conversation

@phbnf

@phbnf phbnf commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Updates subtree consistency proof generation, verification, and test vectors to align with recent changes in ietf-plants-wg/merkle-tree-certs:

Specifically:

  • Empty subtrees: start == end is now treated as a valid 0-length subtree. Subtree consistency proofs for empty subtrees return an empty array and verify that the subtree root equals the empty tree hash (HASH()), without depending on the parent tree's root.
  • FindSubtrees edge case: Intervals of size <= 1 now return two subtrees ([start, end) and [end, end)) instead of one.
  • Tests & Probes: Updated test loops to include empty subtrees (start == end), updated reference vectors to match the new rolling SHA-256 digests, and added empty subtree test cases to proofgen.

@phbnf
phbnf requested a review from a team as a code owner July 22, 2026 17:06
@phbnf
phbnf requested review from mhutchinson and removed request for a team July 22, 2026 17:06
@phbnf phbnf closed this Jul 22, 2026
@phbnf
phbnf removed the request for review from mhutchinson July 22, 2026 17:40
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.57895% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.16%. Comparing base (98f61d9) to head (accbc13).

Files with missing lines Patch % Lines
cmd/proofgen/main.go 0.00% 29 Missing ⚠️
proof/verify.go 42.85% 7 Missing and 1 partial ⚠️
testonly/tree.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
- Coverage   48.01%   47.16%   -0.85%     
==========================================
  Files           8        8              
  Lines         933      971      +38     
==========================================
+ Hits          448      458      +10     
- Misses        476      502      +26     
- Partials        9       11       +2     

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant