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

Use NativeStorage trait bound for AccessoryState related things #1057

Open
citizen-stig opened this issue Oct 17, 2023 · 0 comments
Open

Use NativeStorage trait bound for AccessoryState related things #1057

citizen-stig opened this issue Oct 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@citizen-stig
Copy link
Member

There are 2 ways to define Storage capabilities in Zk and Native mode:

  1. native flag
  2. NativeStorage trait bound

Currently both approaches are used, but I believe that second provides clearer type control, example can be seen in
#978

This issue suggest removing fn get_accessory(&self, key: &StorageKey) -> Option<StorageValue> from Storage trait and move it to NativeStorage trait.

This change will heavily affect sov-modules-api, as many things there probably needs to be feature gated behind native flag.
Upside is that binary size for Zkvm should be smaller.

@citizen-stig citizen-stig added the enhancement New feature or request label Oct 17, 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

No branches or pull requests

1 participant