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

Add Array.ID() and OrderedMap.ID() #320

Closed
fxamacker opened this issue Jun 29, 2023 · 0 comments · Fixed by #321
Closed

Add Array.ID() and OrderedMap.ID() #320

fxamacker opened this issue Jun 29, 2023 · 0 comments · Fixed by #321
Assignees
Labels
enhancement New feature or request

Comments

@fxamacker
Copy link
Member

Issue To Be Solved

Currently Array.StorageID() and OrderedMap.StorageID() are used as identifier in client because storage IDs are guaranteed to unique. However, storage 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 storage IDs anymore.

Suggested Solution

Add ID() to uniquly identify Array and OrderedMap. For now, implement ID to be identical to StorageID in raw bytes ([16]bytes). In the future, this can be changed to be decoupled from storage ID completely.

Once ID() is available, clients should use it instead of StorageID() to identify Atree composite values.

@fxamacker fxamacker added the enhancement New feature or request label Jun 29, 2023
@fxamacker fxamacker self-assigned this Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant