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

WASM support with grpc-web #97

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fafb416
:sparkles: added wasm compatibility
shravanshetty1 Jul 3, 2021
4299b75
Add basic `cosmwasm` support (#96)
jstuczyn Jul 18, 2021
7470475
Update tendermint-proto requirement from 0.20 to 0.21
dependabot[bot] Jul 26, 2021
a6b5605
Update protobufs for cosmos-sdk 0.43.0-rc2 (#108)
zmanian Jul 30, 2021
c7a367a
Rebuild protos with proto-build (cosmos-sdk rev: v0.43.0-rc2 wasmd re…
github-actions[bot] Jul 30, 2021
f4c4ea6
Merge pull request #106 from cosmos/dependabot/cargo/tendermint-proto…
zmanian Jul 30, 2021
c0c0e4e
Update to tendermint 0.21 (#110)
zmanian Jul 31, 2021
455dd84
cosmos-sdk-proto v0.6.0 (#111)
tony-iqlusion Aug 3, 2021
a25f81f
add distribution module (#114)
kimonp Aug 3, 2021
ba012bd
Made admin field optional in MsgInstantiateContract (#115)
jstuczyn Aug 4, 2021
765ec47
Update to 0.43 final release
zmanian Aug 11, 2021
2fb812d
Rebuild protos with proto-build (cosmos-sdk rev: v0.43.0 wasmd rev: v…
github-actions[bot] Aug 12, 2021
d1a556e
cosmos-sdk-proto v0.6.1 (#118)
tony-iqlusion Aug 19, 2021
05584ea
cosmos-sdk-rs v0.3.0 (#112)
tony-iqlusion Aug 19, 2021
f89d721
New protos for vesting accounts (#119)
amromashov Aug 24, 2021
5abc7f9
cosmos-sdk-proto v0.6.2 (#121)
tony-iqlusion Aug 24, 2021
7031191
Bump MSRV to 1.54 (#122)
tony-iqlusion Aug 24, 2021
0e72592
cosmos-sdk-proto v0.6.3 (#123)
tony-iqlusion Aug 25, 2021
7c85a49
cosmos-sdk-rs: make staking amount non-nullable (#124)
tony-iqlusion Aug 25, 2021
ef8b129
Rename `cosmos-sdk-rs` to `cosmrs` (#125)
tony-iqlusion Aug 25, 2021
f32e051
cosmrs v0.1.0 (#127)
tony-iqlusion Aug 25, 2021
9e2762d
Update to tendermint-rs v0.22 crates (#128)
tony-iqlusion Sep 23, 2021
000e3f6
Bump `COSMOS_REV` to v0.44.0 (#130)
tony-iqlusion Sep 27, 2021
9b0d971
cosmos-sdk-proto v0.7.0 (#129)
tony-iqlusion Sep 27, 2021
56ec369
cosmrs: make `Tx::find_by_hash` use the `/tx` endpoint (#116)
tony-iqlusion Sep 27, 2021
bcb8e8a
cosmrs v0.2.0 (#132)
tony-iqlusion Sep 27, 2021
21a56c3
cosmrs: `PublicKey` JSON serialization support (#133)
tony-iqlusion Sep 29, 2021
136197d
cosmrs: use serde's `try_from` and `into` conversion attributes (#134)
tony-iqlusion Oct 5, 2021
a7a0c26
cosmrs v0.2.1 (#137)
tony-iqlusion Oct 6, 2021
0917391
Update proto_build to use comsos-sdk v0.44.1 and ibc-go v1.2.0
ChristianBorst Oct 7, 2021
4ba7bd6
Update cosmos-sdk-proto to sdk v0.44.1 and ibc-go v1.2.0
ChristianBorst Oct 7, 2021
9da9375
Fix cosmos-sdk proto compilation
ChristianBorst Oct 7, 2021
5936e62
Fix cosmos-sdk v0.44.1 protos
ChristianBorst Oct 7, 2021
af39fcf
Fix Validators name collision in cosmos.staking.v1beta1.rs
ChristianBorst Oct 7, 2021
1e8e5ed
Merge pull request #138 from ChristianBorst/christianborst/update-sdk…
jkilpatr Oct 12, 2021
ea12830
Bump tendermint-rs crates to v0.23; MSRV 1.56 (#144)
tony-iqlusion Oct 27, 2021
9484409
cosmrs: refactor `Msg*` traits (#146)
tony-iqlusion Oct 28, 2021
2b4d19b
cosmrs: cosmos.crypto.multisig.LegacyAminoPubKey support (#147)
tony-iqlusion Oct 28, 2021
a505f1f
cosmos-sdk-proto: 2021 edition upgrade; include_str! docs (#148)
tony-iqlusion Oct 28, 2021
8df013d
cosmos-sdk-proto v0.8.0 (#149)
tony-iqlusion Oct 28, 2021
7b08d23
cosmrs v0.3.0 (#150)
tony-iqlusion Oct 29, 2021
38acc50
grpc web compatible
shravanshetty1 Nov 12, 2021
72c2e26
Merge branch 'wasm3' into wasm4test
shravanshetty1 Nov 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cosmos-sdk-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- x86_64-unknown-linux-gnu
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: cosmos-sdk-rs
name: cosmrs

on:
push:
branches: main
pull_request:
paths:
- "cosmos-sdk-proto/**"
- "cosmos-sdk-rs/**"
- "cosmrs/**"
- "Cargo.*"

defaults:
run:
working-directory: cosmos-sdk-rs
working-directory: cosmrs

env:
CARGO_TERM_COLOR: always
Expand All @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
target:
- x86_64-unknown-linux-gnu
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.56.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.56.0 # MSRV
components: rustfmt
override: true
profile: minimal
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.56.0 # MSRV
components: rustfmt
override: true
profile: minimal
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.56.0 # MSRV
components: clippy
override: true
profile: minimal
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "cosmos-sdk"]
path = cosmos-sdk-go
url = https://github.com/cosmos/cosmos-sdk.git
[submodule "wasmd"]
path = wasmd
url = https://github.com/CosmWasm/wasmd.git
[submodule "ibc-go"]
path = ibc-go
url = https://github.com/cosmos/ibc-go
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ resolver = "2"
members = [
"proto-build",
"cosmos-sdk-proto",
"cosmos-sdk-rs"
"cosmrs"
]
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This is a place for commonly shared rust resources related to the Cosmos ecosyst

| Name | Description | crates.io | docs.rs | CI Build |
|----------------------|-----------------------------|-----------|---------|----------|
| [`cosmos‑sdk`] | Cosmos SDK for Rust | [![crates.io][cosmos-sdk-crate-img]][cosmos-sdk-crate-link] | [![docs.rs][cosmos-sdk-docs-img]][cosmos-sdk-docs-link] | [![CI][cosmos-sdk-ci-img]][cosmos-sdk-ci-link] |
| [`cosmos‑sdk‑proto`] | Proto and gRPC definitions | [![crates.io][cosmos-sdk-proto-crate-img]][cosmos-sdk-crate-link] | ![docs.rs][cosmos-sdk-proto-docs-img] | [![CI][cosmos-sdk-proto-ci-img]][cosmos-sdk-proto-ci-link] |
| [`cosmrs`] | Cosmos SDK for Rust | [![crates.io][cosmrs-crate-img]][cosmrs-crate-link] | [![docs.rs][cosmrs-docs-img]][cosmrs-docs-link] | [![CI][cosmrs-ci-img]][cosmrs-ci-link] |
| [`cosmos‑sdk‑proto`] | Proto and gRPC definitions | [![crates.io][cosmos-sdk-proto-crate-img]][cosmrs-crate-link] | ![docs.rs][cosmos-sdk-proto-docs-img] | [![CI][cosmos-sdk-proto-ci-img]][cosmos-sdk-proto-ci-link] |

## Merge Policy

Expand All @@ -34,24 +34,24 @@ all other crates, simply make the required edits in [main.rs](proto-build/main.r

## Minimum Supported Rust Version

Rust **1.48**
Rust **1.56**

[//]: # "crates"

[`cosmos‑sdk`]: https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-rs
[`cosmrs`]: https://github.com/cosmos/cosmos-rust/tree/main/cosmrs
[`cosmos‑sdk‑proto`]: https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-proto

[//]: # "badges"

[cosmos-sdk-crate-img]: https://img.shields.io/crates/v/cosmos_sdk.svg?logo=rust
[cosmos-sdk-crate-link]: https://crates.io/crates/cosmos_sdk
[cosmos-sdk-docs-img]: https://docs.rs/cosmos_sdk/badge.svg
[cosmos-sdk-docs-link]: https://docs.rs/cosmos_sdk/
[cosmos-sdk-ci-img]: https://github.com/cosmos/cosmos-rust/workflows/cosmos-sdk-rs/badge.svg
[cosmos-sdk-ci-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmos-sdk-rs.yml
[cosmrs-crate-img]: https://img.shields.io/crates/v/cosmrs.svg?logo=rust
[cosmrs-crate-link]: https://crates.io/crates/cosmrs
[cosmrs-docs-img]: https://docs.rs/cosmrs/badge.svg
[cosmrs-docs-link]: https://docs.rs/cosmrs/
[cosmrs-ci-img]: https://github.com/cosmos/cosmos-rust/workflows/cosmrs/badge.svg
[cosmrs-ci-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmrs.yml

[cosmos-sdk-proto-crate-img]: https://img.shields.io/crates/v/cosmos-sdk-proto.svg?logo=rust
[cosmos-sdk-crate-link]: https://crates.io/crates/cosmos-sdk-proto
[cosmrs-crate-link]: https://crates.io/crates/cosmos-sdk-proto
[cosmos-sdk-proto-docs-img]: https://docs.rs/cosmos-sdk-proto/badge.svg
[cosmos-sdk-proto-docs-link]: https://docs.rs/cosmos-sdk-proto/
[cosmos-sdk-proto-ci-img]: https://github.com/cosmos/cosmos-rust/workflows/cosmos-sdk-proto/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion cosmos-sdk-go
Submodule cosmos-sdk-go updated 1569 files
55 changes: 46 additions & 9 deletions cosmos-sdk-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,62 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.0 (2021-04-10)
## 0.8.0 (2021-10-28)
### Changed
- Update to cosmos-sdk v0.44.1 and ibc-go v1.2.0 ([#138])
- Bump tendermint-rs crates to v0.23; MSRV 1.56 ([#144])
- 2021 edition upgrade ([#148])

[#138]: https://github.com/cosmos/cosmos-rust/pull/138
[#144]: https://github.com/cosmos/cosmos-rust/pull/144
[#148]: https://github.com/cosmos/cosmos-rust/pull/148

## 0.7.0 (2021-09-27)
### Changed
- Update `tendermint-proto` crate to v0.22 ([#128])
- Bump `COSMOS_REV` to v0.44.0 ([#130])

[#128]: https://github.com/cosmos/cosmos-rust/pull/128
[#130]: https://github.com/cosmos/cosmos-rust/pull/130

## 0.6.3 (2021-08-24)
### Changed
- Bump MSRV to 1.54 ([#122])

[#122]: https://github.com/cosmos/cosmos-rust/pull/122

## 0.6.2 (2021-08-24)
### Added
- Protos for vesting accounts ([#119])

[#119]: https://github.com/cosmos/cosmos-rust/pull/119

## 0.6.1 (2021-08-19)
### Changed
- Rebuild protos with cosmos-sdk v0.43.0 ([#117])

[#117]: https://github.com/cosmos/cosmos-rust/pull/117

## 0.6.0 (2021-08-02) [YANKED]
### Added
- Basic `cosmwasm` support ([#96])

### Changed
- Bump `tendermint-proto` requirement from 0.20 to 0.21 ([#106])

[#96]: https://github.com/cosmos/cosmos-rust/pull/96
[#106]: https://github.com/cosmos/cosmos-rust/pull/106

## 0.5.0 (2021-04-10)
### Changed
- Add support for crypto proto and services ([#73])
- Update tendermint crate ([#72])
- Update `tendermint` crate ([#72])

[#72]: https://github.com/cosmos/cosmos-rust/pull/72
[#73]: https://github.com/cosmos/cosmos-rust/pull/73

## 0.4.0 (2021-04-02)

### Changed

- Add support for bank proto and services ([#61])
- Add support for tendermint proto and services ([#57])
- Add support for bank, crisis, distribution, evidence, genutil, gov, mint, params, slashing, staking upgrade and vesting proto and services ([#64])
Expand All @@ -29,9 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#61]: https://github.com/cosmos/cosmos-rust/pull/64

## 0.3.0 (2020-02-01)

### Changed

- Bump `cosmos-sdk` rev to v0.40.0 ([#37])
- Bump `tendermint` crate dependency to v0.18 ([#45])
- Bump `prost`, `prost-types`, `prost-build` to v0.7 ([#45])
Expand All @@ -43,13 +83,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#45]: https://github.com/cosmos/cosmos-rust/pull/45

## 0.2.0 (2020-01-04)

### Added

- `grpc` crate feature ([#8])

### Changed

- Bump `cosmos-sdk` rev to v0.40.0-rc6 ([#32])
- Bump `tendermint` + `tendermint-proto` crate dependencies to v0.17 ([#18])
- Format `prost`/`tonic` output with `rustfmt` ([#17])
Expand Down
20 changes: 10 additions & 10 deletions cosmos-sdk-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[package]
name = "cosmos-sdk-proto"
version = "0.5.0" # Also update html_root_url in lib.rs when bumping this
version = "0.8.0" # Also update html_root_url in lib.rs when bumping this
authors = [
"Justin Kilpatrick <[email protected]>",
"Greg Szabo <[email protected]>",
"Tony Arcieri <[email protected]>"
]
edition = "2018"
license = "Apache-2.0"
repository = "https://github.com/cosmos/cosmos-rust/tree/main/cosmos-sdk-proto"
description = "Protobuf stuct defintions for interacting Cosmos SDK powered blockchains"
readme = "README.md"
readme = "README.md"
categories = ["cryptography", "cryptography::cryptocurrencies", "database"]
keywords = ["blockchain", "cosmos", "tendermint", "proto"]
keywords = ["blockchain", "cosmos", "tendermint", "proto"]
edition = "2021"
rust-version = "1.56"

[dependencies]
prost = "0.7"
prost-types = "0.7"
prost = "0.9"
prost-types = "0.9"
tendermint-proto = "0.23"

# Optional dependencies
tonic = { version = "0.4", optional = true }

[dependencies.tendermint-proto]
version = "0.20"
tonic = { version = "0.6", optional = true, default-features = false, features = ["codegen", "prost"] }

[features]
default = ["grpc"]
grpc = ["tonic"]
cosmwasm = []

[package.metadata.docs.rs]
all-features = true
Expand Down
8 changes: 4 additions & 4 deletions cosmos-sdk-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Rust crate for interacting with [Protobufs] defined by the [Cosmos SDK].
The goal of this crate is to provide complete proto struct definitions for interacting
with a Cosmos SDK blockchain.

Currently this crate only provides a minority of the many total structs exported by
proto files.
Currently, this crate only provides a subset of the many total structs exported by
Cosmos SDK proto files.

Pull requests to expand coverage are welcome.

[Documentation][docs-link]

## Minimum Supported Rust Version

Requires Rust **1.48** or newer.
This crate is supported on Rust **1.56** or newer.

[//]: # "badges"
[crate-image]: https://img.shields.io/crates/v/cosmos-sdk-proto.svg?logo=rust
Expand All @@ -31,7 +31,7 @@ Requires Rust **1.48** or newer.
[build-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmos-sdk-proto.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
[license-link]: https://github.com/cosmos/cosmos-rust/blob/master/LICENSE
[rustc-image]: https://img.shields.io/badge/rustc-1.48+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg

[//]: # "general links"
[Protobufs]: (https://github.com/cosmos/cosmos-sdk/tree/master/proto/)
Expand Down
28 changes: 17 additions & 11 deletions cosmos-sdk-proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
//! The `cosmos-sdk-proto` crate provides access to the Cosmos SDK proto-defined structs.
//! These are then re-exported in a module structure as close as possible to the proto files.
//!
//! The version strings are intentionally excluded, that way users may specify `cosmos-sdk` versions
//! as a feature argument to this crate and not have to change their imports. For as much as that is
//! worth considering that modules seem to show up and go away with every RC.
//!
//! TODO: actually implement features tag based compilation

#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/cosmos/cosmos-rust/main/.images/cosmos.png",
html_root_url = "https://docs.rs/cosmos-sdk-proto/0.5.0"
html_root_url = "https://docs.rs/cosmos-sdk-proto/0.8.0"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![forbid(unsafe_code)]
#![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)]

pub use tendermint_proto as tendermint;

/// The version (commit hash) of the Cosmos SDK used when generating this library.
pub const COSMOS_SDK_VERSION: &str = include_str!("prost/COSMOS_SDK_COMMIT");

Expand Down Expand Up @@ -201,6 +195,18 @@ pub mod cosmos {
}
}

/// CosmWasm protobuf definitions.
#[cfg(feature = "cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "cosmwasm")))]
pub mod cosmwasm {
/// Messages and services handling CosmWasm.
pub mod wasm {
pub mod v1beta1 {
include!("prost/cosmwasm.wasm.v1beta1.rs");
}
}
}

/// IBC protobuf definitions.
pub mod ibc {
/// IBC applications.
Expand Down
2 changes: 1 addition & 1 deletion cosmos-sdk-proto/src/prost/COSMOS_SDK_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.42.3
v0.44.1
1 change: 1 addition & 0 deletions cosmos-sdk-proto/src/prost/IBC_COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.2.0
1 change: 1 addition & 0 deletions cosmos-sdk-proto/src/prost/WASMD_COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.17.0
Loading