filecoin-project/cpp-filecoin

Snapdeals

Alexey-N-Chernyshov opened this issue · 7 comments

Find information, decompose, create tasks.
Links:

FIP-0019

Glossary:

Tests and definition of done:

  • Happy path -- successful snap deals update for a variety of different configurations
  • Handling of errors from chain, market, sector-storage interactions to the extent these are possible to induce
  • Graceful handling of operator error: for example test that marking a deal-laden sectors as snap deals fails early, test what insufficient funds cases look like, exercise deals that live longer than remaining sector lifetime
  • Marking for snap deals while sealing deals into another sector has the intended effects, i.e. snap deals prioritized

Filecoin FFI snapdeal proofs introduces an endpoint to proofs that does the snap deals replica update and returns a proof that it was done correctly

Change miner FSM

  1. marked for snap deals
  2. data added
  3. sector-storage system performs update, proof and returns proof data
  4. communication with the chain
  5. cleanup of old sector data

Merged in lotus #7810

Sector-storage support
It requires integrating the FFI, adding filetypes, storage manager, scheduler and worker support for doing these ffi operations and storing relevant files and presenting an interface for the FSM.
See lotus changes.

Actors V7 states and migration.
Changes in miner actor state:

TODO:

  • actors v7 states
  • node api - ExtendedSectorInfo
  • miner api - new methods
  • miner fsm - new states and transitions
  • miner manager - add schedule task type UpdateReplica, more tasks?
  • worker - new type UpdateReplica task, more tasks?
  • verify - pieceIO, ??? - snap deal verify

FFI (done) <- Worker (UpdateReplica), Verify pieceIO <- Miner Manager (UpdateReplica) <- Miner FSM
VM update (done) <- Miner FSM
Miner API <- CLI, remote workers (?)