Logo

    Protocol Research: Repair/Renew

    Track
    PeSto
    DRI
    Milestone
    FilFil Edition 2.0: Perpetual Filecoin Archive Storage
    Status
    Done
    Target Date
    January 21, 2023
    tl'dr

    New FIP: MarketNotifyDeal called by market actor on proposal clients · Discussion #549 · filecoin-project/FIPs

    You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or window. Reload to refresh your session. Reload to refresh your session.

    github.com

    New FIP: MarketNotifyDeal called by market actor on proposal clients · Discussion #549 · filecoin-project/FIPs

    Assume we have a method to create a storage deal for a CID list

    createDealProposal(cid_list, ...) -> deal_id_list (see Protocol research for a verified data bounty contract )

    The repair(deal_id_list,...) method will:

    • for each deal_id in the list
      • get the deal activation epoch
        • see https://github.com/filecoin-project/builtin-actors/blob/next/actors/market/src/lib.rs#L1162
      • at each epoch, if current epoch > activation epoch:
        • get the deal status
          • if deal status ≠ active, then use `createDealProposal' from bounty contract to create a new deal and replace deal_id in the list
          • (there may be a check here about if enough funds/dacap available to do such operation)
          • terminate the old deal
            • ❓why do we need termination? (irene): I think that a deal in filecoin can be marked as non-active for a period and then show as active again, correct? If this is the case, this method will trigger activation of a new deal and we will end up with two deals (after the first goes back to be active). To avoid this we need to terminate the inactive deal after replacing it.

    The renew(deal_id_list,...) method will:

    • for each deal_id in the list
      • get the deal activation epoch
        • see https://github.com/filecoin-project/builtin-actors/blob/next/actors/market/src/lib.rs#L1162
      • at each epoch, if current_epoch = deal_id_start_epoch + deal_duration : check internal balance, if there is enough tokens then invokes createDealProposal from Bounty contract again.

    CryptoNet is a Protocol Labs initiative.