Skip to content

Commit

Permalink
Update protobuf and add basic channel with fee test
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen committed May 11, 2022
1 parent b9f3354 commit 9bbc35a
Show file tree
Hide file tree
Showing 20 changed files with 1,236 additions and 325 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,35 @@ jobs:
nix shell .#python .#ica -c cargo \
test -p ibc-integration-test --features ica --no-fail-fast -- \
--nocapture --test-threads=1 test_ica_filter
ics29-fee-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v10
with:
name: cosmos
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: test
args: -p ibc-integration-test --no-fail-fast --no-run
- env:
RUST_LOG: info
RUST_BACKTRACE: 1
NO_COLOR_LOG: 1
CHAIN_COMMAND_PATH: simd
run: |
nix shell .#ibc-go-ics29-simapp -c cargo \
test -p ibc-integration-test --features ics29-fee --no-fail-fast -- \
--nocapture --test-threads=1 test_channel_with_fee
84 changes: 33 additions & 51 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
flake-utils.url = github:numtide/flake-utils;
cosmos-nix.url = github:informalsystems/cosmos.nix;
cosmos-nix.url = github:informalsystems/cosmos.nix/ibc-go-ics29-simapp;
};

outputs = inputs:
Expand Down Expand Up @@ -36,6 +36,8 @@
gaia6-ordered
ibc-go-v2-simapp
ibc-go-v3-simapp
ibc-go-main-simapp
ibc-go-ics29-simapp
;

python = nixpkgs.python3.withPackages (p: [
Expand Down
7 changes: 7 additions & 0 deletions modules/src/core/ics04_channel/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ impl Version {
Self::new(ics20_fungible_token_transfer::VERSION.to_string())
}

pub fn ics20_with_fee() -> Self {
Self::new(format!(
"{{ \"feeVersion\": \"ics29-1\", \"appVersion\": \"{}\" }}",
ics20_fungible_token_transfer::VERSION
))
}

pub fn empty() -> Self {
Self::new("".to_string())
}
Expand Down
2 changes: 1 addition & 1 deletion proto/src/COSMOS_SDK_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2646b474c7beb0c93d4fafd395ef345f41afc251
ad9e5620fb3445c716e9de45cfcdb56e8f1745bf
2 changes: 1 addition & 1 deletion proto/src/IBC_GO_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
55344184b3a5a5eb2ad2a96a7b0f715a210494f9
dcd0681d8f07c624f53b9a9ffe9de2f122486207
56 changes: 56 additions & 0 deletions proto/src/prost/cosmos.base.snapshots.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,59 @@ pub struct Metadata {
#[prost(bytes="vec", repeated, tag="1")]
pub chunk_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// SnapshotItem is an item contained in a rootmulti.Store snapshot.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotItem {
/// item is the specific type of snapshot item.
#[prost(oneof="snapshot_item::Item", tags="1, 2, 3, 4")]
pub item: ::core::option::Option<snapshot_item::Item>,
}
/// Nested message and enum types in `SnapshotItem`.
pub mod snapshot_item {
/// item is the specific type of snapshot item.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Item {
#[prost(message, tag="1")]
Store(super::SnapshotStoreItem),
#[prost(message, tag="2")]
Iavl(super::SnapshotIavlItem),
#[prost(message, tag="3")]
Extension(super::SnapshotExtensionMeta),
#[prost(message, tag="4")]
ExtensionPayload(super::SnapshotExtensionPayload),
}
}
/// SnapshotStoreItem contains metadata about a snapshotted store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotStoreItem {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
/// SnapshotIAVLItem is an exported IAVL node.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotIavlItem {
#[prost(bytes="vec", tag="1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="2")]
pub value: ::prost::alloc::vec::Vec<u8>,
/// version is block height
#[prost(int64, tag="3")]
pub version: i64,
/// height is depth of the tree.
#[prost(int32, tag="4")]
pub height: i32,
}
/// SnapshotExtensionMeta contains metadata about an external snapshotter.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotExtensionMeta {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
pub format: u32,
}
/// SnapshotExtensionPayload contains payloads of an external snapshotter.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotExtensionPayload {
#[prost(bytes="vec", tag="1")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
72 changes: 18 additions & 54 deletions proto/src/prost/cosmos.base.store.v1beta1.rs
Original file line number Diff line number Diff line change
@@ -1,57 +1,3 @@
/// SnapshotItem is an item contained in a rootmulti.Store snapshot.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotItem {
/// item is the specific type of snapshot item.
#[prost(oneof="snapshot_item::Item", tags="1, 2")]
pub item: ::core::option::Option<snapshot_item::Item>,
}
/// Nested message and enum types in `SnapshotItem`.
pub mod snapshot_item {
/// item is the specific type of snapshot item.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Item {
#[prost(message, tag="1")]
Store(super::SnapshotStoreItem),
#[prost(message, tag="2")]
Iavl(super::SnapshotIavlItem),
}
}
/// SnapshotStoreItem contains metadata about a snapshotted store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotStoreItem {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
/// SnapshotIAVLItem is an exported IAVL node.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotIavlItem {
#[prost(bytes="vec", tag="1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag="3")]
pub version: i64,
#[prost(int32, tag="4")]
pub height: i32,
}
/// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
/// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
/// Deletes
///
/// Since: cosmos-sdk 0.43
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreKvPair {
/// the store key for the KVStore this pair originates from
#[prost(string, tag="1")]
pub store_key: ::prost::alloc::string::String,
/// true indicates a delete operation, false indicates a set operation
#[prost(bool, tag="2")]
pub delete: bool,
#[prost(bytes="vec", tag="3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
/// CommitInfo defines commit information used by the multi-store when committing
/// a version/height.
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -79,3 +25,21 @@ pub struct CommitId {
#[prost(bytes="vec", tag="2")]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
/// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
/// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
/// Deletes
///
/// Since: cosmos-sdk 0.43
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreKvPair {
/// the store key for the KVStore this pair originates from
#[prost(string, tag="1")]
pub store_key: ::prost::alloc::string::String,
/// true indicates a delete operation, false indicates a set operation
#[prost(bool, tag="2")]
pub delete: bool,
#[prost(bytes="vec", tag="3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="4")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
Loading

0 comments on commit 9bbc35a

Please sign in to comment.