filecoin-project / go-amt-ipld

Implementation of an array mapped trie using go and ipld
Other
9 stars 15 forks source link

Make the bit width configurable. #38

Closed Stebalien closed 3 years ago

Stebalien commented 4 years ago

NOTE: This also increases the max index to uint64-1. The previous max index was set to "max int" so the max index allowed us to nicely fill the max height. However, with arbitrary heights, that no longer makes any sense.

Unfortunately, our "array" abstraction uses int64, not uint64 (and our max sector number is int64). We'll need to audit specs-actors to make sure we're enforcing maximums in all the correct places. Alternatively, we could drop the max back down, but that would be unfortunate.

anorth commented 4 years ago

We can possibly change the array abstraction's index type. It's worth looking into to follow up.

Stebalien commented 3 years ago

@ZenGround0 can I get a final review on that last commit (encoding the bitwidth in the AMT)?