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
StorageDeal: transfer mechanisms and assurances #193
Conversation
@whyrusleeping I've read this now so could discuss in the next few days. |
network-protocols.md
Outdated
Size: size, | ||
Payment: payInfo, | ||
PieceRef: file, | ||
TranslatedRef: commitment, |
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.
TODO: add SerializationMode to this
network-protocols.md
Outdated
``` | ||
|
||
```go | ||
func OnSectorSealed(prop StorageDealProposal) { |
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.
note: called once for each deal in the sector
network-protocols.md
Outdated
} | ||
|
||
// TODO: is TranslatedRef actually needed? How does it tie in? | ||
pieceConfirmation := SectorBuilder.PackData(prop.PieceRef, prop.SerializationMode) |
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.
At this point, the SectorBuilder
will have added a user's piece to a yet-to-be-sealed sector. The miner doesn't have to seal it immediately. Will the miner be able to generate a piece inclusion proof for this piece if the miner hasn't yet started the sealing process?
network-protocols.md
Outdated
miner.Sign(resp) | ||
miner.SetDealState(resp) | ||
} | ||
``` | ||
|
||
Once the deal makes it to this state, the client should be able to query and get the `PieceConfirmation` that they need to verify that the miner is indeed storing their data. |
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'm Lovin' It.
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.
@whyrusleeping Although this should be obvious, I want to make explicit that if we do this in the simplest way, PieceConfirmation
s will take some time to generate because we also have to generate commD
. So the likely flow is:
- sector is completely packed.
commD
andPieceConfirmation
s are generated.OnSectorPacked
is called.- Sealing begins/continues.
We could also incrementally generate commD
as pieces are packed, but that's probably not the effort, at least up-front. Like I said, should be obvious, but there's likely to be a delay between when the sector is completely packed and when OnSectorPacked
can be called. I can't think of a reason why this would matter.
895638d
to
c754bab
Compare
c754bab
to
1f59917
Compare
I'm working on defining exactly how the references in the storage deal proposal translate into data that goes into the sector, and also working through how some of the interactions with PoRep (and payments) need to work.
@porcuquine It would be much appreciated if you could take a look at this, and maybe then we could discuss in a call.