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

Add Filecoin custom multihashes? #129

Closed
jimpick opened this issue Jun 30, 2020 · 8 comments
Closed

Add Filecoin custom multihashes? #129

jimpick opened this issue Jun 30, 2020 · 8 comments

Comments

@jimpick
Copy link
Contributor

jimpick commented Jun 30, 2020

Filecoin defines some new multihash codes here:

https://github.com/filecoin-project/go-fil-commcid/blob/05624bdb669c908632a93b826c25e9b579237d65/commcid.go#L20

Should the master list of multihash codes include there?

I tried plugging a PieceCID bafk4chzaammouedlmmvekovrg4ema7lvuj5fzfqdrcycg5vfnrioxxjmo4ta into https://cid.ipfs.io/ and it complained "multihash unknown function code: 0xfc1".

https://cid.ipfs.io/#bafk4chzaammouedlmmvekovrg4ema7lvuj5fzfqdrcycg5vfnrioxxjmo4ta

Also, the ipfs cid tool can't identify the CIDs:

$ ipfs cid format bafk4chzaammouedlmmvekovrg4ema7lvuj5fzfqdrcycg5vfnrioxxjmo4ta -f "%b CIDv%V %h"
base32 CIDv1 hash?4033
@ribasushi
Copy link

@jimpick thank you for surfacing this, it actually got lost in my set of notes 🙀 after @rvagg alerted me to it last week
TLDR is this:

sha2-256-trunc254-padded: 0x1012
poseidon-bls12_381-a2-fc1: 0xb401
poseidon-bls12_381-a2-fc1-sc: 0xb402
fil-commitment-unsealed: 0xf101
fil-commitment-sealed: 0xf102

My understanding is that the plan was to smply fix https://github.com/filecoin-project/go-fil-commcid/blob/master/commcid.go#L18-L24 since these bytes are not anywhere on-chain.

Can you confirm?

@jimpick
Copy link
Contributor Author

jimpick commented Jul 1, 2020

I believe the PieceCIDs are on chain as they are part of the deal proposal.

@ribasushi
Copy link

@jimpick I gathered more feedback/history on this, and apparantley the plan was to change the IDs on-chain before mainnet. I opened a PR to start things moving in this direction: filecoin-project/go-fil-commcid#2 (comment)

We will close this ( #129 ) issue once the other PR takes off.

@ribasushi
Copy link

@jimpick the new CIDs are now included in https://github.com/filecoin-project/lotus/tree/next
The cid explorer should display the new commX cids correctly on next chain reset

/cc @mikeal @rvagg

@lidel
Copy link
Member

lidel commented Jul 20, 2020

Hey folks, where can I find sample CIDs produced by Filecoin?
Want to make sure our GUIs work fine when someone pastes them.
(ok to just paste a sample here in comment)

@ribasushi
Copy link

@vmx
Copy link
Member

vmx commented Jul 20, 2020

@lidel
Copy link
Member

lidel commented Jul 21, 2020

Done:

updated TXT _dnslink.cid.ipfs.io to dnslink=/ipfs/bafybeifuvxkoxxjrjv47qvog26a4iwglmeq4fnnmqxrikc4g4u2ob7jzre

When DNSLink update is applied,

should work the same as

For IPLD Explorer support see ipld/explore.ipld.io#64

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

No branches or pull requests

4 participants