Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Enable contracts::seal_get_storage to skip reading the actual value #10490

Closed
cmichi opened this issue Dec 15, 2021 · 0 comments · Fixed by #10497
Closed

Enable contracts::seal_get_storage to skip reading the actual value #10490

cmichi opened this issue Dec 15, 2021 · 0 comments · Fixed by #10497
Assignees
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. J0-enhancement An additional feature request.

Comments

@cmichi
Copy link
Contributor

cmichi commented Dec 15, 2021

We recently introduced a thin-wrapped data structure Mapping in ink! and would like to add a .contains(…) function to it's API.
The contracts pallet doesn't have an API to do that at the moment though, so we currently always need to load the full value to check for existence.

@athei suggested to change the seal_get_storage API in a way that the -1 (u32::MAX) sentinel value would skip reading the actual value. He said it's used for other seal_* API's too.

After this issue is implemented we can create a follow-up in ink!.

@cmichi cmichi added I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. J0-enhancement An additional feature request. labels Dec 15, 2021
@athei athei self-assigned this Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. J0-enhancement An additional feature request.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants