Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track resources with atree.ValueID instead of SlabID #2646

Conversation

fxamacker
Copy link
Member

Updates onflow/atree#292

Description

Currently, Array.SlabID() and OrderedMap.SlabID() are used as identifier to track resources, etc because slab IDs are guaranteed to unique. However, atree slab ID should be only used to retrieve slabs (registers) from storage.

Also, when Atree register inlining is implemented in the future, some resources may not be stored in separate slabs, so they will not have slab IDs anymore.

This commit uses Array.ValueID() and OrderedMap.ValueID() to uniquely identify resources.

More details at


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Currently, Array.SlabID() and OrderedMap.SlabID() are used as
identifier to track resources, etc because slab IDs are guaranteed
to unique. However, atree slab ID should be only used to retrieve
slabs (registers) from storage.

Also, when Atree register inlining is implemented in the future, some
resources may not be stored in separate slabs, so they will not have
slab IDs anymore.

This commit uses Array.ValueID() and OrderedMap.ValueID() to uniquely
identify resources.
@fxamacker fxamacker merged commit e501dc6 into fxamacker/use-updated-atree-api Jul 7, 2023
@fxamacker fxamacker deleted the fxamacker/track-resource-with-valueid branch July 7, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants