filecoin-project / builtin-actors

The Filecoin built-in actors
Other
78 stars 74 forks source link

Replace Array type alias with abstraction #1529

Open anorth opened 3 months ago

anorth commented 3 months ago

The Array type is just an alias for AMT. This lack of abstraction can lead to issues like #1346. Also, exposing the amt package errors directly causes a bunch of bloat in users that need to wrap and attach exit codes.

Create an Array2 type following the same pattern as Map2 and replace all uses of Array. Simplify all the map_err wrapping points that result from amt errors.

We can rename Array2 to Array once that name becomes available again.