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

Enable cosmrs support no_std #397

Open
DaviRain-Su opened this issue Apr 23, 2023 · 7 comments
Open

Enable cosmrs support no_std #397

DaviRain-Su opened this issue Apr 23, 2023 · 7 comments

Comments

@DaviRain-Su
Copy link
Contributor

No description provided.

@tony-iqlusion
Copy link
Member

Do you have an actual use case for cosmrs + no_std?

In particular it currently uses eyre for error handling, which does not support no_std.

It would be nice to wait for the stabilization of the Error trait in core before proceeding. I can't say I'm terribly happy with flex-error in tendermint-rs.

@DaviRain-Su
Copy link
Contributor Author

I am implement ics06-solomachain-client, that use cosmrs publickey type. I wish cosmrs can implement no-std.

@tony-iqlusion
Copy link
Member

tony-iqlusion commented Apr 25, 2023

Adding no_std support is something I don't have time to work on, and ideally it wouldn't require a bunch of compromises on the error types like what happened with tendermint-rs.

What no_std platform are you targeting?

@DaviRain-Su
Copy link
Contributor Author

DaviRain-Su commented Apr 25, 2023

Oh, there is no specific no-std platform support because I need to use types from cosmrs while implementing the ICS06 solomachine client. I don't think it makes sense to redundantly define which type conversions are needed in ibc-rs.

the error types like what happened with tendermint-rs.

Do you like how errors are handled in ibc-rs?

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Jul 19, 2023

We have CosmWasm on Substrate. Substrate blockchain runtime (big contract) is no_std. We provide precompiles to CW contracts, so they can call our modules(called pallets) as if these are just usual contracts. One of precompiles is IBC Wasm Hook from Osmosis (allows IBC to terminate ICS 20 packets with contracts) calls. It requires generation and verification of sender and receiver using specific bech32 account encoding which needs some cosmos types for handling that.

Btw our no_std CW fork uses error in core feature.

@tony-iqlusion
Copy link
Member

Note: cosmos-sdk-proto support for no_std was added in #478

@tony-iqlusion
Copy link
Member

Rust 1.81 is out and core::error::Error is now stable, which should unblock this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants