Skip to content

Commit

Permalink
Update CCV provider protos to include MsgSubmitConsumerDoubleVoting
Browse files Browse the repository at this point in the history
… message (#112)

* Update ICS protos to include misbehaviour messages

* Update ICS protos to ea545b490b53b8e6f422492b4fb2820ab0bc140b

* Expose ICS commit as a constant

* Remove now non-existent module `cosmos.evidence.v1beta1`

* Rename `COSMOS_ICS_COMMIT` to `INTERCHAIN_SECURITY_COMMIT`

* Add changelog entry
  • Loading branch information
romac authored Oct 19, 2023
1 parent 1aced72 commit 4c01cd4
Show file tree
Hide file tree
Showing 10 changed files with 493 additions and 251 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/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))
12 changes: 6 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 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
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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 +66,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.

Loading

0 comments on commit 4c01cd4

Please sign in to comment.