Skip to content

Commit

Permalink
Channel open handshake message relaying/CLIs (#403)
Browse files Browse the repository at this point in the history
* Add chan init and try CLIs

* Add ack and confirm CLIs

* Move to tendermint rc3

* Update changelog
  • Loading branch information
ancazamfir authored Nov 19, 2020
1 parent b641f79 commit 0409703
Show file tree
Hide file tree
Showing 46 changed files with 1,153 additions and 244 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Special thanks to external contributors for this release: @CharlyCst ([#347]).
- ICS 4 Domain Types for channel handshakes ([#315])
- [relayer]
- Implement `query_header_at_height` via plain RPC queries (no light client verification) ([#336])
- Implement the relayer logic for connection handshake message ([#358], [#359], [#360])
- Implement the relayer logic for connection handshake messages ([#358], [#359], [#360])
- Implement the relayer logic for channel handshake messages ([#371], [#372], [#373], [#374])
- [relayer-cli]
- Merge light clients config in relayer config and add commands to add/remove light clients ([#348])
- CLI for client update message ([#277])
- Implement the relayer CLI for connection handshake message ([#358], [#359], [#360])
- Implement the relayer CLI for connection handshake messages ([#358], [#359], [#360])
- Implement the relayer CLI for channel handshake messages ([#371], [#372], [#373], [#374])
- [proto-compiler]
- Refactor and allow specifying a commit at which the Cosmos SDK should be checked out ([#366])
- Add a `--tag` option to the `clone-sdk` command to check out a tag instead of a commit ([#369])
Expand All @@ -36,6 +38,11 @@ Special thanks to external contributors for this release: @CharlyCst ([#347]).
[#366]: https://github.com/informalsystems/ibc-rs/issues/366
[#368]: https://github.com/informalsystems/ibc-rs/issues/368
[#369]: https://github.com/informalsystems/ibc-rs/pulls/369
[#371]: https://github.com/informalsystems/ibc-rs/issues/371
[#372]: https://github.com/informalsystems/ibc-rs/issues/372
[#373]: https://github.com/informalsystems/ibc-rs/issues/373
[#374]: https://github.com/informalsystems/ibc-rs/issues/374

[proto-compiler]: https://github.com/informalsystems/ibc-rs/tree/master/proto-compiler

### IMPROVEMENTS
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ members = [

exclude = [
"proto-compiler"
]
]
8 changes: 4 additions & 4 deletions modules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ regex = "1"
bech32 = "0.7.2"

[dependencies.tendermint]
version = "0.17.0-rc2"
version = "=0.17.0-rc3"

[dependencies.tendermint-rpc]
version = "0.17.0-rc2"
version = "=0.17.0-rc3"
features = ["http-client", "websocket-client"]

[dependencies.tendermint-light-client]
version = "0.17.0-rc2"
version = "=0.17.0-rc3"

[dependencies.tendermint-proto]
version = "0.17.0-rc2"
version = "=0.17.0-rc3"

[dev-dependencies]
tokio = { version = "0.2", features = ["macros"] }
Expand Down
8 changes: 4 additions & 4 deletions modules/src/ics02_client/client_def.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use prost_types::Any;
use std::convert::TryFrom;

use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use crate::downcast;
use crate::ics02_client::client_type::ClientType;
Expand Down Expand Up @@ -119,7 +119,7 @@ impl Header for AnyHeader {
}
}

impl DomainType<Any> for AnyHeader {}
impl Protobuf<Any> for AnyHeader {}

impl TryFrom<Any> for AnyHeader {
type Error = Error;
Expand Down Expand Up @@ -185,7 +185,7 @@ impl AnyClientState {
}
}

impl DomainType<Any> for AnyClientState {}
impl Protobuf<Any> for AnyClientState {}

impl TryFrom<Any> for AnyClientState {
type Error = Error;
Expand Down Expand Up @@ -267,7 +267,7 @@ impl AnyConsensusState {
}
}

impl DomainType<Any> for AnyConsensusState {}
impl Protobuf<Any> for AnyConsensusState {}

impl TryFrom<Any> for AnyConsensusState {
type Error = Error;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics02_client/height.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{cmp::Ordering, convert::TryFrom};

use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use crate::ics02_client::error::{Error, Kind};
use ibc_proto::ibc::core::client::v1::Height as RawHeight;
Expand Down Expand Up @@ -87,7 +87,7 @@ impl Ord for Height {
}
}

impl DomainType<RawHeight> for Height {}
impl Protobuf<RawHeight> for Height {}

impl TryFrom<RawHeight> for Height {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics02_client/msgs/create_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::convert::TryFrom;
use std::str::FromStr;

use tendermint::account::Id as AccountId;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use ibc_proto::ibc::core::client::v1::MsgCreateClient as RawMsgCreateClient;

Expand Down Expand Up @@ -87,7 +87,7 @@ impl Msg for MsgCreateAnyClient {
}
}

impl DomainType<RawMsgCreateClient> for MsgCreateAnyClient {}
impl Protobuf<RawMsgCreateClient> for MsgCreateAnyClient {}

impl TryFrom<RawMsgCreateClient> for MsgCreateAnyClient {
type Error = Error;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics02_client/msgs/update_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use std::convert::TryFrom;

use tendermint::account::Id as AccountId;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use ibc_proto::ibc::core::client::v1::MsgUpdateClient as RawMsgUpdateClient;

Expand Down Expand Up @@ -62,7 +62,7 @@ impl Msg for MsgUpdateAnyClient {
}
}

impl DomainType<RawMsgUpdateClient> for MsgUpdateAnyClient {}
impl Protobuf<RawMsgUpdateClient> for MsgUpdateAnyClient {}

impl TryFrom<RawMsgUpdateClient> for MsgUpdateAnyClient {
type Error = Error;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics02_client/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::ics03_connection::error::Kind;
use crate::ics24_host::identifier::ConnectionId;
use std::convert::TryFrom;
use std::str::FromStr;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

//TODO: This might need to be migrated to ibc-proto crate. But ClientConnections (as array of strings)
// might not be part of an official proto file
Expand All @@ -15,7 +15,7 @@ pub struct RawClientConnections {
#[derive(Clone, Debug)]
pub struct ConnectionIds(pub Vec<ConnectionId>);

impl DomainType<RawClientConnections> for ConnectionIds {}
impl Protobuf<RawClientConnections> for ConnectionIds {}

impl TryFrom<RawClientConnections> for ConnectionIds {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::str::FromStr;
use ibc_proto::ibc::core::connection::v1::{
ConnectionEnd as RawConnectionEnd, Counterparty as RawCounterparty,
};
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use crate::ics03_connection::error::{Error, Kind};
use crate::ics03_connection::version::validate_versions;
Expand All @@ -20,7 +20,7 @@ pub struct ConnectionEnd {
versions: Vec<String>,
}

impl DomainType<RawConnectionEnd> for ConnectionEnd {}
impl Protobuf<RawConnectionEnd> for ConnectionEnd {}

impl TryFrom<RawConnectionEnd> for ConnectionEnd {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/msgs/conn_open_ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::convert::{TryFrom, TryInto};
use std::str::FromStr;

use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenAck as RawMsgConnectionOpenAck;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use tendermint::account::Id as AccountId;

Expand Down Expand Up @@ -90,7 +90,7 @@ impl Msg for MsgConnectionOpenAck {
}
}

impl DomainType<RawMsgConnectionOpenAck> for MsgConnectionOpenAck {}
impl Protobuf<RawMsgConnectionOpenAck> for MsgConnectionOpenAck {}

impl TryFrom<RawMsgConnectionOpenAck> for MsgConnectionOpenAck {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/msgs/conn_open_confirm.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::convert::{TryFrom, TryInto};

use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenConfirm as RawMsgConnectionOpenConfirm;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use tendermint::account::Id as AccountId;

Expand Down Expand Up @@ -59,7 +59,7 @@ impl Msg for MsgConnectionOpenConfirm {
}
}

impl DomainType<RawMsgConnectionOpenConfirm> for MsgConnectionOpenConfirm {}
impl Protobuf<RawMsgConnectionOpenConfirm> for MsgConnectionOpenConfirm {}

impl TryFrom<RawMsgConnectionOpenConfirm> for MsgConnectionOpenConfirm {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/msgs/conn_open_init.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::convert::{TryFrom, TryInto};

use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenInit as RawMsgConnectionOpenInit;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use tendermint::account::Id as AccountId;

Expand Down Expand Up @@ -75,7 +75,7 @@ impl Msg for MsgConnectionOpenInit {
}
}

impl DomainType<RawMsgConnectionOpenInit> for MsgConnectionOpenInit {}
impl Protobuf<RawMsgConnectionOpenInit> for MsgConnectionOpenInit {}

impl TryFrom<RawMsgConnectionOpenInit> for MsgConnectionOpenInit {
type Error = anomaly::Error<Kind>;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/msgs/conn_open_try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::convert::{TryFrom, TryInto};
use std::str::FromStr;

use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenTry as RawMsgConnectionOpenTry;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use tendermint::account::Id as AccountId;

Expand Down Expand Up @@ -107,7 +107,7 @@ impl Msg for MsgConnectionOpenTry {
}
}

impl DomainType<RawMsgConnectionOpenTry> for MsgConnectionOpenTry {}
impl Protobuf<RawMsgConnectionOpenTry> for MsgConnectionOpenTry {}

impl TryFrom<RawMsgConnectionOpenTry> for MsgConnectionOpenTry {
type Error = Error;
Expand Down
4 changes: 2 additions & 2 deletions modules/src/ics03_connection/version.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::convert::TryFrom;

use ibc_proto::ibc::core::connection::v1::Version as RawVersion;
use tendermint_proto::DomainType;
use tendermint_proto::Protobuf;

use crate::ics03_connection::error::{Error, Kind};
use std::str::FromStr;
Expand All @@ -14,7 +14,7 @@ struct Version {
features: Vec<String>,
}

impl DomainType<RawVersion> for Version {}
impl Protobuf<RawVersion> for Version {}

impl TryFrom<RawVersion> for Version {
type Error = anomaly::Error<Kind>;
Expand Down
Loading

0 comments on commit 0409703

Please sign in to comment.