Skip to content

Commit

Permalink
Merge tag 'v0.46.0' into multihop
Browse files Browse the repository at this point in the history
ibc-proto-rs v0.46.0

June 3rd, 2024

This release only bumps `tendermint-proto` to v0.37.

BREAKING CHANGES:

- Update `tendermint-proto` to v0.37 ([#215](#215))
  • Loading branch information
ljoss17 committed Jul 2, 2024
2 parents 2eb7989 + a1a4716 commit 95d8d01
Show file tree
Hide file tree
Showing 15 changed files with 325 additions and 42 deletions.
1 change: 1 addition & 0 deletions .changelog/v0.45.0/breaking-changes/195-tonic-0.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Update `tonic` to v0.11.0 ([#195](https://github.com/cosmos/ibc-proto-rs/pull/195))
2 changes: 2 additions & 0 deletions .changelog/v0.45.0/breaking-changes/210-borsh-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update `borsh` to v1
([\#210](https://github.com/cosmos/ibc-proto-rs/pull/210))
1 change: 1 addition & 0 deletions .changelog/v0.45.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This release updates `tonic` to v0.11.0 and `borsh` to v1.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update `tendermint-proto` to v0.37
([#215](https://github.com/cosmos/ibc-proto-rs/issues/215))
3 changes: 3 additions & 0 deletions .changelog/v0.46.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*June 3rd, 2024*

This release only bumps `tendermint-proto` to v0.37.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# CHANGELOG

## v0.46.0

*June 3rd, 2024*

This release only bumps `tendermint-proto` to v0.37.

### BREAKING CHANGES

- Update `tendermint-proto` to v0.37 ([#215](https://github.com/cosmos/ibc-proto-rs/issues/215))

## v0.45.0

*May 30th, 2024*

This release updates `tonic` to v0.11.0 and `borsh` to v1.

### BREAKING CHANGES

- Update `tonic` to v0.11.0 ([#195](https://github.com/cosmos/ibc-proto-rs/pull/195))
- Update `borsh` to v1 ([\#210](https://github.com/cosmos/ibc-proto-rs/pull/210))

## v0.44.0

*April 25th, 2024*
Expand Down
8 changes: 2 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ exposed.

Our release process is as follows:

0. Bump the version in `Cargo.toml`.
1. Update the [changelog](#changelog) to reflect and summarize all changes in
the release. This involves:
1. Running `unclog build -u` and copy pasting the output at the top
Expand All @@ -228,13 +229,8 @@ Our release process is as follows:
2. Running `unclog release --version vX.Y.Z --editor <editor>` to create a
summary of all of the changes in this release.
3. Committing the updated `CHANGELOG.md` file and `.changelog` directory to the repo.
2. Push this to a branch `release/vX.Y.Z` according to the version number of
3. Push this to a branch `release/vX.Y.Z` according to the version number of
the anticipated release (e.g. `release/v0.18.0`) and open a **draft PR**.
3. Bump all relevant versions in the codebase to the new version and push these
changes to the release PR. This includes:
1. All `Cargo.toml` files (making sure dependencies' versions are updated too).
2. All crates' `lib.rs` files documentation references' `html_root_url`
parameters must point to the new version.
4. Run `cargo doc --all-features --open` locally to double-check that all the
documentation compiles and is up-to-date and coherent. Fix any potential
issues here and push them to the release PR.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-proto"
version = "0.44.0"
version = "0.46.0"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down Expand Up @@ -45,10 +45,10 @@ scale-info = { version = "2.1.2", default-features = false, features = [

## 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 }
borsh = { version = "1", default-features = false, features = ["derive"], optional = true }

[dependencies.tendermint-proto]
version = "0.36"
version = "0.37"
default-features = false

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
![Rust Stable][rustc-image]
![Rust 1.56.1+][rustc-version]

Rust crate for interacting with Cosmos SDK IBC structs.
Rust Protobuf definitions and gRPC clients for interacting with Cosmos SDK, IBC and Interchain Security.

This repository maintains all the data structures relevant for interacting with on-chain IBC data.

Whether you're building an IBC relayer, IBC modules, or any client software that consumes IBC data structures in Rust, you're at the right place.


Expand Down
10 changes: 6 additions & 4 deletions scripts/sync-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ COSMOS_ICS_DIR=$(mktemp -d /tmp/interchain-security-XXXXXXXX)

pushd "$COSMOS_ICS_DIR"
git clone "$COSMOS_ICS_GIT" .
git checkout -b "$INTERCHAIN_SECURITY_COMMIT" "$INTERCHAIN_SECURITY_COMMIT"
git checkout "$INTERCHAIN_SECURITY_COMMIT"

cd proto
buf mod prune
buf mod update
buf export -v -o ../proto-include
popd
Expand All @@ -138,9 +139,10 @@ COSMOS_SDK_DIR=$(mktemp -d /tmp/cosmos-sdk-XXXXXXXX)

pushd "$COSMOS_SDK_DIR"
git clone "$COSMOS_SDK_GIT" .
git checkout -b "$COSMOS_SDK_COMMIT" "$COSMOS_SDK_COMMIT"
git checkout "$COSMOS_SDK_COMMIT"

cd proto
buf mod prune
buf mod update
buf export -v -o ../proto-include
popd
Expand All @@ -164,7 +166,7 @@ IBC_GO_DIR=$(mktemp -d /tmp/ibc-go-XXXXXXXX)

pushd "$IBC_GO_DIR"
git clone "$IBC_GO_GIT" .
git checkout -b "$IBC_GO_COMMIT" "$IBC_GO_COMMIT"
git checkout "$IBC_GO_COMMIT"

cd proto
buf export -v -o ../proto-include
Expand All @@ -176,7 +178,7 @@ NFT_TRANSFER_DIR=$(mktemp -d /tmp/nft-transfer-XXXXXXXX)

pushd "$NFT_TRANSFER_DIR"
git clone "$NFT_TRANSFER_GIT" .
git checkout -b "$NFT_TRANSFER_COMMIT" "$NFT_TRANSFER_COMMIT"
git checkout "$NFT_TRANSFER_COMMIT"

cd proto
buf export -v -o ../proto-include
Expand Down
9 changes: 2 additions & 7 deletions src/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ pub mod protobuf {

#[cfg(feature = "borsh")]
impl borsh::BorshSerialize for Any {
fn serialize<W: borsh::maybestd::io::Write>(
&self,
writer: &mut W,
) -> borsh::maybestd::io::Result<()> {
fn serialize<W: borsh::io::Write>(&self, writer: &mut W) -> borsh::io::Result<()> {
let inner_any = InnerAny {
type_url: self.type_url.clone(),
value: self.value.clone(),
Expand All @@ -272,9 +269,7 @@ pub mod protobuf {

#[cfg(feature = "borsh")]
impl borsh::BorshDeserialize for Any {
fn deserialize_reader<R: borsh::maybestd::io::Read>(
reader: &mut R,
) -> borsh::maybestd::io::Result<Self> {
fn deserialize_reader<R: borsh::io::Read>(reader: &mut R) -> borsh::io::Result<Self> {
let inner_any = InnerAny::deserialize_reader(reader)?;

Ok(Any {
Expand Down
64 changes: 56 additions & 8 deletions src/prost/google.protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,16 @@ pub struct FileOptions {
#[deprecated]
#[prost(bool, optional, tag = "20")]
pub java_generate_equals_and_hash: ::core::option::Option<bool>,
/// If set true, then the Java2 code generator will generate code that
/// throws an exception whenever an attempt is made to assign a non-UTF-8
/// byte sequence to a string field.
/// Message reflection will do the same.
/// However, an extension field still accepts non-UTF-8 byte sequences.
/// This option has no effect on when used with the lite runtime.
/// A proto2 file can set this to true to opt in to UTF-8 checking for Java,
/// which will throw an exception if invalid UTF-8 is parsed from the wire or
/// assigned to a string field.
///
/// TODO: clarify exactly what kinds of field types this option
/// applies to, and update these docs accordingly.
///
/// Proto3 files already perform these checks. Setting the option explicitly to
/// false has no effect: it cannot be used to opt proto3 files out of UTF-8
/// checks.
#[prost(bool, optional, tag = "27", default = "false")]
pub java_string_check_utf8: ::core::option::Option<bool>,
#[prost(
Expand Down Expand Up @@ -1094,6 +1098,8 @@ pub struct FieldOptions {
/// Any features defined in the specific edition.
#[prost(message, optional, tag = "21")]
pub features: ::core::option::Option<FeatureSet>,
#[prost(message, optional, tag = "22")]
pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
/// The parser stores options it doesn't recognize here. See above.
#[prost(message, repeated, tag = "999")]
pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
Expand All @@ -1116,6 +1122,36 @@ pub mod field_options {
::prost::alloc::format!("google.protobuf.FieldOptions.{}", Self::NAME)
}
}
/// Information about the support window of a feature.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureSupport {
/// The edition that this feature was first available in. In editions
/// earlier than this one, the default assigned to EDITION_LEGACY will be
/// used, and proto files will not be able to override it.
#[prost(enumeration = "super::Edition", optional, tag = "1")]
pub edition_introduced: ::core::option::Option<i32>,
/// The edition this feature becomes deprecated in. Using this after this
/// edition may trigger warnings.
#[prost(enumeration = "super::Edition", optional, tag = "2")]
pub edition_deprecated: ::core::option::Option<i32>,
/// The deprecation warning text if this feature is used after the edition it
/// was marked deprecated in.
#[prost(string, optional, tag = "3")]
pub deprecation_warning: ::core::option::Option<::prost::alloc::string::String>,
/// The edition this feature is no longer available in. In editions after
/// this one, the last default assigned will be used, and proto files will
/// not be able to override it.
#[prost(enumeration = "super::Edition", optional, tag = "4")]
pub edition_removed: ::core::option::Option<i32>,
}
impl ::prost::Name for FeatureSupport {
const NAME: &'static str = "FeatureSupport";
const PACKAGE: &'static str = "google.protobuf";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("google.protobuf.FieldOptions.{}", Self::NAME)
}
}
#[derive(
Clone,
Copy,
Expand Down Expand Up @@ -1390,6 +1426,9 @@ pub struct EnumValueOptions {
/// credentials.
#[prost(bool, optional, tag = "3", default = "false")]
pub debug_redact: ::core::option::Option<bool>,
/// Information about the support window of a feature value.
#[prost(message, optional, tag = "4")]
pub feature_support: ::core::option::Option<field_options::FeatureSupport>,
/// The parser stores options it doesn't recognize here. See above.
#[prost(message, repeated, tag = "999")]
pub uninterpreted_option: ::prost::alloc::vec::Vec<UninterpretedOption>,
Expand Down Expand Up @@ -1857,8 +1896,12 @@ pub mod feature_set_defaults {
pub struct FeatureSetEditionDefault {
#[prost(enumeration = "super::Edition", optional, tag = "3")]
pub edition: ::core::option::Option<i32>,
#[prost(message, optional, tag = "2")]
pub features: ::core::option::Option<super::FeatureSet>,
/// Defaults of features that can be overridden in this edition.
#[prost(message, optional, tag = "4")]
pub overridable_features: ::core::option::Option<super::FeatureSet>,
/// Defaults of features that can't be overridden in this edition.
#[prost(message, optional, tag = "5")]
pub fixed_features: ::core::option::Option<super::FeatureSet>,
}
impl ::prost::Name for FeatureSetEditionDefault {
const NAME: &'static str = "FeatureSetEditionDefault";
Expand Down Expand Up @@ -2137,6 +2180,9 @@ impl ::prost::Name for GeneratedCodeInfo {
pub enum Edition {
/// A placeholder for an unknown edition value.
Unknown = 0,
/// A placeholder edition for specifying default behaviors *before* a feature
/// was first introduced. This is effectively an "infinite past".
Legacy = 900,
/// Legacy syntax "editions". These pre-date editions, but behave much like
/// distinct editions. These can't be used to specify the edition of proto
/// files, but feature definitions must supply proto2/proto3 defaults for
Expand Down Expand Up @@ -2168,6 +2214,7 @@ impl Edition {
pub fn as_str_name(&self) -> &'static str {
match self {
Edition::Unknown => "EDITION_UNKNOWN",
Edition::Legacy => "EDITION_LEGACY",
Edition::Proto2 => "EDITION_PROTO2",
Edition::Proto3 => "EDITION_PROTO3",
Edition::Edition2023 => "EDITION_2023",
Expand All @@ -2184,6 +2231,7 @@ impl Edition {
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EDITION_UNKNOWN" => Some(Self::Unknown),
"EDITION_LEGACY" => Some(Self::Legacy),
"EDITION_PROTO2" => Some(Self::Proto2),
"EDITION_PROTO3" => Some(Self::Proto3),
"EDITION_2023" => Some(Self::Edition2023),
Expand Down
Loading

0 comments on commit 95d8d01

Please sign in to comment.