Skip to content

fix: enforce FRC-0069 PieceCIDv2 sizing in addPieces - #317

Merged
Kubuxu merged 3 commits into
mainfrom
rvagg/commp
Nov 19, 2026
Merged

Kubuxu merged 3 commits into
mainfrom
rvagg/commp

Conversation

@rvagg

@rvagg rvagg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Reject pieces below height 2 and pieces that aren't in the smallest tree holding their data, so each piece has one valid CID on chain. Limit the padding uvarint to 9 bytes in validateCommPv2. Pieces already added are unaffected.

Closes: #314
Ref: https://github.com/filecoin-project/FIPs#1311

Reject pieces below height 2 and pieces that aren't in the smallest
tree holding their data, so each piece has one valid CID on chain.
Limit the padding uvarint to 9 bytes in validateCommPv2. Pieces
already added are unaffected.

Closes: #314
Ref: https://github.com/filecoin-project/FIPs#1311
@rvagg
rvagg requested a review from ZenGround0 November 19, 2026 06:20
@rvagg

rvagg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@wjmelements for your consideration in here: in CI we were running ./configure and getting the latest foundry, regardless of what a workflow requested installed, so it's jumping straight to v1.9.0 and failing in CI. I've removed that and pinned foundry versions in here but it probably should be consistent with whatever we're doing elsewhere (maybe a follow-up PR though).

@FilOzzy FilOzzy moved this from 📌 Triage to 🔎 Awaiting review in FOC Nov 19, 2026
@Kubuxu

Kubuxu commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

I've done a scan against the mainnet state at epoch 6,530,880. There are no pieces breaking these rules.

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Nov 19, 2026
@Kubuxu
Kubuxu merged commit 0906be8 into main Nov 19, 2026
3 checks passed
@Kubuxu
Kubuxu deleted the rvagg/commp branch November 19, 2026 13:58
@github-project-automation github-project-automation Bot moved this to 🎉 Done in PDP Nov 19, 2026
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done
Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

PieceCIDv2 validation vs FRC-0069: oversized trees, heights 0/1, and the 0-byte vector

2 participants