filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.85k stars 1.27k forks source link

New method to access ProviderSectors HAMT from market actor #11997

Open LexLuthr opened 5 months ago

LexLuthr commented 5 months ago

We need a way to access information in https://github.com/filecoin-project/go-state-types/blob/ad909a3d6ebef5ebc5688b4310e954e27da2203b/builtin/v13/market/market_state.go#L66. This can be very useful to verify F05 deals post NV23 if sealer is using ProveCommitSector3 method to commit all sectors.

LexLuthr commented 5 months ago

We should have 2 methods:

  1. a list of all sectors[deals] per provider/miner
  2. querying specific deal in a specific sector of a miner.
rvagg commented 5 months ago

@LexLuthr I've moved this to the lotus repo as the API is going to have to be here rather than in go-state-types.

LexLuthr commented 5 months ago

@LexLuthr I've moved this to the lotus repo as the API is going to have to be here rather than in go-state-types.

Thank you. Look forward to have this soon. Along with https://github.com/filecoin-project/lotus/pull/11936, we will have all we need to track market deal reliably.

beck-8 commented 4 months ago

Will there be any progress here soon?

rvagg commented 4 months ago

No, sorry, but it shouldn't be too hard to do. Would someone like to start off by proposing the method signatures and documentation that would slot into api/api_full.go? I can probably tackle it once we have agreement from you (as users) on what we're actually implementing.

LexLuthr commented 4 months ago

StateMarketSectorList(ctx, minerAddress) (map[sector number][]abi.DealID, err) StateMarketSector(ctx, minerAddress, sectorNumber) ([]abi.DealID, err)

I do a confusion here though. If a sector only contains f05 deals, should I assume that []abi.DealID would be in same order as present in physical sector or do we lose the order? What happens when DDO is in the mix for the above question?