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(multicodecs): add filecoin multicodecs #161

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,8 @@ holochain-key-v0, holochain, 0x947124, Holochain v0 pub
holochain-key-v1, holochain, 0x957124, Holochain v1 public key + 8 R-S (63 x Base-32)
holochain-sig-v0, holochain, 0xa27124, Holochain v0 signature + 8 R-S (63 x Base-32)
holochain-sig-v1, holochain, 0xa37124, Holochain v1 signature + 8 R-S (63 x Base-32)
fil-piece-unsealed, serialization, 0xfi01, Filecoin piece, raw data (CID = Piece Commitment)
Copy link
Member

Choose a reason for hiding this comment

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

What's the format of this data? CAR?

Copy link
Member

Choose a reason for hiding this comment

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

Should this be IPLD?

Copy link
Author

Choose a reason for hiding this comment

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

It's neither. The CID here is the root of the merkletree constructed from the bytes that make up the CAR.

fil-sector-unsealed, serialization, 0xfi02, Filecoin sector, raw data (CID = Data commitment)
fil-sector-sealed, serialization, 0xfi03, Filecoin sector, sealed and replicated (CID = Replication Commitment)
fil-hash-unsealed, multihash, 0xfi04, Filecoin unsealed commitment hash (custom hashing alg)
fil-hash-sealed, multihash, 0xfi05, Filecoin sealed commitment hash (custom hashing alg)
Copy link
Member

Choose a reason for hiding this comment

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

What's the actual hashing algorithm? Or is this some kind of special merkle-tree based hash?

Copy link
Author

Choose a reason for hiding this comment

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

according to @porcuquine, it is indeed custom. @porcuquine describes it as "SHA256 with a twist" -- different enough that he says it shouldn't just be SHA-256