Skip to content

Commit

Permalink
Updates required to publish ibc on crates.io (#199)
Browse files Browse the repository at this point in the history
* Renaming package to ibc in Cargo.toml #198

* Fixing reference to ibc module dependency #198

* Adding README to ibc (modules) crate. #198

* Updates to README #198

* Update dependencies after changing package name #198

* Updating documentation link name #198
  • Loading branch information
andynog authored Aug 12, 2020
1 parent bf84a73 commit 88dd5a8
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 40 deletions.
18 changes: 12 additions & 6 deletions modules/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
[package]
name = "modules"
version = "0.0.2"
edition = "2018"
authors = [
name = "ibc"
version = "0.0.2"
edition = "2018"
license = "Apache-2.0"
readme = "README.md"
keywords = ["blockchain", "bft", "consensus", "cosmos", "ibc", "tendermint"]
repository = "https://github.com/informalsystems/ibc-rs"
authors = [
"Informal Systems <hello@informal.systems>"
]

description = """
Implementation of the Inter-Blockchain Communication Protocol (IBC).
"""

[dependencies]
tendermint = "0.15.0"
tendermint-rpc = { version = "0.15.0", features=["client"] }
# tendermint = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "master" }
# tendermint-rpc = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "master", features=["client"] }

# Proto definitions for all IBC-related interfaces, e.g., connections or channels.
ibc-proto = "0.1.0"
Expand Down
24 changes: 24 additions & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[![Crate][crate-image]][crate-link]
[![Docs][docs-image]][docs-link]

See the [ibc-rs] repo root for more detailed information on this crate can be used.

# ibc

Implementation of the Inter-Blockchain Communication Protocol ([IBC]).

## Documentation

See documentation on [docs.rs][docs-link].

[//]: # (badges)

[crate-image]: https://img.shields.io/crates/v/ibc.svg
[crate-link]: https://crates.io/crates/ibc
[docs-image]: https://docs.rs/ibc/badge.svg
[docs-link]: https://docs.rs/ibc/

[//]: # (general links)

[ibc-rs]: https://github.com/informalsystems/ibc-rs
[IBC]: https://github.com/cosmos/ics
2 changes: 1 addition & 1 deletion relayer-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [

[dependencies]
relayer = { path = "../relayer" }
modules = { path = "../modules" }
ibc = { path = "../modules" }
tendermint = "0.15.0"

abscissa_tokio = "0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion relayer-cli/src/commands/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use tokio::sync::mpsc::{channel, Sender};
use crate::config::Config;
use ::tendermint::chain::Id as ChainId;
use futures::future::join_all;
use modules::events::IBCEvent;
use ibc::events::IBCEvent;

#[derive(Command, Debug, Options)]
pub struct ListenCmd {
Expand Down
8 changes: 4 additions & 4 deletions relayer-cli/src/commands/query/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use crate::prelude::*;
use abscissa_core::{Command, Options, Runnable};
use relayer::config::{ChainConfig, Config};

use modules::ics04_channel::channel::ChannelEnd;
use modules::ics24_host::identifier::{ChannelId, PortId};
use modules::ics24_host::Path::ChannelEnds;
use ibc::ics04_channel::channel::ChannelEnd;
use ibc::ics24_host::identifier::{ChannelId, PortId};
use ibc::ics24_host::Path::ChannelEnds;

use modules::ics24_host::error::ValidationError;
use ibc::ics24_host::error::ValidationError;
use relayer::chain::{Chain, CosmosSDKChain};
use tendermint::chain::Id as ChainId;

Expand Down
6 changes: 3 additions & 3 deletions relayer-cli/src/commands/query/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use crate::prelude::*;
use abscissa_core::{Command, Options, Runnable};
use relayer::config::{ChainConfig, Config};

use modules::ics24_host::error::ValidationError;
use modules::ics24_host::identifier::ClientId;
use modules::ics24_host::Path::ClientConnections;
use ibc::ics24_host::error::ValidationError;
use ibc::ics24_host::identifier::ClientId;
use ibc::ics24_host::Path::ClientConnections;
use relayer::chain::Chain;
use relayer::chain::CosmosSDKChain;
use tendermint::chain::Id as ChainId;
Expand Down
8 changes: 4 additions & 4 deletions relayer-cli/src/commands/query/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use crate::prelude::*;
use abscissa_core::{Command, Options, Runnable};
use relayer::config::{ChainConfig, Config};

use modules::ics24_host::error::ValidationError;
use modules::ics24_host::identifier::ConnectionId;
use modules::ics24_host::Path::Connections;
use ibc::ics24_host::error::ValidationError;
use ibc::ics24_host::identifier::ConnectionId;
use ibc::ics24_host::Path::Connections;
use relayer::chain::{Chain, CosmosSDKChain};
use tendermint::chain::Id as ChainId;

use modules::ics03_connection::connection::ConnectionEnd;
use ibc::ics03_connection::connection::ConnectionEnd;

#[derive(Clone, Command, Debug, Options)]
pub struct QueryConnectionEndCmd {
Expand Down
20 changes: 10 additions & 10 deletions relayer-cli/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
unused_qualifications
)]

use modules::ics03_connection::connection::ConnectionEnd;
use modules::ics03_connection::exported::Connection;
use modules::ics03_connection::exported::State as ConnectionState;
use modules::ics04_channel::channel::ChannelEnd;
use modules::ics04_channel::exported::Channel;
use modules::ics04_channel::exported::Order;
use modules::ics04_channel::exported::State as ChannelState;
use modules::ics23_commitment::CommitmentPrefix;
use modules::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId};
use modules::ics24_host::Path::{ChannelEnds, ClientConnections, Connections};
use ibc::ics03_connection::connection::ConnectionEnd;
use ibc::ics03_connection::exported::Connection;
use ibc::ics03_connection::exported::State as ConnectionState;
use ibc::ics04_channel::channel::ChannelEnd;
use ibc::ics04_channel::exported::Channel;
use ibc::ics04_channel::exported::Order;
use ibc::ics04_channel::exported::State as ChannelState;
use ibc::ics23_commitment::CommitmentPrefix;
use ibc::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId};
use ibc::ics24_host::Path::{ChannelEnds, ClientConnections, Connections};
use relayer::chain::{Chain, CosmosSDKChain};
use relayer::config::{ChainConfig, Config};
use std::str::FromStr;
Expand Down
2 changes: 1 addition & 1 deletion relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
]

[dependencies]
modules = { path = "../modules" }
ibc = { path = "../modules" }
tendermint = "0.15.0"
tendermint-rpc = { version = "0.15.0", features=["client"] }
anomaly = "0.2.0"
Expand Down
6 changes: 3 additions & 3 deletions relayer/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use ::tendermint::lite::types as tmlite;
use ::tendermint::lite::{self, Height, TrustThresholdFraction};
use ::tendermint_rpc::Client as RpcClient;

use modules::ics02_client::state::{ClientState, ConsensusState};
use modules::ics24_host::Path;
use modules::try_from_raw::TryFromRaw;
use ibc::ics02_client::state::{ClientState, ConsensusState};
use ibc::ics24_host::Path;
use ibc::try_from_raw::TryFromRaw;

use crate::config::ChainConfig;
use crate::error;
Expand Down
8 changes: 4 additions & 4 deletions relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use tendermint::lite::TrustThresholdFraction;
use tendermint_rpc::Client as RpcClient;

use core::future::Future;
use modules::ics07_tendermint::client_state::ClientState;
use modules::ics07_tendermint::consensus_state::ConsensusState;
use modules::ics24_host::{Path, IBC_QUERY_PATH};
use modules::try_from_raw::TryFromRaw;
use ibc::ics07_tendermint::client_state::ClientState;
use ibc::ics07_tendermint::consensus_state::ConsensusState;
use ibc::ics24_host::{Path, IBC_QUERY_PATH};
use ibc::try_from_raw::TryFromRaw;

use crate::client::rpc_requester::RpcRequester;
use crate::config::ChainConfig;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/event_handler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use modules::events::IBCEvent;
use ibc::events::IBCEvent;
use tokio::sync::mpsc::Receiver;

use ::tendermint::chain::Id as ChainId;
Expand Down
4 changes: 2 additions & 2 deletions relayer/src/event_monitor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use modules::events::IBCEvent;
use ibc::events::IBCEvent;
use tendermint::{net, Error as TMError};
use tendermint_rpc::{event_listener, event_listener::EventSubscription};
use tokio::sync::mpsc::Sender;
Expand Down Expand Up @@ -82,7 +82,7 @@ impl EventMonitor {
/// get a TM event and extract the IBC events
pub async fn collect_events(&mut self) -> Result<(), TMError> {
if let Some(tm_event) = self.event_listener.get_event().await? {
if let Ok(ibc_events) = modules::events::get_all_events(tm_event) {
if let Ok(ibc_events) = ibc::events::get_all_events(tm_event) {
// TODO - send_timeout()?
self.channel_to_handler
.send((self.chain_id, ibc_events))
Expand Down

0 comments on commit 88dd5a8

Please sign in to comment.