Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
deps: bump ibc-rs deps to reflect changes in v0.48.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Nov 27, 2023
1 parent 7d92f33 commit 1aac601
Show file tree
Hide file tree
Showing 30 changed files with 847 additions and 370 deletions.
469 changes: 433 additions & 36 deletions Cargo.lock

Large diffs are not rendered by default.

76 changes: 35 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,55 +1,49 @@
[workspace]
resolver = "2"
members = ["modules/sov-ibc", "modules/sov-ibc-transfer", "mocks"]
members = ["modules/sov-ibc", "modules/sov-ibc-transfer", "mocks"]

[workspace.package]
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["Informal Systems <[email protected]>"]
publish = false
repository = "https://github.com/informalsystems/sovereign-ibc"
version = "0.1.0"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.66"
publish = false
authors = ["Informal Systems <[email protected]>"]
repository = "https://github.com/informalsystems/sovereign-ibc"

[workspace.dependencies]

# external dependencies
anyhow = "1.0.68"
borsh = { version = "0.10.3", features = ["rc", "bytes"] }
bytes = "1.2.1"
anyhow = "1.0.68"
borsh = { version = "0.10.3", features = ["rc", "bytes"] }
bytes = "1.2.1"
derive_more = { version = "0.99.11", features = ["from", "try_into"] }
digest = "0.10.6"
hex = "0.4.3"
jsonrpsee = { version = "0.20.1", features = [
"jsonrpsee-types",
"macros",
"client",
"server",
] }
prost = { version = "0.12", default-features = false }
serde = { version = "1.0.188", features = ["derive", "rc"] }
serde_json = "1.0"
schemars = { version = "0.8.12", features = ["derive"] }
tempfile = "3.5"
thiserror = "1.0.38"
digest = "0.10.6"
hex = "0.4.3"
jsonrpsee = { version = "0.20.1", features = ["jsonrpsee-types", "macros", "client", "server"] }
prost = { version = "0.12", default-features = false }
serde = { version = "1.0.188", features = ["derive", "rc"] }
serde_json = "1.0"
schemars = { version = "0.8.12", features = ["derive"] }
tempfile = "3.5"
thiserror = "1.0.38"

# ibc depedenencies
ibc = { git = "https://github.com/cosmos/ibc-rs", rev = "b7dd19d", features = [
"borsh",
"schema",
"serde",
] }
ibc-query = { git = "https://github.com/cosmos/ibc-rs", rev = "b7dd19d" }
ibc-core = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false, features = ["borsh","schema","serde"] }
ibc-core-host-cosmos = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false }
ibc-client-tendermint = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false }
ibc-app-transfer = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false }
ibc-query = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false }
ibc-testkit = { git = "https://github.com/cosmos/ibc-rs", rev = "8e9213d", default-features = false }

# tendermint dependencies
tendermint = { version = "0.34", default-features = false }
tendermint-proto = { version = "0.34", default-features = false }
tendermint-testgen = { version = "0.34", default-features = false }
# cosmos dependencies
tendermint = { version = "0.34", default-features = false }
tendermint-proto = { version = "0.34", default-features = false }
tendermint-testgen = { version = "0.34", default-features = false }

# sovereign dependencies
sov-bank = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-chain-state = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-modules-api = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-modules-macros = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-state = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-rollup-interface = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-bank = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-chain-state = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-modules-api = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-modules-macros = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-state = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
sov-rollup-interface = { git = "https://github.com/informalsystems/sovereign-sdk.git", rev = "876eb0b" }
50 changes: 28 additions & 22 deletions mocks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
[package]
name = "sov-ibc-mocks"
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
readme = "README.md"
publish = false
resolver = "2"
version = { workspace = true }
readme = "README.md"
publish = false
resolver = "2"

