FIP-0016: Pack arbitrary data in CC sectors Source

Authordonghengzhao
Discussions-Tohttps://github.com/filecoin-project/FIPs/issues/57
StatusDraft
TypeTechnical
CategoryCore
Created2021-30-03

Spec Sections

Simple Summary

For CC sectors, allow miners to choose if they want to seal empty data or pack data pieces which could be real for CC sector, and it can be verified accordingly.

Abstract

Currently in seal process, CC sectors are kind of wasteful in terms of storage. In the CC scenario, miners pack one big piece (all zeros) that the size of entire sector, after porep finished, create precommit messages with empty dealID information. In verification of commit messages, verifier will get the DealID from corresponding precommit info, and if DealID is empty, verifier recover the unsealed id by all zeros locally, which limit the CC sector to seal only zeroed data. This proposal is aiming for raising this constrain, by changing the verification against arbitrary data miners choose to seal in the sectors, and keep the piece ID(s) in it for furhter use cases.

Change Motivation

We propose design to allow miners to pack real data for CC sectors, add piece CID(s) in precommit message and keep it on chain. It introduce the possibility for CC upgrade without re-seal, and turn the piece into verified data afterwards ( Separated FIPs).

Specification

  1. Add data field “piece CIDs” in precommit.info and populate value in it in if it’s a CC sector with non zero peice data.
  2. Add Optional data field “piece CIDs” in SectorOnChainInfo (for further CC upgrade verification between unsealed id and piece CID)/SealVerifyStuff struct,
  3. In getVerifyInfo, if “piece CIDs” of SealVerifyStuff is not empty and dealIDs is empty, than use it for commD computation, otherwise keep the logic as is.
  4. In ConfirmSectorProofsValid, populate “piece CIDs” in the additional field of SectorOnChainInfo, this is for future verification

Design Rationale

Extra onchain storage for “unsealed ID” in SectorOnChainInfo will be required. As this field provides the possibility for post-verification between data pieces and unsealed ID.

Backwards Compatibility

Fully backwards compatibility is expected

Security Considerations

There will be no difference between “all zero piece data” or “pieces with meaningfull data” in terms of seal process. i.e. AddPiece, PreCommit1/PreCommit2, Commit1/Commit2 will keep as is. If we look it from seal/post perspective, The CC sectors with meaningful piece data will be exactly same with sectors with deal. There will be no advantage for miners possess this type of sectors. Therefore there is no extra security risk will be introduced by this FIP.

Future Improvements

This proposal introduces the possibilities for further improvement (which could be in other FIPs) as 1, Integrate with Filecoin Plus program to complement deal and upgrade the CC sectors to be “verified” without reseal 2, Offchain deal system for save the block capacity 3, Miner commitment of multiple backups for one deal 4, Support retrieve pieces in CC in retrieval market

Incentive Considerations

1, Miners have the option to leverage the committed capacity to store meaningful data, i.e, miners business data, chain store data, or offline shipped client data, instead of just plain “all zero” data. Therefore miners business model could be expanded and their hardware investment will be utilized in a more efficient manner 2, Filecoin network stored piece CIDs amount expected to be boomed. The value of whole network will be uplifted, and retrieval market could be more prosperous as the “Commodities” will be increased in it

Implementation

WIP

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

donghengzhao, "FIP-0016: Pack arbitrary data in CC sectors [DRAFT]," Filecoin Improvement Proposals, no. 0016, 2021-30-03. [Online serial]. Available: https://fips.fission.app/fips/fip-0016.