-
Notifications
You must be signed in to change notification settings - Fork 20
Support for UnixFS Sharding + support balanced & trickle dag #45
Comments
Is there a wip spec? Could you link to it (and/or any other relevant docs)? |
There you go. Gist is that we figured out how to do the Sharding while at NYC, waiting on @jbenet to lay down the spec. |
@whyrusleeping can you share how is the 'file wrapping' happening in go-ipfs currently? If I'm not mistaken, it is something like ' each time we reach 174 links in a file dag node, we wrap it in another dagnode and add the chunks to the new one' |
@whyrusleeping is there a spec in progress for the sharding? plus probably some impl details to make it faster? It would also be good to have the trickle dag documented and something saying when we are moving to it so that we can prepare. |
Does it make sense to do this before IPLD, as far as I understood the spec would change with IPLD? |
The changes to the unixfs protobuf are the most relevant. Beyond that, a few notes:
And after that, it just follows the HAMT algorithms |
must be configurable. @whyrusleeping do you recall where we put the HAMT notes we took on a pad once? it had the construction in IPLD and the mapping form protobuf to IPLD. |
Yes, of course. Take a look at the linked changes to the protobuf As for the pad, i'm not finding it in my chrome history... Do you remember if we used a riseup pad for that? |
Yeah riseup most likely :/
|
@whyrusleeping, @pgte just pinged me about the max number of leaves per node and from the diagram we sketched a couple of weeks ago, the impression I got was that it is 172 data leaves + nLayerRepeat (default 4) + 1 link for the next level, total of 177. However, just to be sure, I tested adding a big file with the TrickleDAG and got 183 Links
Where are the extra 6 coming from? |
the trickledag doesnt have a max width, but you can compute the expected width of a tree of a given depth by taking Not having a max width is fine because by the time we get to max blocksize, we end up having a file with more bits than there are atoms in the planet, or something |
@diasdavid The key here is that everything about the trickledag is recursive. |
Got it now :) It keeps repeating itself as it goes, increasing the level of depth each time. @pgte does the graph above help to clarify this last detail? |
Yes, thank you @whyrusleeping! Thanks @daviddias for the diagram, I think this one illustrates this well! 👍 |
Specially the reduction being asynchronous has made this quite interesting to solve.. :) |
@pgte has shipped all of this!! !:D check it out on the last release of js-ipfs :) |
When spec is ready
The text was updated successfully, but these errors were encountered: