Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry deals with start epoch in the future, if the sectors they've been added to initially fail to seal #1345

Open
6 of 15 tasks
nonsense opened this issue Sep 30, 2021 · 3 comments
Assignees
Labels
area/markets kind/enhancement Kind: Enhancement need/team-input P2 P2: Should be resolved

Comments

@nonsense
Copy link
Member

Checklist

  • This is not a new feature or an enhancement to the Filecoin protocol. If it is, please open an FIP issue.
  • This is not a new feature request. If it is, please file a feature request instead.
  • 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.
  • I have a specific, actionable, and well motivated improvement to propose.

Lotus component

  • lotus daemon - chain sync
  • lotus miner - mining and block production
  • 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

Currently in Lotus, after we add a deal to a sector, we remove it from the markets staging area, and pass it to the sealing subsystem which adds a piece to a sector, and then attempts to seal a sector.

However if a sector fails to seal for some reason, even if some deals are still good in it, there is currently no retry mechanism to try to add them to another sector and seal a new sector with the good deals.

We should figure out how to improve this, some ideas:

  • there should be a mechanism for sector FSM to tell the deal FSM that a sector got removed
  • each deal should check itself and if it is still good, it should be added to a new sector
  • we should figure out how to extract a deal from a failed sector, and re-add it to a new sector, given that it is no longer available in the markets staging area.
@jennijuju jennijuju added P1 P1: Must be resolved and removed need/triage labels Oct 1, 2021
@ZenGround0
Copy link
Contributor

This should also be done for snap deals upgrades

@ZenGround0
Copy link
Contributor

While looking into this for snap deals upgrades one particular problem I ran into is that the FSM loses track of which data goes with a deal once that data has been added as a piece into a sector. The cleanest solution is to give control of the deal back to the Deal FSM which can then give control back to the Sealing FSM if checks pass. The minimal thing we need from the Deal FSM is a way to get data from a deal id.

If we can't change the deal FSM like this we can resort to extending some internal sealing FSM interfaces to allow for internal unsealing. This is less general since it won't be able to handle incorrectly sealed sectors for example.

@jennijuju
Copy link
Member

This will be highly desirable for the May Sprint.

@dirkmc dirkmc transferred this issue from filecoin-project/lotus Mar 30, 2023
@jacobheun jacobheun added this to Boost Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/markets kind/enhancement Kind: Enhancement need/team-input P2 P2: Should be resolved
Projects
Status: No status
Status: Need additional analysis
Development

No branches or pull requests

5 participants