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

update to filecoin-ffi with shared types #127

Merged
merged 2 commits into from
Feb 27, 2020
Merged

Conversation

whyrusleeping
Copy link
Member

No description provided.

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.

LGTM

I do have a non-blocking question: I see we now take a proof type that is hard coded on the client side but configurable no the provider side. What happens if these diverge?

I was also under the impression that part of the goal in having actual CIDs for PieceCIDs was to be able to communicate proof types in the CID itself -- with the hope that we could support additional constructions in the future. However, I dug into the FFI code and it definitely doesn't seem to be doing that. There is a configurable call in go-fil-commcid with a specific hash code that was intended to support multiple proofs. (https://github.com/filecoin-project/go-fil-commcid/blob/master/commcid.go#L95) but that's not being used. Anyway this has very little to do with this PR and is probably a @laser question more than anything.

@hannahhoward
Copy link
Collaborator

oh probably run mod tidy as well.

ssb := builder.NewSelectorSpecBuilder(ipldfree.NodeBuilder())

// entire DAG selector
allSelector := ssb.ExploreRecursive(selector.RecursionLimitNone(),
ssb.ExploreAll(ssb.ExploreRecursiveEdge())).Node()

commp, paddedSize, err := c.pio.GeneratePieceCommitment(root, allSelector)
commp, paddedSize, err := c.pio.GeneratePieceCommitment(abi.RegisteredProof_StackedDRG2KiBPoSt, root, allSelector)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@why this is where I see the hard coding in the storage client

@whyrusleeping whyrusleeping merged commit 8ef88c7 into master Feb 27, 2020
@whyrusleeping whyrusleeping deleted the feat/update-ffi branch February 27, 2020 19:54
@dirkmc dirkmc mentioned this pull request Dec 16, 2020
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.

None yet

2 participants