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

Piece IO #2

Merged
merged 5 commits into from
Dec 11, 2019
Merged

Piece IO #2

merged 5 commits into from
Dec 11, 2019

Conversation

ergastic
Copy link
Contributor

@ergastic ergastic commented Dec 10, 2019

What

  • Implementation of PieceIO and adjacent/dependent interfaces.
  • Dependency on filecoin-ffi
  • Makefile

Pending

  • Better unit test coverage

@ergastic ergastic marked this pull request as ready for review December 11, 2019 18:38
Copy link
Collaborator

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

@ergastic this looks good generally. I think we should remove the WritePayload function from the Interface & implementation cause it doesn't appear to do anything GeneratePieceCommitment doesn't, and the current implementation doesn't do that.

Keep working on this if you want till you go on storage miner and then we'll just pick it up.

pieceio/pieceio.go Outdated Show resolved Hide resolved
tempDir filestore.Path
}

func NewPieceIO(padReader PadReader, carIO CarIO, sectorCalculator SectorCalculator, tempDir filestore.Path) PieceIO {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder -- should PieceIO just have access to a Filestore directly and be called a PieceStore? And then we don't have to worry about getting things in and out of the filestore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case I'd like add a function to create a temporary file through the filestore.

@ergastic ergastic merged commit 02533f3 into master Dec 11, 2019
laser added a commit that referenced this pull request Dec 18, 2019
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