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

feat(miner deals): create subdir to miner repo for staged deals #6853

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

frrist
Copy link
Member

@frrist frrist commented Jul 23, 2021

Closes #5291

@frrist frrist force-pushed the frrist/miner-temp-file-path branch 2 times, most recently from 3014d8a to a229b5e Compare July 24, 2021 00:12
@frrist frrist marked this pull request as ready for review July 24, 2021 00:20
@frrist frrist requested a review from a team as a code owner July 24, 2021 00:20
@@ -607,7 +607,7 @@ func StorageProvider(minerAddress dtypes.MinerAddress,
df dtypes.StorageDealFilter,
) (storagemarket.StorageProvider, error) {
net := smnet.NewFromLibp2pHost(h)
store, err := piecefilestore.NewLocalFileStore(piecefilestore.OsPath(r.Path()))
store, err := piecefilestore.NewLocalFileStore(piecefilestore.OsPath(filepath.Join(r.Path(), "deal-staging")))
Copy link
Member Author

@frrist frrist Jul 24, 2021

Choose a reason for hiding this comment

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

The next steps could be to make this path value configurable via the miner config (I'm sure this would make @travisperson's life a bit easier). If we think it's worth doing I can add it in. Doing this work will also close: #5591

// this is required due to the method makeDealStaging from cmd/lotus-storage-miner/init.go
// deal-staging is the directory deal files are staged in before being sealed into sectors
// for offline deal flow.
if err := os.MkdirAll(filepath.Join(t, "deal-staging"), 0755); err != 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.

This is kinda ugly, but I didn't want to make the Repo responsible for creating this directory since it is used by things other than the miner.

@jennijuju jennijuju added the P2 P2: Should be resolved label Jul 27, 2021
@jennijuju jennijuju requested a review from arajasek July 27, 2021 03:33
@Stebalien Stebalien force-pushed the frrist/miner-temp-file-path branch from a229b5e to ca697c9 Compare July 30, 2021 04:08
@ZenGround0 ZenGround0 self-assigned this Aug 13, 2021
@ZenGround0 ZenGround0 merged commit 10615b5 into master Aug 16, 2021
@ZenGround0 ZenGround0 deleted the frrist/miner-temp-file-path branch August 16, 2021 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide storage miner with configurable path for offline deal data when staging for sealing.
4 participants