[dependencies]
# external dependencies
prost = { workspace = true }
prost = { workspace = true }
serde_json = { workspace = true }
tokio = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tower-abci = "0.11"
tower = { version = "0.4", features = ["full"] }
tempfile = { workspace = true }
tower = { version = "0.4", features = ["full"] }
tempfile = { workspace = true }

# internal dependencies
sov-ibc = { path = "../modules/sov-ibc" }
sov-ibc-transfer = { path = "../modules/sov-ibc-transfer" }

# ibc dependencies
ibc = { workspace = true, features = ["mocks"] }
ibc-proto = { version = "0.37.1", default-features = false, features = ["borsh"] }
basecoin-app = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "823f846" }
basecoin-store = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "823f846" }
tendermint = { workspace = true }
tendermint-testgen = { workspace = true }
ibc-core = { workspace = true }
ibc-app-transfer = { workspace = true }
ibc-client-tendermint = { workspace = true }
ibc-core-host-cosmos = { workspace = true }
ibc-testkit = { workspace = true }
ibc-proto = { version = "0.38.0", default-features = false, features = ["borsh"] }

# cosmos dependencies
basecoin-app = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "d1cd0d7" }
basecoin-store = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "d1cd0d7" }
tendermint = { workspace = true }
tendermint-testgen = { workspace = true }

# sovereign dependencies
sov-bank = { workspace = true }
sov-chain-state = { workspace = true }
sov-modules-api = { workspace = true }
sov-state = { workspace = true }
sov-bank = { workspace = true }
sov-chain-state = { workspace = true }
sov-modules-api = { workspace = true }
sov-state = { workspace = true }
sov-rollup-interface = { workspace = true, features = ["mocks"] }

