lotus icon indicating copy to clipboard operation
lotus copied to clipboard

Add flag to SectorAddPieceToAny to indicate whether commp has already been performed

Open dirkmc opened this issue 2 years ago • 0 comments

Checklist

  • [X] This is not a new feature or an enhancement to the Filecoin protocol. If it is, please open an FIP issue.
  • [X] This is not a new feature request. If it is, please file a feature request instead.
  • [X] This is not brainstorming ideas. If you have an idea you'd like to discuss, please open a new discussion on the lotus forum and select the category as Ideas.
  • [X] I have a specific, actionable, and well motivated improvement to propose.

Lotus component

  • [ ] lotus daemon - chain sync
  • [ ] lotus miner - mining and block production
  • [X] lotus miner/worker - sealing
  • [ ] lotus miner - proving(WindowPoSt)
  • [ ] lotus miner/market - storage deal
  • [ ] lotus miner/market - retrieval deal
  • [ ] lotus miner/market - data transfer
  • [ ] lotus client
  • [ ] lotus JSON-RPC API
  • [ ] lotus message management (mpool)
  • [ ] Other

Improvement Suggestion

Boost performs commp before passing the deal data to the sealing subsystem. So there's no need for the sealing subsystem to perform commp a second time.

Proposal

Add a CommpVerified flag to the PieceDealInfo struct that is passed to SectorAddPieceToAny:

  • CommpVerified: true The caller has already performed commp verification on the data.
  • CommpVerified: true The caller has not performed commp verification on the data. Add Piece should perform commp verification.

dirkmc avatar Jun 09 '22 07:06 dirkmc