-
Notifications
You must be signed in to change notification settings - Fork 74
fix dummydeal to wait for actual deal publish #78
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
Conversation
e5c6a5a
to
86e2067
Compare
2bd10b4
to
1886e56
Compare
1886e56
to
29b6bd8
Compare
@@ -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)) |
There was a problem hiding this comment.
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.
//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 |
There was a problem hiding this comment.
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.
This PR is:
PublishedConfirmed
- at this stage the deal is successfully transferred to a sector on the miner side.--tags=debug
build flag when running integration testssectorblocks.SectorBlocks
when creating the storage providern.scMgr
as it isnil
and we want to refactor theAdapter
in any case, rather than fix it.TODO:
boost dummydeal
cmdline tool to create a random CARv2 file and transfer it toboost