Repository navigation
Enforce strict C2SP tlog-proof framing and verbatim checkpoint parsing - #298
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
==========================================
+ Coverage 82.57% 92.50% +9.92%
==========================================
Files 5 10 +5
Lines 241 1107 +866
==========================================
+ Hits 199 1024 +825
- Misses 30 83 +53
+ Partials 12 0 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AlCutter
approved these changes
Nov 17, 2026
Unmarshal previously tokenized the entire proof line-by-line and reassembled the checkpoint afterward, silently appending a missing final newline to the checkpoint and accepting truncated proofs with no checkpoint at all. Marshal also emitted an invalid empty extra line when ExtraData was a non-nil empty slice. - Guard Marshal() with len(p.ExtraData) > 0 so empty non-nil ExtraData omits the extra line per C2SP tlog-proof@v1. - Replace bufio.Scanner in Unmarshal() with bytes.Cut so the raw Checkpoint bytes after the blank separator line are sliced and cloned verbatim without reassembly, while requiring newline-terminated header/hash lines, rejecting empty extra data and missing checkpoints, avoiding receiver mutation on error, and incidentally lifting Scanner's 64 KiB line limit.
mhutchinson
force-pushed
the
proof-framing
branch
from
November 17, 2026 17:20
ec6d95a to
c9c5784
Compare
AlCutter
approved these changes
Nov 17, 2026
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.
Unmarshal previously tokenized the entire proof line-by-line and reassembled the checkpoint afterward, silently appending a missing final newline to the checkpoint and accepting truncated proofs with no checkpoint at all. Marshal also emitted an invalid empty extra line when ExtraData was a non-nil empty slice.