Skip to content

Conversation

nonsense
Copy link
Member

@nonsense nonsense commented Nov 24, 2021

This PR is:

  1. Bumping sector size from 2KiB to 8MiB
  2. Fixing deal state to wait for within itests - PublishedConfirmed - at this stage the deal is successfully transferred to a sector on the miner side.
  3. Updating itest to use a random CARv2 file, instead of CARv1
  4. Setting --tags=debug build flag when running integration tests
  5. Instantiating a sectorblocks.SectorBlocks when creating the storage provider
  6. Commenting out n.scMgr as it is nil and we want to refactor the Adapter in any case, rather than fix it.

TODO:

  • fix boost dummydeal cmdline tool to create a random CARv2 file and transfer it to boost

@nonsense nonsense requested a review from dirkmc November 24, 2021 13:33
@nonsense nonsense force-pushed the nonsense/add-secb branch 2 times, most recently from e5c6a5a to 86e2067 Compare November 25, 2021 14:32
@nonsense nonsense force-pushed the nonsense/add-secb branch 2 times, most recently from 2bd10b4 to 1886e56 Compare November 25, 2021 14:43
@nonsense nonsense marked this pull request as ready for review November 25, 2021 14:49
@@ -17,6 +17,7 @@ const DefaultMaxTraversalLinks = 2 << 29
func CommP(ctx context.Context, bs bstore.Blockstore, root cid.Cid) (cid.Cid, abi.UnpaddedPieceSize, error) {
// do a CARv1 traversal with the DFS selector.
sc := car.NewSelectiveCar(ctx, bs, []car.Dag{{Root: root, Selector: shared.AllSelector()}}, car.MaxTraversalLinks(DefaultMaxTraversalLinks))
//sc := car.NewSelectiveCar(ctx, bs, []car.Dag{{Root: root, Selector: selectorparse.CommonSelector_ExploreAllRecursively}}, car.MaxTraversalLinks(DefaultMaxTraversalLinks))
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if our code is working for CARv1 right now, so leaving this here, until we fix it. Actually util.CommP will probably go away altogether.

Comment on lines +278 to +289
//head, err := n.ChainHead(ctx)
//if err != nil {
//return nil, xerrors.Errorf("WaitForPublishDeals failed to get chain head: %w", err)
//}

res, err := n.scMgr.dealInfo.GetCurrentDealInfo(ctx, head.Key().Bytes(), (*market.DealProposal)(&proposal), publishCid)
if err != nil {
return nil, xerrors.Errorf("WaitForPublishDeals getting deal info errored: %w", err)
}
//res, err := n.scMgr.dealInfo.GetCurrentDealInfo(ctx, head.Key().Bytes(), (*market.DealProposal)(&proposal), publishCid)
//if err != nil {
//return nil, xerrors.Errorf("WaitForPublishDeals getting deal info errored: %w", err)
//}

return &storagemarket.PublishDealsWaitResult{DealID: res.DealID, FinalCid: receipt.Message}, nil
return &storagemarket.PublishDealsWaitResult{DealID: abi.DealID(4), FinalCid: receipt.Message}, nil
//return &storagemarket.PublishDealsWaitResult{DealID: res.DealID, FinalCid: receipt.Message}, nil
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to be monitoring the chain for the proposalCID, and get the dealID, when the deal is published. For now we have this hacked, and this will only work fork the first deal.

@nonsense nonsense merged commit 6c86310 into main Nov 25, 2021
@nonsense nonsense deleted the nonsense/add-secb branch March 22, 2022 16:41
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