Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform witness signing on checkpoints of the same size #278

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions internal/witness/witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ func (w *Witness) Update(ctx context.Context, logID string, nextRaw []byte, cPro
counterInconsistentCheckpoints.Inc(logID)
return prevRaw, status.Errorf(codes.FailedPrecondition, "checkpoint for same size log with differing hash (got %x, have %x)", next.Hash, prev.Hash)
}
// If it's identical to the previous one do nothing.
counterUpdateSuccess.Inc(logID)
return prevRaw, nil
// This used to short-circuit here to save work.
// However, having the most recently witnessed timestamp available is beneficial to demonstrate freshness.
}
if prev.Size == 0 {
// Checkpoints of size 0 are really placeholders and consistency proofs can't be performed.
Expand Down
Loading