[features]
Expand Down
50 changes: 25 additions & 25 deletions mocks/src/cosmos/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ use basecoin_app::{BaseCoinApp, Builder};
use basecoin_store::context::{ProvableStore, Store};
use basecoin_store::impls::RevertibleStore;
use basecoin_store::utils::SharedRwExt;
use ibc::clients::ics07_tendermint::client_type as tm_client_type;
use ibc::clients::ics07_tendermint::consensus_state::ConsensusState as TmConsensusState;
use ibc::core::ics02_client::client_state::ClientStateCommon;
use ibc::core::ics02_client::ClientExecutionContext;
use ibc::core::ics03_connection::connection::{
ConnectionEnd, Counterparty as ConnCounterparty, State as ConnectionState,
use ibc_client_tendermint::client_state::ClientState as TmClientState;
use ibc_client_tendermint::types::{
client_type as tm_client_type, ConsensusState as TmConsensusState,
};
use ibc::core::ics03_connection::version::Version as ConnectionVersion;
use ibc::core::ics04_channel::channel::{
use ibc_core::channel::types::channel::{
ChannelEnd, Counterparty as ChanCounterparty, Order, State as ChannelState,
};
use ibc::core::ics04_channel::packet::Sequence;
use ibc::core::ics04_channel::Version as ChannelVersion;
use ibc::core::ics23_commitment::commitment::CommitmentProofBytes;
use ibc::core::ics24_host::identifier::{ChainId, ChannelId, ClientId, ConnectionId, PortId};
use ibc::core::ics24_host::path::{
use ibc_core::channel::types::Version as ChannelVersion;
use ibc_core::client::context::client_state::ClientStateCommon;
use ibc_core::client::context::ClientExecutionContext;
use ibc_core::client::types::Height;
use ibc_core::commitment_types::commitment::CommitmentProofBytes;
use ibc_core::connection::types::version::Version as ConnectionVersion;
use ibc_core::connection::types::{
ConnectionEnd, Counterparty as ConnCounterparty, State as ConnectionState,
};
use ibc_core::host::types::identifiers::{
ChainId, ChannelId, ClientId, ConnectionId, PortId, Sequence,
};
use ibc_core::host::types::path::{
ChannelEndPath, ClientConsensusStatePath, ClientStatePath, ConnectionPath, Path, SeqAckPath,
SeqRecvPath, SeqSendPath,
};
use ibc::core::{ExecutionContext, ValidationContext};
use ibc::hosts::tendermint::IBC_QUERY_PATH;
use ibc::Height;
use ibc_core::host::{ExecutionContext, ValidationContext};
use ibc_core_host_cosmos::IBC_QUERY_PATH;
use tendermint::abci::request::{InitChain, Query};
use tendermint::block::Height as TmHeight;
use tendermint::v0_37::abci::{Request as AbciRequest, Response as AbciResponse};
Expand Down Expand Up @@ -288,7 +291,7 @@ impl<S: ProvableStore + Default + Debug> MockCosmosChain<S> {
let client_state =
dummy_tm_client_state(self.chain_id.clone(), Height::new(0, 10).unwrap());

let latest_height = client_state.latest_height();
let latest_height = TmClientState::from(client_state.clone()).latest_height();

self.ibc_ctx()
.store_update_time(
Expand All @@ -309,17 +312,14 @@ impl<S: ProvableStore + Default + Debug> MockCosmosChain<S> {
self.ibc_ctx().increase_client_counter().unwrap();

self.ibc_ctx()
.store_client_state(client_state_path, client_state)
.store_client_state(client_state_path, client_state.into())
.unwrap();

let consensus_state_path =
ClientConsensusStatePath::new(&client_id, &Height::new(0, 10).unwrap());
let consensus_state_path = ClientConsensusStatePath::new(client_id.clone(), 0, 10);

let consensus_state = AnyConsensusState::Tendermint(TmConsensusState::new(
vec![].into(),
Time::now(),
Hash::None,
));
let consensus_state = AnyConsensusState::Tendermint(
TmConsensusState::new(vec![].into(), Time::now(), Hash::None).into(),
);

self.ibc_ctx()
.store_consensus_state(consensus_state_path, consensus_state)
Expand Down
2 changes: 1 addition & 1 deletion mocks/src/cosmos/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::str::FromStr;
use std::sync::Arc;

use basecoin_store::context::ProvableStore;
use ibc::core::ics24_host::identifier::ChainId;
use ibc_core::host::types::identifiers::ChainId;
use tendermint_testgen::Validator;
use tokio::runtime::Runtime;

Expand Down
10 changes: 5 additions & 5 deletions mocks/src/cosmos/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::fmt::Debug;
use basecoin_app::modules::ibc::{AnyConsensusState, IbcContext};
use basecoin_store::context::ProvableStore;
use basecoin_store::impls::RevertibleStore;
use ibc::clients::ics07_tendermint::header::Header;
use ibc::core::events::IbcEvent;
use ibc::core::ics24_host::identifier::ChainId;
use ibc::proto::Any;
use ibc::Height;
use ibc_client_tendermint::types::Header;
use ibc_core::client::types::Height;
use ibc_core::handler::types::events::IbcEvent;
use ibc_core::host::types::identifiers::ChainId;
use ibc_core::primitives::proto::Any;

use super::app::MockCosmosChain;
use crate::relayer::handle::Handle;
Expand Down
4 changes: 2 additions & 2 deletions mocks/src/cosmos/helpers/convert.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ibc::core::ics23_commitment::merkle::MerkleProof;
use ibc::proto::core::commitment::v1::MerkleProof as RawMerkleProof;
use ibc_core::commitment_types::merkle::MerkleProof;
use ibc_core::commitment_types::proto::v1::MerkleProof as RawMerkleProof;
use ibc_proto::ics23::CommitmentProof;
use tendermint::merkle::proof::ProofOps;

Expand Down
9 changes: 4 additions & 5 deletions mocks/src/cosmos/helpers/dummy.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::time::Duration;

use ibc::clients::ics07_tendermint::client_state::{AllowUpdate, ClientState};
use ibc::core::ics24_host::identifier::ChainId;
use ibc::Height;
use ibc_client_tendermint::types::{AllowUpdate, ClientState};
use ibc_core::client::types::Height;
use ibc_core::host::types::identifiers::ChainId;
use ibc_core::primitives::Signer;

pub fn dummy_tm_client_state(chain_id: ChainId, latest_hight: Height) -> ClientState {
ClientState::new(
Expand All @@ -22,8 +23,6 @@ pub fn dummy_tm_client_state(chain_id: ChainId, latest_hight: Height) -> ClientS
.unwrap()
}

use ibc::Signer;

pub fn genesis_app_state() -> serde_json::Value {
serde_json::json!({
"cosmos12xpmzmfpf7tn57xg93rne2hc2q26lcfql5efws": {
Expand Down
2 changes: 1 addition & 1 deletion mocks/src/relayer/context.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use ibc::Signer;
use ibc_core::primitives::Signer;

use super::handle::{Handle, QueryService};

Expand Down
8 changes: 4 additions & 4 deletions mocks/src/relayer/handle.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::sync::Arc;

use ibc::core::ics24_host::identifier::ChainId;
use ibc::core::ValidationContext;
use ibc::proto::Any;
use ibc::Height;
use ibc_core::client::types::Height;
use ibc_core::host::types::identifiers::ChainId;
use ibc_core::host::ValidationContext;
use ibc_core::primitives::proto::Any;

/// Defines the interface that empowers a chain context with the ability to
/// query different states of a chain.
Expand Down
23 changes: 11 additions & 12 deletions mocks/src/relayer/relay.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
use std::sync::Arc;

use ibc::clients::ics07_tendermint::client_type as tm_client_type;
use ibc::core::ics02_client::client_state::ClientStateCommon;
use ibc::core::ics02_client::msgs::create_client::MsgCreateClient;
use ibc::core::ics02_client::msgs::update_client::MsgUpdateClient;
use ibc::core::ics04_channel::msgs::MsgRecvPacket;
use ibc::core::ics04_channel::packet::{Packet, Sequence};
use ibc::core::ics04_channel::timeout::TimeoutHeight;
use ibc::core::ics24_host::identifier::{ChannelId, ClientId, PortId};
use ibc::core::ics24_host::path::ReceiptPath;
use ibc::core::timestamp::Timestamp;
use ibc::core::{Msg, ValidationContext};
use ibc::{Height, Signer};
use ibc_client_tendermint::types::client_type as tm_client_type;
use ibc_core::channel::types::msgs::MsgRecvPacket;
use ibc_core::channel::types::packet::Packet;
use ibc_core::channel::types::timeout::TimeoutHeight;
use ibc_core::client::context::client_state::ClientStateCommon;
use ibc_core::client::types::msgs::{MsgCreateClient, MsgUpdateClient};
use ibc_core::client::types::Height;
use ibc_core::host::types::identifiers::{ChannelId, ClientId, PortId, Sequence};
use ibc_core::host::types::path::ReceiptPath;
use ibc_core::host::ValidationContext;
use ibc_core::primitives::{Msg, Signer, Timestamp};
use sov_ibc::call::CallMessage;
use sov_modules_api::default_context::DefaultContext;

Expand Down
7 changes: 3 additions & 4 deletions mocks/src/setup.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use std::time::Duration;

use basecoin_store::impls::InMemoryStore;
use ibc::clients::ics07_tendermint::client_type as tm_client_type;
use ibc::core::ics04_channel::packet::Sequence;
use ibc::core::ics24_host::identifier::ClientId;
use ibc::core::ValidationContext;
use ibc_client_tendermint::types::client_type as tm_client_type;
use ibc_core::host::types::identifiers::{ClientId, Sequence};
use ibc_core::host::ValidationContext;
use tokio::time::sleep;

use super::cosmos::helpers::dummy_signer;
Expand Down
Loading

0 comments on commit 1aac601

Please sign in to comment.