Skip to content

Commit

Permalink
Merge branch 'main' into ccv-protos
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Oct 19, 2023
2 parents d2ad2bb + 1aced72 commit feee930
Show file tree
Hide file tree
Showing 35 changed files with 460 additions and 238 deletions.
2 changes: 2 additions & 0 deletions .changelog/v0.37.0/features/145-prost-0.12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update `prost` to v0.12 and `tonic` to v0.10
([\#145](https://github.com/cosmos/ibc-proto-rs/issues/145))
2 changes: 2 additions & 0 deletions .changelog/v0.37.0/improvements/152-serde-optional.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Make `serde` an optional dependency, now only enabled with the `serde` feature
([\#152](https://github.com/cosmos/ibc-proto-rs/pull/152))
4 changes: 4 additions & 0 deletions .changelog/v0.37.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*October 4th, 2023*

This release updates `prost` to v0.12 and `tonic` to v0.10,
and makes `serde` an optional dependency, now only enabled with the `serde` feature.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Implement `JsonSchema` for the `Any` type
([#156](https://github.com/cosmos/ibc-proto-rs/issues/156))
3 changes: 3 additions & 0 deletions .changelog/v0.37.1/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*October 10th, 2023*

This releases adds `JsonSchema` derivation for the `Any` type.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
override: true
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v1
- run: cargo hack clippy --feature-powerset --no-dev-deps
- run: cargo hack check --feature-powerset --no-dev-deps

test-stable:
runs-on: ubuntu-latest
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# CHANGELOG

## v0.37.1

*October 10th, 2023*

This releases adds `JsonSchema` derivation for the `Any` type.

### FEATURES

- Implement `JsonSchema` for the `Any` type
([#156](https://github.com/cosmos/ibc-proto-rs/issues/156))

## v0.37.0

*October 4th, 2023*

This release updates `prost` to v0.12 and `tonic` to v0.10,
and makes `serde` an optional dependency, now only enabled with the `serde` feature.

### FEATURES

- Update `prost` to v0.12 and `tonic` to v0.10
([\#145](https://github.com/cosmos/ibc-proto-rs/issues/145))

### IMPROVEMENTS

- Make `serde` an optional dependency, now only enabled with the `serde` feature
([\#152](https://github.com/cosmos/ibc-proto-rs/pull/152))

## v0.36.1

*September 28th, 2023*
Expand Down
27 changes: 13 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-proto"
version = "0.36.1"
version = "0.37.1"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down Expand Up @@ -28,36 +28,35 @@ doctest = false
all-features = true

[dependencies]
prost = { version = "0.11", default-features = false }
prost = { version = "0.12", default-features = false, features = ["prost-derive"] }
bytes = { version = "1.2", default-features = false }
tonic = { version = "0.9", default-features = false, optional = true }
serde = { version = "1.0", default-features = false }
tonic = { version = "0.10", default-features = false, optional = true }
serde = { version = "1.0", default-features = false, optional = true }
schemars = { version = "0.8", optional = true }
subtle-encoding = { version = "0.5", default-features = false }
base64 = { version = "0.21", default-features = false, features = ["alloc"] }
flex-error = { version = "0.4", default-features = false }
ics23 = { version = "0.11.0", default-features = false }

## for codec encode or decode
## Optional: enabled by the `parity-scale-codec` feature
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["full"], optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"], optional = true }

## for borsh encode or decode
## need tracking anchor-lang and near-sdk-rs borsh version
## Optional: enabled by the `borsh` feature
## For borsh encode or decode, needs to track `anchor-lang` and `near-sdk-rs` borsh version
borsh = { version = "0.10", default-features = false, optional = true }

ics23 = { version = "0.10.2" , default-features = false }

[dependencies.tendermint-proto]
version = "0.33"
version = "0.34"
default-features = false

[features]
default = ["std", "client"]
std = ["prost/std", "bytes/std", "subtle-encoding/std", "base64/std", "flex-error/std", "ics23/std"]
serde = ["ics23/serde"]
client = ["std", "tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]
json-schema = ["std", "schemars"]
server = ["std", "tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]
serde = ["dep:serde", "ics23/serde"]
client = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]
json-schema = ["std", "serde", "dep:schemars"]
server = ["std", "dep:tonic", "tonic/codegen", "tonic/transport", "tonic/prost"]
parity-scale-codec = ["dep:parity-scale-codec", "dep:scale-info"]
borsh = ["dep:borsh"]
proto-descriptor = []
4 changes: 4 additions & 0 deletions scripts/sync-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ cd ../..
# we instead re-exports the `ics23` crate type definitions.
rm -f src/prost/cosmos.ics23.v1.rs

# Remove `cosmos.base.store` module as it does not compile
# out of the box and we do not have a use for it at the moment.
rm -f src/prost/cosmos.base.store.v1beta1.rs

# The Tendermint ABCI protos are unused from within ibc-proto
rm -f src/prost/tendermint.abci.rs

Expand Down
28 changes: 17 additions & 11 deletions src/prost/cosmos.auth.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ pub mod msg_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_params(request).await
<T as Msg>::update_params(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1165,7 +1165,9 @@ pub mod query_server {
request: tonic::Request<super::QueryAccountsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).accounts(request).await };
let fut = async move {
<T as Query>::accounts(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1209,7 +1211,9 @@ pub mod query_server {
request: tonic::Request<super::QueryAccountRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).account(request).await };
let fut = async move {
<T as Query>::account(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1256,7 +1260,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).account_address_by_id(request).await
<T as Query>::account_address_by_id(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1299,7 +1303,9 @@ pub mod query_server {
request: tonic::Request<super::QueryParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).params(request).await };
let fut = async move {
<T as Query>::params(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1344,7 +1350,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).module_accounts(request).await
<T as Query>::module_accounts(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1392,7 +1398,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).module_account_by_name(request).await
<T as Query>::module_account_by_name(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1438,7 +1444,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).bech32_prefix(request).await
<T as Query>::bech32_prefix(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1484,7 +1490,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).address_bytes_to_string(request).await
<T as Query>::address_bytes_to_string(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1530,7 +1536,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).address_string_to_bytes(request).await
<T as Query>::address_string_to_bytes(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1576,7 +1582,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).account_info(request).await
<T as Query>::account_info(&inner, request).await
};
Box::pin(fut)
}
Expand Down
41 changes: 26 additions & 15 deletions src/prost/cosmos.bank.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ pub mod msg_server {
request: tonic::Request<super::MsgSend>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).send(request).await };
let fut = async move {
<T as Msg>::send(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -588,7 +590,9 @@ pub mod msg_server {
request: tonic::Request<super::MsgMultiSend>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).multi_send(request).await };
let fut = async move {
<T as Msg>::multi_send(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -631,7 +635,7 @@ pub mod msg_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_params(request).await
<T as Msg>::update_params(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -675,7 +679,7 @@ pub mod msg_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).set_send_enabled(request).await
<T as Msg>::set_send_enabled(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1686,7 +1690,9 @@ pub mod query_server {
request: tonic::Request<super::QueryBalanceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).balance(request).await };
let fut = async move {
<T as Query>::balance(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1731,7 +1737,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).all_balances(request).await
<T as Query>::all_balances(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1777,7 +1783,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).spendable_balances(request).await
<T as Query>::spendable_balances(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1826,7 +1832,8 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).spendable_balance_by_denom(request).await
<T as Query>::spendable_balance_by_denom(&inner, request)
.await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1872,7 +1879,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).total_supply(request).await
<T as Query>::total_supply(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -1917,7 +1924,9 @@ pub mod query_server {
request: tonic::Request<super::QuerySupplyOfRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).supply_of(request).await };
let fut = async move {
<T as Query>::supply_of(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -1959,7 +1968,9 @@ pub mod query_server {
request: tonic::Request<super::QueryParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).params(request).await };
let fut = async move {
<T as Query>::params(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down Expand Up @@ -2004,7 +2015,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).denom_metadata(request).await
<T as Query>::denom_metadata(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -2050,7 +2061,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).denoms_metadata(request).await
<T as Query>::denoms_metadata(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -2096,7 +2107,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).denom_owners(request).await
<T as Query>::denom_owners(&inner, request).await
};
Box::pin(fut)
}
Expand Down Expand Up @@ -2142,7 +2153,7 @@ pub mod query_server {
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).send_enabled(request).await
<T as Query>::send_enabled(&inner, request).await
};
Box::pin(fut)
}
Expand Down
4 changes: 3 additions & 1 deletion src/prost/cosmos.base.node.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ pub mod service_server {
request: tonic::Request<super::ConfigRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).config(request).await };
let fut = async move {
<T as Service>::config(&inner, request).await
};
Box::pin(fut)
}
}
Expand Down
Loading

0 comments on commit feee930

Please sign in to comment.