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

add SealProof in SectorBuilder #6815

Merged
merged 2 commits into from
Jul 22, 2021

Conversation

nonsense
Copy link
Member

This PR is fixing a bug introduced in #6356


As part of MRA, we modified UnsealSector to use SectorBuilder.SectorsStatus API (RPC from markets node to sealing/proving node), instead of a local call rpn.miner.GetSectorInfo(sectorID)

Given that we always call sectorsStatus with onChainInfo == true, we currently get an error for all sectors that are not yet on-chain (i.e. currently in PreCommit1 phase for example).

This results in a regression - a failure of all retrievals for deals on sectors that are not yet on chain.


With this PR, I am modifying the call to sectorsStatus to not use on-chain data, but also making sure that SealProof is initialised correctly based on data from the local store, and not just to 0.

@nonsense nonsense requested a review from magik6k July 21, 2021 14:51
@nonsense nonsense requested a review from a team as a code owner July 21, 2021 14:51
@@ -134,7 +134,7 @@ func (m *Miner) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnC
LastErr: info.LastErr,
Log: log,
// on chain info
SealProof: 0,
Copy link
Member Author

@nonsense nonsense Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need SealProof to be set based on the proof type of the sector from the local store, for when we need information on a sector that is not yet on chain. (i.e. lotus-miner is doing a PreCommit1 on a sector, and markets receives a retrieval request for a deal in that sector -- the SealProof is stored in the local store, and we need it to know the expected size of the sector).

@magik6k magik6k merged commit a3687a6 into master Jul 22, 2021
@magik6k magik6k deleted the nonsense/add-sealproof-in-sectorbuilder-master branch July 22, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants