#fvm #filecoin #ipld #webassembly #sharded


Sharded IPLD Map implementation with level skipping

2 unstable releases

0.2.0 Jan 14, 2023
0.1.0 Dec 7, 2022

#501 in WebAssembly

Download history 140/week @ 2022-12-03 420/week @ 2022-12-10 280/week @ 2022-12-17 44/week @ 2022-12-24 165/week @ 2022-12-31 663/week @ 2023-01-07 525/week @ 2023-01-14 245/week @ 2023-01-21 347/week @ 2023-01-28 934/week @ 2023-02-04 311/week @ 2023-02-11 399/week @ 2023-02-18 294/week @ 2023-02-25 427/week @ 2023-03-04 316/week @ 2023-03-11

1,466 downloads per month


2.5K SLoC

KAMT crate for use as rust IPLD data structure, which stands for "fixed size Keyed AMT" and is basically a copy of the HAMT with some extra features that were deemed to be too complex to add there.

The original purpose of the features that gave birth to the KAMT was to optimize the HAMT for the EVM/Solidity storage layout, which uses hashing+offset for keys to co-locate array items in a contiguous address space. While the HAMT allowed the hashing strategy to work this way, it resulted in very deep parts of the tree where only the leaves contained key-value pairs. The main feature of this data structure then is to skip the empty levels and point straight to the next data bearing node.

The other difference is that to emphasize this the KAMT doesn't do any hashing on its own, it works with fixed size byte arrays as keys.

Data structure reference


~72K SLoC