-
Notifications
You must be signed in to change notification settings - Fork 347
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
Rework cosmwasm-core
#2149
Rework cosmwasm-core
#2149
Conversation
Sorry, but I have no idea how that test ever even passed. The tests always ran on a non-wasm32 target, and they always ran with the This feels like something that should have never worked? Or am I misreading the previous code? |
Seems like something in the CI job sets RUST_BACKTRACE implicitly. I can reproduce the passing/failing test locally with
We should probably unset RUST_BACKTRACE in the CI job before running our script as the test code expects it to be unset |
Oh, I didn't see that this is a new GitHub Actions workflow |
Should we gate the Ed25519, p256, k256, etc. things of the crypto crate also behind the target triple? Shouldn't be too hard tbh. |
Why would we do that? All of cosmwasm-crypto is not pulled in for Wasm builds: https://github.com/CosmWasm/cosmwasm/blob/v2.0.3/packages/std/Cargo.toml#L67-L69 |
Not in the current version, but it is pulled in to provide the re-exports of the BLS generators. Either we move them from the crypto package into std, or we gate the other features (or we hope LTO fixes the size via dead code elimination) |
I looked a bit into that today. I think having cosmwasm-crypto as a dependency for the contract builds is a problem because of compile time and debugability for getrandom problems (folks always suspect cosmwasm-crypto to be the source of their compilation problems). The crate should only be needed for host code (VM and testing), not contract code. So I propose solution 3: we use this opportunity to start cosmwasm-core with just The concept of a lightweight no_std compatible cosmwasm-core is good as long as
With #2136 we can get more types in there as long as StdError remains in cosmwasm-std. |
Really funny, apparently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff
This PR removes
cosmwasm-core
again, as internally discussed.The introduction of this crate added unnecessary maintainance burdens for questionable benefits.
Closes #2145