Skip to content

Conversation

@siddharthbaleja7
Copy link

Description

This PR implements service-level validation for the extraData payload size in PDP (Proof of Data Possession) requests. Following the removal of the hard limit in the PDPVerifier contract (FilOzone/pdp#224), this logic is now enforced within Curio to prevent excessively large metadata payloads from being processed. I have verified these changes locally to ensure that the limits are enforced correctly and oversized payloads are rejected.

Fixes #713

Changes Proposed

1. Defined Size Limits

  • MaxCreateDataSetExtraDataSize: Set to 4KB (4096 bytes) for createDataSet.
  • MaxAddPiecesExtraDataSize: Set to 8KB (8192 bytes) for addPieces and createDataSetAndAddPieces.

2. Validation Logic (Fail Fast)

Implemented size checks in the following handlers:

  • handleCreateDataSet
  • handleCreateDataSetAndAddPieces
  • handleAddPieceToDataSet

Checklist

@siddharthbaleja7 siddharthbaleja7 requested a review from a team as a code owner November 18, 2025 13:13
@siddharthbaleja7
Copy link
Author

@rjan90 can you please review this PR?

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.

1 participant