onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 13 forks source link

Fix the migration feature that filters unreferenced slabs #395

Closed fxamacker closed 2 months ago

fxamacker commented 2 months ago

Recently, migration programs in onflow/flow-go added a flag to filter out old unreferenced slabs and onflow/atree added some functions to support that. However, some of the old unreferenced slabs are not filtered.

This issue only affects this new migration feature in onflow/flow-go:

More info:

Suggestion

After looking into this today, it is clear that traversal needs to go deeper to handle nested storage id inside another storable such as Cadence SomeValue. Update the code to do this and add more tests.