Skip to content

Commit

Permalink
Upgrade gaia release on CI and allow multiple e2e tests (current and …
Browse files Browse the repository at this point in the history
…future release) (informalsystems#1557)

* Logic to support e2e tests for current gaia v5.0.8 and future gaia v6.0.0-rc1 informalsystems#1408

* Rename workflows to reflect e2e current and future gaia informalsystems#1408

* Remove v6.0.0-rc1 since there is a rc2 informalsystems#1408

* Updated to gaia v6.0.0-rc2 informalsystems#1408

* Modify logic to handle gaia v6.0.0 output informalsystems#1408

* Add version to workflows informalsystems#1557

* Adding gaia v6.0.0-rc3 to CI (informalsystems#1557)

* Removed gaia v6.0.0-rc2 from CI (informalsystems#1557)
  • Loading branch information
andynog committed Nov 24, 2021
1 parent 5864ea6 commit fdb43c6
Show file tree
Hide file tree
Showing 73 changed files with 4,002 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: End to End testing
name: End to End testing (Gaia - v5.0.8)
on:
pull_request:
paths:
Expand Down Expand Up @@ -35,7 +35,7 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
test-end-to-end:
test-end-to-end-current-gaia:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand All @@ -50,8 +50,8 @@ jobs:
args: --workspace
- run: cp ./target/debug/hermes .
- name: Build relayer image
run: docker-compose -f ci/docker-compose.yml build relayer
run: docker-compose -f ci/docker-compose-gaia-current.yml build relayer
- name: Start chains and relayer
run: docker-compose -f ci/docker-compose.yml up -d ibc-0 ibc-1 relayer
run: docker-compose -f ci/docker-compose-gaia-current.yml up -d ibc-0 ibc-1 relayer
- name: Run relayer workflow
run: docker exec relayer /bin/sh -c /relayer/e2e.sh
58 changes: 58 additions & 0 deletions .github/workflows/e2e-gaia-future-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: End to End testing (Gaia - v6.0.0-rc3)
on:
pull_request:
paths:
- .github/workflows/e2e.yaml
- Cargo.toml
- ci/**
- e2e/**
- proto/**
- modules/**
- relayer/**
- relayer-cli/**
- relayer-rest/**
- telemetry/**
push:
branches: master
paths:
- .github/workflows/e2e.yaml
- Cargo.toml
- ci/**
- e2e/**
- proto/**
- modules/**
- relayer/**
- relayer-cli/**
- relayer-rest/**
- telemetry/**

env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

jobs:
test-end-to-end-future-gaia:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
- run: cp ./target/debug/hermes .
- name: Build relayer image
run: docker-compose -f ci/docker-compose-gaia-future.yml build relayer
- name: Start chains and relayer
run: docker-compose -f ci/docker-compose-gaia-future.yml up -d ibc-0 ibc-1 relayer
- name: Run relayer workflow
continue-on-error: true
run: docker exec relayer /bin/sh -c /relayer/e2e.sh
10 changes: 10 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,13 @@ And in the relayer service:
args:
RELEASE: v4.0.0
```

6. Update the CI workflows

In the file `.github\workflows\e2e-gaia-future-release.yaml` update the name with the future version of gaia used

`name: End to End testing (Gaia - v6.0.0-rc3)`

And in `.github\workflows\e2e-gaia-current-release.yaml` do the same thing

`name: End to End testing (Gaia - v5.0.8)`
9 changes: 7 additions & 2 deletions ci/build-ibc-chains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ set -eou pipefail
## After updating the gaia version below, double-check the following (see readme.md also):
## - the new version made it to docker hub, and is available for download, e.g. `docker pull informaldev/ibc-1:v4.0.0`
## - the image versions and the relayer release in `docker-compose.yml` are consistent with the new version
GAIA_BRANCH="v5.0.5" # Requires a version with the `--keyring-backend` option. v2.1 and above.

# For building current gaia use this
# GAIA_BRANCH="v5.0.8" # Requires a version with the `--keyring-backend` option. v2.1 and above.

# For future gaia use this
GAIA_BRANCH="v6.0.0-rc3" # Requires a version with the `--keyring-backend` option. v2.1 and above.

# Check if gaiad is installed and if the versions match
if ! [ -x "$(command -v gaiad)" ]; then
echo 'Error: gaiad is not installed.' >&2
exit 1
fi

CURRENT_GAIA="$(gaiad version)"
CURRENT_GAIA="$(gaiad version 2>&1)"
echo "Current Gaia Version: $CURRENT_GAIA"

if [ "$GAIA_BRANCH" != "$CURRENT_GAIA" ]; then
Expand Down
4 changes: 4 additions & 0 deletions ci/chains/gaia/v5.0.8/ibc-0/config/addrbook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"key": "82c133df9d6d66a97fe64ae9",
"addrs": []
}
152 changes: 152 additions & 0 deletions ci/chains/gaia/v5.0.8/ibc-0/config/app.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml

###############################################################################
### Base Configuration ###
###############################################################################

# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = ""

# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals
# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node)
# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals
# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval'
pruning = "default"

# These are applied if and only if the pruning strategy is custom.
pruning-keep-recent = "0"
pruning-keep-every = "0"
pruning-interval = "0"

# HaltHeight contains a non-zero block height at which a node will gracefully
# halt and shutdown that can be used to assist upgrades and testing.
#
# Note: Commitment of state will be attempted on the corresponding block.
halt-height = 0

# HaltTime contains a non-zero minimum block time (in Unix seconds) at which
# a node will gracefully halt and shutdown that can be used to assist upgrades
# and testing.
#
# Note: Commitment of state will be attempted on the corresponding block.
halt-time = 0

# MinRetainBlocks defines the minimum block height offset from the current
# block being committed, such that all blocks past this offset are pruned
# from Tendermint. It is used as part of the process of determining the
# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates
# that no blocks should be pruned.
#
# This configuration value is only responsible for pruning Tendermint blocks.
# It has no bearing on application state pruning which is determined by the
# "pruning-*" configurations.
#
# Note: Tendermint block pruning is dependant on this parameter in conunction
# with the unbonding (safety threshold) period, state pruning and state sync
# snapshot parameters to determine the correct minimum value of
# ResponseCommit.RetainHeight.
min-retain-blocks = 0

# InterBlockCache enables inter-block caching.
inter-block-cache = true

# IndexEvents defines the set of events in the form {eventType}.{attributeKey},
# which informs Tendermint what to index. If empty, all events will be indexed.
#
# Example:
# ["message.sender", "message.recipient"]
index-events = []

###############################################################################
### Telemetry Configuration ###
###############################################################################

[telemetry]

# Prefixed with keys to separate services.
service-name = ""

# Enabled enables the application telemetry functionality. When enabled,
# an in-memory sink is also enabled by default. Operators may also enabled
# other sinks such as Prometheus.
enabled = false

# Enable prefixing gauge values with hostname.
enable-hostname = false

# Enable adding hostname to labels.
enable-hostname-label = false

# Enable adding service to labels.
enable-service-label = false

# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink.
prometheus-retention-time = 0

# GlobalLabels defines a global set of name/value label tuples applied to all
# metrics emitted using the wrapper functions defined in telemetry package.
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = [
]

###############################################################################
### API Configuration ###
###############################################################################

[api]

# Enable defines if the API server should be enabled.
enable = false

# Swagger defines if swagger documentation should automatically be registered.
swagger = false

# Address defines the API server to listen on.
address = "tcp://0.0.0.0:1317"

# MaxOpenConnections defines the number of maximum open connections.
max-open-connections = 1000

# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds).
rpc-read-timeout = 10

# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds).
rpc-write-timeout = 0

# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes).
rpc-max-body-bytes = 1000000

# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
enabled-unsafe-cors = false

###############################################################################
### gRPC Configuration ###
###############################################################################

[grpc]

# Enable defines if the gRPC server should be enabled.
enable = true

# Address defines the gRPC server address to bind to.
address = "0.0.0.0:9090"

###############################################################################
### State Sync Configuration ###
###############################################################################

# State sync snapshots allow other nodes to rapidly join the network without replaying historical
# blocks, instead downloading and applying a snapshot of the application state at a given height.
[state-sync]

# snapshot-interval specifies the block interval at which local state sync snapshots are
# taken (0 to disable). Must be a multiple of pruning-keep-every.
snapshot-interval = 0

# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all).
snapshot-keep-recent = 2
17 changes: 17 additions & 0 deletions ci/chains/gaia/v5.0.8/ibc-0/config/client.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml

###############################################################################
### Client Configuration ###
###############################################################################

# The network chain ID
chain-id = ""
# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory)
keyring-backend = "os"
# CLI output format (text|json)
output = "text"
# <host>:<port> to Tendermint RPC interface for this chain
node = "tcp://localhost:26657"
# Transaction broadcasting mode (sync|async|block)
broadcast-mode = "sync"
Loading

0 comments on commit fdb43c6

Please sign in to comment.