Skip to content

Commit

Permalink
Merge tag 'v0.38.0' into romac/channel-upgrade-only
Browse files Browse the repository at this point in the history
ibc-proto-rs v0.38.0

October 19th, 2023

This release contains a breaking change, where the `Protobuf` trait is not
object-safe any longer, but rather re-exported from the `tendermint-proto` crate.

It also updates the Interchain Security protos to include misbehaviour-related messages.

BREAKING CHANGES:

- Switch from using object safe `Protobuf` definitions and re-export
 `Protobuf` from `tendermint-proto` crate` instead.
 (#116)

FEATURES:

- Update CCV provider protos to include misbehaviour-related messages
  (#113)
  • Loading branch information
ljoss17 committed Oct 19, 2023
2 parents f274583 + 1075017 commit 874dff8
Show file tree
Hide file tree
Showing 21 changed files with 550 additions and 541 deletions.
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Switch from using object safe `Protobuf` definitions and instead, re-export
`Protobuf` from `tendermint-proto` crate`
([#116](https://github.com/cosmos/ibc-proto-rs/issues/116))
2 changes: 2 additions & 0 deletions .changelog/v0.38.0/features/113-ccv-protos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update CCV provider protos to include misbehaviour-related messages
([\#113](https://github.com/cosmos/ibc-proto-rs/issues/113))
6 changes: 6 additions & 0 deletions .changelog/v0.38.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*October 19th, 2023*

This release contains a breaking change, where the `Protobuf` trait is not
object-safe any longer, but rather re-exported from the `tendermint-proto` crate.

It also updates the Interchain Security protos to include misbehaviour-related messages.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# CHANGELOG

## v0.38.0

*October 19th, 2023*

This release contains a breaking change, where the `Protobuf` trait is not
object-safe any longer, but rather re-exported from the `tendermint-proto` crate.

It also updates the Interchain Security protos to include misbehaviour-related messages.

### BREAKING CHANGES

- Switch from using object safe `Protobuf` definitions and re-export
`Protobuf` from `tendermint-proto` crate` instead.
([#116](https://github.com/cosmos/ibc-proto-rs/issues/116))

### FEATURES

- Update CCV provider protos to include misbehaviour-related messages
([\#113](https://github.com/cosmos/ibc-proto-rs/issues/113))

## 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*
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-proto"
version = "0.37.0"
version = "0.38.0"
authors = ["Informal Systems <hello@informal.systems>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
16 changes: 10 additions & 6 deletions scripts/sync-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ COSMOS_ICS_GIT="${COSMOS_ICS_GIT:-$CACHE_PATH/cosmos/interchain-security.git}"

COSMOS_SDK_COMMIT="$(cat src/COSMOS_SDK_COMMIT)"
IBC_GO_COMMIT="$(cat src/IBC_GO_COMMIT)"
COSMOS_ICS_COMMIT="$(cat src/COSMOS_ICS_COMMIT)"
INTERCHAIN_SECURITY_COMMIT="$(cat src/INTERCHAIN_SECURITY_COMMIT)"

echo "COSMOS_SDK_COMMIT: $COSMOS_SDK_COMMIT"
echo "IBC_GO_COMMIT: $IBC_GO_COMMIT"
echo "COSMOS_ICS_COMMIT: $COSMOS_ICS_COMMIT"
echo "INTERCHAIN_SECURITY_COMMIT: $INTERCHAIN_SECURITY_COMMIT"

# Use either --ics-commit flag for commit ID,
# or --ics-tag for git tag. Because we can't modify
# proto-compiler to have smart detection on that.

if [[ "$COSMOS_ICS_COMMIT" =~ ^[a-zA-Z0-9]{40}$ ]]
if [[ "$INTERCHAIN_SECURITY_COMMIT" =~ ^[a-zA-Z0-9]{40}$ ]]
then
ICS_COMMIT_OPTION="--ics-commit"
else
Expand Down Expand Up @@ -111,7 +111,7 @@ COSMOS_ICS_DIR=$(mktemp -d /tmp/interchain-security-XXXXXXXX)

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

cd proto
buf mod update
Expand Down Expand Up @@ -163,13 +163,13 @@ mkdir -p src/prost

cd tools/proto-compiler

cargo build --locked
cargo build

# Run the proto-compiler twice,
# once for std version with --build-tonic set to true
# and once for no-std version with --build-tonic set to false

cargo run --locked -- compile \
cargo run -- compile \
--ics "$COSMOS_ICS_DIR/proto-include" \
--sdk "$COSMOS_SDK_DIR/proto-include" \
--ibc "$IBC_GO_DIR/proto-include" \
Expand All @@ -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
1 change: 0 additions & 1 deletion src/COSMOS_ICS_COMMIT

This file was deleted.

1 change: 1 addition & 0 deletions src/INTERCHAIN_SECURITY_COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ea545b490b53b8e6f422492b4fb2820ab0bc140b
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#![forbid(unsafe_code)]

pub mod google;
pub mod protobuf;

pub use tendermint_proto::Protobuf;

extern crate alloc;

Expand All @@ -31,6 +32,9 @@ pub const COSMOS_SDK_COMMIT: &str = include_str!("COSMOS_SDK_COMMIT");
/// The version (commit hash) of IBC Go used when generating this library.
pub const IBC_GO_COMMIT: &str = include_str!("IBC_GO_COMMIT");

/// The version (commit hash) of Interchain Security used when generating this library.
pub const INTERCHAIN_SECURITY_COMMIT: &str = include_str!("INTERCHAIN_SECURITY_COMMIT");

/// File descriptor set of compiled proto.
#[cfg(feature = "proto-descriptor")]
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("prost/proto_descriptor.bin");
Expand Down Expand Up @@ -63,11 +67,6 @@ pub mod cosmos {
}
}
}
pub mod evidence {
pub mod v1beta1 {
include_proto!("cosmos.evidence.v1beta1.rs");
}
}
pub mod staking {
pub mod v1beta1 {
include_proto!("cosmos.staking.v1beta1.rs");
Expand Down
18 changes: 0 additions & 18 deletions src/prost/cosmos.evidence.v1beta1.rs

This file was deleted.

4 changes: 4 additions & 0 deletions src/prost/google.protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,10 @@ pub mod generated_code_info {
///
#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
#[derive(Eq)]
#[cfg_attr(
all(feature = "json-schema", feature = "serde"),
derive(::schemars::JsonSchema)
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Any {
Expand Down
Loading

0 comments on commit 874dff8

Please sign in to comment.