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

Remove cosmwasm-storage #1457

Closed
webmaster128 opened this issue Oct 12, 2022 · 5 comments · Fixed by #1936
Closed

Remove cosmwasm-storage #1457

webmaster128 opened this issue Oct 12, 2022 · 5 comments · Fixed by #1936
Labels
Breaking (contracts) Compile-time breaking contracts
Milestone

Comments

@webmaster128
Copy link
Member

The next major version of cosmwasm-* should mark the EOL of cosmwasm-storage. In practice storage-plus is used already almost everywhere. If cosmwasm-storage does or contains anything you need that is not in storage-plus, let us know.

@mikedotexe
Copy link

For what it's worth, we've found the helper methods… helpful:

  • to_length_prefixed_nested
  • to_length_prefixed

These are particularly helpful when constructing raw queries. Thanks for flagging the EOL in an issue, which helps makes this visible to outsiders like us.

Do you know if this logic will be moved somewhere else? I think we might copy the helper methods and those they call (with proper attribution to the 👑 authors 👑 ) in the meantime.

We'll copy it mainly because there's a dependency that's not playing nicely with wasm architecture. This is not a question or ticket, but more of a "nice-to-know" I'll drop here:

error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /Users/mikepurvis/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.9/src/lib.rs:281:9
    |
281 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
282 | |                         default, you may need to enable the \"js\" feature. \
283 | |                         For more information see: \
284 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /Users/mikepurvis/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.9/src/lib.rs:337:9
    |
337 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

@webmaster128
Copy link
Member Author

webmaster128 commented Apr 13, 2023

Do you know if this logic will be moved somewhere else?

If you need them I can easily move them to cosmwasm-std. I'm a bit prod of the key layout schema discussed here.

Actually that might help my dependency problem here where the development contracts currently depend on cosmwasm-storage.

This is also nice because then cw-storage can depend on them instead of copying the functionality.

@webmaster128
Copy link
Member Author

there's a dependency

Any idea which depenency this is? Those things come up some times if you don't use resolver version 2 or dependencies pull in "rand" or "rand_core" with default features enabled.

@mikedotexe
Copy link

if you don't use resolver version 2 or dependencies pull in "rand" or "rand_core" with default features enabled.

Yes! It was a dependency dealing with randomness. I'm afraid I don't know what "resolver version 2" is.

I will note that after a call with an integrating partner from Vectis DAO, I found a path forward without having to use the to_length_prefixed* methods. Really appreciate the time and response

@webmaster128
Copy link
Member Author

I'm afraid I don't know what "resolver version 2" is.

See https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions and https://blog.rust-lang.org/2021/05/11/edition-2021.html#default-cargo-feature-resolver.

In #1676 you find a writeup about key storage layout that might be of great educational if you are fiddling with those sort of things.

@webmaster128 webmaster128 changed the title EOL cosmwasm-storage Remove cosmwasm-storage Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking (contracts) Compile-time breaking contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants