Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ibc): Bump IBC to v3 and update associated upgrade tests [DEV-807] #334

Merged
merged 21 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 34 additions & 17 deletions tests/e2e-complex/ibc-defi/cheqd/cheqd.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
##### Build container #####

FROM golang:buster as builder
FROM golang:1.17.8-buster as builder

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
curl \
protobuf-compiler \
libprotobuf-dev \
wget \
git \
nano

# Starport
# RUN curl https://get.starport.network/starport! | bash
# There is an issue with the latest starport, especially 0.18 version
curl \
protobuf-compiler \
libprotobuf-dev \
wget \
git \
nano \
&& rm -rf /var/lib/apt/lists/*

# Get go protoc compiler plugins. Taken from: tendermintdev/sdk-proto-gen:v0.2
ENV GOLANG_PROTOBUF_VERSION=1.3.5 \
GOGO_PROTOBUF_VERSION=1.3.2 \
GRPC_GATEWAY_VERSION=1.14.7

RUN go get \
github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} \
github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest

# Install buf
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

RUN wget -qO- https://github.com/tendermint/starport/releases/download/v0.18.6/starport_0.18.6_linux_amd64.tar.gz | tar xvz -C /tmp/ && cp /tmp/starport /usr/bin
RUN PREFIX="/usr/local" && \
VERSION="1.0.0-rc8" && \
curl -sSL "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m).tar.gz" | \
tar -xvzf - -C "${PREFIX}" --strip-components 1

# App
# Fetch and build app
WORKDIR /app

RUN git clone --depth 1 --branch v0.3.1 https://github.com/cheqd/cheqd-node
RUN git clone --depth 1 --branch v0.5.0 https://github.com/cheqd/cheqd-node

WORKDIR /app/cheqd-node

RUN starport chain build
RUN make proto-gen build


##### Run container #####
Expand All @@ -40,7 +57,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
netcat

# Node binary
COPY --from=builder /go/bin/cheqd-noded /bin
COPY --from=builder /app/cheqd-node/build/cheqd-noded /bin

RUN groupadd --system --gid 1000 cheqd && \
useradd --system --create-home --home-dir /cheqd --shell /bin/bash --gid cheqd --uid 1000 cheqd
Expand Down
9 changes: 6 additions & 3 deletions tests/e2e-complex/ibc-defi/hermes/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ enabled = false
enabled = true
clear_interval = 100
clear_on_start = true
filter = false
tx_confirmation = true

[rest]
Expand All @@ -44,12 +43,14 @@ account_prefix = 'cheqd'
key_name = 'cheqd-key'
address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'
max_gas = 3000000
default_gas = 100000
max_gas = 400000
ankurdotb marked this conversation as resolved.
Show resolved Hide resolved
gas_price = { price = 25, denom = 'ncheq' }
gas_adjustment = 0.1
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '30s'
trusting_period = '14days'
trust_threshold = { numerator = '1', denominator = '3' }

Expand All @@ -62,12 +63,14 @@ rpc_timeout = '10s'
account_prefix = 'osmo'
key_name = 'osmosis-key'
store_prefix = 'ibc'
max_gas = 3000000
default_gas = 100000
max_gas = 400000
gas_price = { price = 0, denom = 'stake' }
gas_adjustment = 0.1
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '30s'
trusting_period = '14days'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }
2 changes: 1 addition & 1 deletion tests/e2e-complex/ibc-defi/hermes/hermes.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

WORKDIR /app

RUN git clone --depth 1 --branch v0.9.0 https://github.com/informalsystems/ibc-rs
RUN git clone --depth 1 --branch v0.15.0 https://github.com/informalsystems/ibc-rs

WORKDIR /app/ibc-rs

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-complex/ibc-defi/ibc-transfer-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ docker-compose exec hermes hermes keys restore cheqd --mnemonic "$CHEQD_RELAYER_
docker-compose exec hermes hermes keys restore osmosis --mnemonic "$OSMOSIS_RELAYER_MNEMONIC" --name osmosis-key

info "Open channel" # ---
docker-compose exec hermes hermes create channel cheqd osmosis --port-a transfer --port-b transfer
docker-compose exec hermes hermes create channel cheqd --chain-b osmosis --port-a transfer --port-b transfer --new-client-connection -y

info "Start hermes" # ---
docker-compose exec -d hermes hermes start
Expand Down
10 changes: 8 additions & 2 deletions tests/e2e-complex/ibc-defi/osmosis/osmosis.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
git \
jq


# From https://github.com/CosmWasm/wasmd/blob/master/Dockerfile
# For more details see https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0-beta7/libwasmvm_muslc.a /lib/libwasmvm_muslc.a


# App
WORKDIR /app

RUN git clone --depth 1 --branch v4.2.0 https://github.com/osmosis-labs/osmosis
RUN git clone --depth 1 --branch v8.0.0 https://github.com/osmosis-labs/osmosis
ankurdotb marked this conversation as resolved.
Show resolved Hide resolved

WORKDIR /app/osmosis

RUN make install
RUN BUILD_TAGS=muslc make install


##### Run container #####
Expand Down