Skip to content

checkpoint ProofOfSpace patch - #1476

Merged
arvidn merged 1 commit into
mainfrom
checkpoint-proof-of-space
Jun 30, 2026
Merged

checkpoint ProofOfSpace patch#1476
arvidn merged 1 commit into
mainfrom
checkpoint-proof-of-space

Conversation

@arvidn

@arvidn arvidn commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

make parsing of ProofOfSpace more strict and less maleable, like the original Option<> parsing

Original PR against release/0.45.1: #1474


Note

Medium Risk
Changes consensus-relevant proof serialization parsing; behavior shifts for malformed prefix bytes while intended valid encodings should stay compatible.

Overview
Tightens ProofOfSpace wire parsing by deriving version from the packed optional prefix as prefix >> 1 instead of treating only bit 1 as a boolean, so encodings with garbage high bits map to invalid versions and fail like stricter Option<>-style prefixes.

Expands unit coverage with helpers for building proofs and locating the prefix byte, plus roundtrip, parse_rejects, and high_prefix_bits_rejected cases for legacy v0 lenient pool/contract combinations, v1 XOR pool-vs-contract rules, unknown versions, and stable re-serialization.

Reviewed by Cursor Bugbot for commit 2d6741c. Bugbot is set up for automated code reviews on this repo. Configure here.

@arvidn
arvidn requested a review from AmineKhaldi June 30, 2026 14:56
@coveralls-official

Copy link
Copy Markdown

Coverage Report for CI Build 28453872876

Coverage increased (+0.02%) to 81.527%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: 20 of 20 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 18914
Covered Lines: 15420
Line Coverage: 81.53%
Coverage Strength: 11936490.6 hits per line

💛 - Coveralls

@arvidn
arvidn merged commit b322969 into main Jun 30, 2026
84 checks passed
@arvidn
arvidn deleted the checkpoint-proof-of-space branch June 30, 2026 17:50
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