Skip to content

Conversation

@AlCutter
Copy link
Collaborator

This PR makes NewProofBuilder require only a tree size, rather than a full checkpoint.

This is safe as generated proofs must be verified against checkpoint root hashes by the consumer anyway; any inconsistency will be detected at that point, and brings it into line with most other proof building implementations (Trillian, GoSumDB, tlog, etc.)

The change provides a means to construct consistency proofs without having to hold both checkpoints (e.g. if you're trying to convince someone else of consistency between a checkpoint they hold, and a newer checkpoint you hold - this is exactly what happens during the tlog-witness protocol).

@AlCutter AlCutter requested a review from roger2hk April 25, 2025 16:55
@AlCutter AlCutter requested a review from a team as a code owner April 25, 2025 16:55

span.SetAttributes(logSizeKey.Int64(otel.Clamp64(cp.Size)))

func NewProofBuilder(ctx context.Context, treeSize uint64, f TileFetcherFunc) (*ProofBuilder, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to mention "no correctness checking of the root hash for the given tree size is performed." in this function doc comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, it's probably more surprising that a call to this function would go off and start making network requests before calling one of the .*Proof functions below.

@AlCutter AlCutter merged commit 0993bb6 into transparency-dev:main Apr 28, 2025
15 checks passed
@AlCutter AlCutter deleted the naked_proof branch April 28, 2025 16:08
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