filecoin-project / go-amt-ipld

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

Require CBOR[Un]Marshaller for value types #42

Closed anorth closed 3 years ago

anorth commented 3 years ago

This AMT is only for Filecoin, which uses cbor-gen for all value types. For legacy reasons, the methods accept interface{} and fall back to to the refmt library for values that do not implement CBOR[Un]Marshaller. This represents unnecessary complexity, a minor performance cost, and possibly a vector for unwanted behaviour.

Let's remove support for general values, requiring cbor-gen.

See https://github.com/filecoin-project/go-hamt-ipld/issues/78