-
Notifications
You must be signed in to change notification settings - Fork 82
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
f32/f64/usize in cosmwasm(and other no f32/f64 envs) reproduction and fixes #803
Conversation
feel free to merge with #790 and run insuction in shell.nix header. try to rollback any change and see effects. serde works exactly only this way i found, other compile with floats |
for usize correctness parity uses static assets substrate/primitives/runtime-interface/src/impls.rs:45:1 so can asset some usize if needed too |
pr has issue "serde-json-wasm 0.5.1 (git+https://github.com/dzmitry-lahoda-forks/serde-json-wasm?rev=8a7e522c0e4de36a6dfb535766f26a9941017d81)", need to use no-std serde-json-wasm |
we trying to get no_std merged for 1 year+ already so |
…y fork pr not merged for no std
Some explanation is here cosmos/ibc-rs#803 So wasmd validation in cosmos will not find reference to code (which never executes) it fails like floats anymore and will success upload. Any attempt to strip float code failed (likely it anticipates input which may contain floats in some case, which is not case to handle at all). Also had hard times with std because of centauri repo, added CI checks to ensure we always good. May be fixes #3952 too. Required for merge: - [x] `pr-workflow-check / draft-release-check` is ✅ success - Other rules GitHub shows you, or can be read in [configuration](../terraform/github.com/branches.tf) Makes review faster: - [x] PR title is my best effort to provide summary of changes and has clear text to be part of release notes - [x] I marked PR by `misc` label if it should not be in release notes - [x] Linked Zenhub/Github/Slack/etc reference if one exists - [x] I was clear on what type of deployment required to release my changes (node, runtime, contract, indexer, on chain operation, frontend, infrastructure) if any in PR title or description - [x] Added reviewer into `Reviewers` - [x] I tagged(`@`) or used other form of notification of one person who I think can handle best review of this PR - [x] I have proved that PR has no general regressions of relevant features and processes required to release into production - [x] Any dependency updates made, was done according guides from relevant dependency - Clicking all checkboxes - Adding detailed description of changes when it feels appropriate (for example when PR is big)
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.
Hi @dzmitry-lahoda. This is awesome and much appreciated! 👌🏻
Let’s get it over the finish line. Would you plz apply the following changes:
- Merge changes from the main to the PR's branch
- Set
serde-json-wasm
package to use v1.0.0 - Add a CI job that does
cw_check
by running theshell.nix
- Add unclog
Then, I will run an integration test against gaia chains in basecoin-rs
to make sure using serde-json-wasm
we still keep compatibility with both Hermes
and basecoin_app
(Though, from what I see most probably should be ok)
Let me know if for any of above, I can assist
Hey @dzmitry-lahoda, Any chance you could wrap up this PR? |
@@ -15,7 +15,7 @@ use crate::alloc::{borrow::ToOwned, string::String}; | |||
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Display, From, Into)] | |||
pub struct Amount( | |||
#[cfg_attr(feature = "schema", schemars(with = "String"))] | |||
#[serde(serialize_with = "crate::serializers::serde_string::serialize")] | |||
#[serde(serialize_with = "serialize")] |
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.
Taking another peek, the "serialize" function in "amount.rs" seems redundant. Why not use "crate::serializers::serde_string::serialize"?
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.
afaik for some reason it triggered float
to be compiled into wasm (seems like just patter matching, but validation tools do not care).
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.
Would be OK if the ci/cw-check
passes with the crate::serializers::serde_string::serialize
or still might be the case?
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.
would be OK
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.
i used only reproducible check to fix issues
hello, some things
but in general things I tried still holds, for next 1 month i am on ibc for solidity, so will not catch up this minimum this period, i guess company will continue more efforts to no_std versions of ibc in 2-3 month (after evm). |
Thanks a bunch for the tips and updates. 🙏 No worries, I’ll fork yours and open up a new PR. Looking forward to hearing about the progress on the no_std versions of IBC. |
Superseded by #894 |
Closes: #800
Description
Requires #790
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.