-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
bugSomething isn't workingSomething isn't workingteam/fs-wgItems being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10Items being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10
Description
Description
When uploading the same file multiple times to SP (calibration network), the system generates incorrect PieceCIDs for subsequent uploads. The issue appears to incorrectly calculate file sizes based on the upload count.
Steps to Reproduce
- Upload a file (183.54 MB) to SP - generates correct PieceCID
- Upload the same file again - generates wrong PieceCID with doubled size (367.09 MB)
- Upload the same file a third time - generates wrong PieceCID with tripled size (550.64 MB)
Expected Behavior
Uploading the same file multiple times should consistently generate the same PieceCID.
Actual Behavior
Each duplicate upload produces a different PieceCID with the file size apparently multiplied by the upload count (size × number of uploads).
Example Data
First upload (correct):
- Piece 4
- CID:
bafkzcibfrhupqiyxoqhzdc3nh3qcyc3srqbbr4osamnmydobnyz5eajw4aoviqc6kmfq
- File size: 183.54 MB
Second upload (incorrect):
- Piece 5
- CID:
bafkzcibfslipcryyoqhzdc3nh3qcyc3srqbbr4osamnmydobnyz5eajw4aoviqc6kmfq
- File size: 367.0925 MB
Third upload (incorrect):
- Piece 7
- CID:
bafkzcibgto4ov2qbdf2a7emlnu7oalalokgaeghr2ibrvtanyfxdhuqbg3qb2vcalzjqw
- File size: 550.6388 MB
Additional Information
- Environment: Calibration network (https://calib.ezpdpz.net)
- The SDK validates the first CID correctly but reports mismatch errors on subsequent uploads
- Issue is reproducible
- Test file available at: https://0x9c5e3cac8166ed93f76bc0469b8bf3ca715ba6b7.calibration.filcdn.io/bafkzcibfrhupqiyxoqhzdc3nh3qcyc3srqbbr4osamnmydobnyz5eajw4aoviqc6kmfq
Dataset Response Example
The PDP server returns piece data showing the incorrect pieceCid values while maintaining correct subPieceCid values for pieces 4, 5, and 7.
Potential Areas to Investigate
- PieceCIDv2 calculation logic in the SP
- SDK and SP agreement on PieceCID generation
- Size calculation during duplicate uploads
- Multihash vs full CID validation
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingteam/fs-wgItems being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10Items being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10