ipld / specs

Content-addressed, authenticated, immutable data structures
Other
592 stars 108 forks source link

data-structures: update filecoin's HAMT version #359

Closed mvdan closed 3 years ago

mvdan commented 3 years ago

(see commit message)

mvdan commented 3 years ago

I mentioned this two months ago, and I actually did the patch locally... then forgot to send the PR :see_no_evil:

mvdan commented 3 years ago

Also, the repo has since moved to https://github.com/filecoin-project/go-hamt-ipld, and the old ipfs repo location doesn't have the v3 tag, so I'll fix the link too.

warpfork commented 3 years ago

This seems thoroughly approved -- good to merge?

rvagg commented 3 years ago

Can't be merged as is - the comment about being v3 is wrong, it's v2-compatible. It probably needs a change to have the v3+ version in here which is just a changed from the keyed to a kinded union but it'd be nice to show both. There's more overlap with the spec form now but still minor differences to note.

Either @mvdan or I need to get back to this and spend a tiny bit of time making sure it reflects reality and also documents the historical <=v2 forms as well.

mvdan commented 3 years ago

I've made the PR a draft to be clearer. If it makes maintenance difficult, I don't have a problem with closing it as I can't say I'll finish it this week or next.

rvagg commented 3 years ago

Rebased and added v3 details and some additional clarifications (like the big.Int bitfield). This is ready for review and potentially merging. PTAL @mvdan @warpfork.

rvagg commented 3 years ago

Latest commit unifies the schemas into one, renames the types to be what Filecoin calls them, and tries to explain the differences inline. PTAL @mvdan @warpfork and let me know if you think this is clear enough. Rendered @ https://github.com/ipld/specs/blob/hashmap-filecoin-v3/data-structures/hashmap.md#block-layout

rvagg commented 3 years ago

merged with minor updates in new docs site https://github.com/ipld/ipld/pull/103, will tombstone this doc now