-
Notifications
You must be signed in to change notification settings - Fork 123
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
Osmosis Proto #236 #239
Osmosis Proto #236 #239
Conversation
|
this way one can add the necessary types without the need to change the main |
regarding commit 72c14dd this needs to be merged into the main branch. (not part of osmosis-proto, I put this here to be able to continue working on |
@Philipp-Sc can you open a separate PR for 72c14dd ? Regarding the current dependency relationships, this may need some upstream refactoring. Ideally |
Reruns the proto generator now that cosmos#240 has been merged. This adds some protos which were previously missing.
* Fixed visibility on ContractInfo * Fixed rustdoc::bare-urls lint warning
Merge upstream cosmos-rust
@tony-iqlusion I see, the only part that depends on Let me know what you prefer. |
I think it would make sense to move the relevant traits into |
I created an issue for it. #248 |
Expose MsgGrantAllowance, MsgRevokeAllowance, BasicAllowance and AllowedMsgAllowance from cosmrs.
This includes the following additional dependency upgrades: - `k256` v0.11 - `ecdsa` v0.14
When trying to define an `osmosis-proto` crate (#239), we ran into the problem that it needed to import `cosmrs` to be able to impl the `MsgProto` trait. We couldn't follow the same pattern as `cosmrs` defining the type URLs for `cosmos-sdk-proto`, which it could only do because it defined the `MsgProto` trait as well. Knowledge of the type URLs is necessary to convert to/from `Any`, which Cosmos SDK uses all over the place. So far there isn't a good upstream solution to this problem in `prost` or AFAICT in `tendermint-proto` either. There's an upstream tracking issue for `prost` here: tokio-rs/prost#299 The ideal solution to this problem seems to be adding a `TYPE_URL` to `prost::Message`, and automatically populating them with `prost-build`. Failing that, this commit introduces a `TypeUrl` trait with an associated `TYPE_URL` const (previously provided by the `MsgProto` trait). The `from_any` and `to_any` methods have been moved to `MessageExt`.
When trying to define an `osmosis-proto` crate (#239), we ran into the problem that it needed to import `cosmrs` to be able to impl the `MsgProto` trait. We couldn't follow the same pattern as `cosmrs` defining the type URLs for `cosmos-sdk-proto`, which it could only do because it defined the `MsgProto` trait as well. Knowledge of the type URLs is necessary to convert to/from `Any`, which Cosmos SDK uses all over the place. So far there isn't a good upstream solution to this problem in `prost` or AFAICT in `tendermint-proto` either. There's an upstream tracking issue for `prost` here: tokio-rs/prost#299 The ideal solution to this problem seems to be adding a `TYPE_URL` to `prost::Message`, and automatically populating them with `prost-build`. Failing that, this commit introduces a `TypeUrl` trait with an associated `TYPE_URL` const (previously provided by the `MsgProto` trait). The `from_any` and `to_any` methods have been moved to `MessageExt`.
The re-exports CosmRS provides are easily overlooked, and many downstream users explicitly include `cosmrs`, `cosmos-sdk-proto`, and `tendermint` in their Cargo.toml. This documentation should help steer people towards using the re-exports.
Required by tendermint 0.23.8: cosmos#253
When trying to define an `osmosis-proto` crate (cosmos#239), we ran into the problem that it needed to import `cosmrs` to be able to impl the `MsgProto` trait. We couldn't follow the same pattern as `cosmrs` defining the type URLs for `cosmos-sdk-proto`, which it could only do because it defined the `MsgProto` trait as well. Knowledge of the type URLs is necessary to convert to/from `Any`, which Cosmos SDK uses all over the place. So far there isn't a good upstream solution to this problem in `prost` or AFAICT in `tendermint-proto` either. There's an upstream tracking issue for `prost` here: tokio-rs/prost#299 The ideal solution to this problem seems to be adding a `TYPE_URL` to `prost::Message`, and automatically populating them with `prost-build`. Failing that, this commit introduces a `TypeUrl` trait with an associated `TYPE_URL` const (previously provided by the `MsgProto` trait). The `from_any` and `to_any` methods have been moved to `MessageExt`.
Transitively enables gRPC support in `cosmos-sdk-proto`
This module contains only trait impls and is therefore empty. It was mistakenly made `pub`.
Merge upstream cosmos-rust
@tony-iqlusion I updated the branch. It should be ready to be merged. Let me know what you think. Best regards, |
osmosis added to default features
Can you open a new PR that targets the I just pushed that up as an example of how to structure the crate. |
Hi,
this is the initial version I got working.
Please let me know if something needs be improved/fixed.
There will be quite a few improvements over the coming days, to make
osmosis-proto
more convenient to use.Best regards,
Philipp