ipld / specs

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

feat: FlexibleMapLayout and FlexibleListLayout #276

Open mikeal opened 4 years ago

mikeal commented 4 years ago

Similar to “FlexibeByteLayout” we have numerous cases in which we need a union for a regular kind or a more advanced multi-block layout. It would be good to standardize the the layout of these so that we can build and rely upon simple, common libraries.

rvagg commented 4 years ago

We could make a kinded union that switches between map (and array) and link if you're OK with jumping a link to find the root of the HAMT. Otherwise maybe nest under a keyed union and embed the root of the HAMT under that—although you expressed concern with having the root of an ADL being not at the root of a block at some point when experimenting with them I believe. I don't recall why, or whether that would still stand.