Weird prefix of DAG link name

As described in IPFS white papaer, all the data in IPFS is organized in a DAG where each object can be associated with links and links can have names. But I found something weird when I run following commands to explore some DAG objects.

ipfs object get QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco

It is basically fetching the root object of wikipedia snapshot. Here is the result:


What’s weird is that the names are prefixed with some numbers, eg. “58wiki”
I know there is a directory called “wiki” under this hash but what is that prefix “58” ?

If I run:

ipfs ls QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco 

then I get:

QmPQVLHXAcDLvdf6ni24YWgGwitVTwtpiFaKkMfzZKquUB 237360       -
QmNYBYYjwtCYXdA2KC68rX8RqXBu9ajBM6Gi8CBrXjvk1j 44323016540  I
QmehSxmTPRCr85Xjgzjut6uWQihoTfqg9VVihJ892bmZCp 613715579624 wiki
QmaeP3RagknCH4gozhE6VfCzTZRU7U2tgEEfs8QMoexEeG 826          M
QmdgiZFqdzUGa7vAFycnA5Xv2mbcdHSsPQHsMyhpuzm9xb 165          index.html

As you can see, the names are not prefixed by numbers.

Furthermore, if I run:

ipfs resolve QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki

It cannot resolve the path because it cannot find a link named “wiki”:

Error: no link named "wiki" under QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco

But if I change “wiki” to “58wiki”, it works.

So the prefix seems really matters, but my question is that what does the prefix mean? and how it is calculated.

This bothers me because I can get the content directly by “ipfs cat QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/index.html”,
but I can’t resolve the path by “ipfs resolve QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/index.html”

This looks like a bug that should be submitted as an issue:

I’m pretty sure this is because of sharding but @stebalien or @Kubuxu would know for sure.

It is because of sharding.
I think that issue about sharding not working with ipfs resolve is open.

1 Like

In case anyone else is interested, this appears to be the issue that’s already open for this.

Thank you. Hope it can be solved soon