-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add relayers to integration tests framework (#1258)
- Loading branch information
Showing
18 changed files
with
536 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HOSTNAME=stride-validator-0 | ||
CHAIN_NAME=stride | ||
CHAIN_HOME=.stride | ||
BINARY=strided | ||
DENOM=ustrd | ||
DENOM_DECIMALS=6 | ||
NUM_VALIDATORS=3 | ||
|
||
API_ENDPOINT=http://api:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
api: | ||
image: gcr.io/stride-nodes/integration-tests/api:latest | ||
ports: | ||
- '8000:8000' | ||
init-chain: | ||
image: gcr.io/stride-nodes/integration-tests/chains/stride:latest | ||
depends_on: | ||
- api | ||
volumes: | ||
- ./network/scripts:/home/validator/scripts | ||
- ./network/configs:/home/validator/configs | ||
env_file: | ||
- .env.local | ||
command: ["bash", "scripts/init-chain.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM rust:1.71-buster as builder | ||
|
||
COPY --from=informalsystems/hermes:v1.9.0 /usr/bin/hermes /usr/bin/hermes | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y iputils-ping ca-certificates libssl-dev bash vim curl jq \ | ||
&& addgroup --gid 1000 hermes \ | ||
&& adduser --system --home /home/hermes --disabled-password --disabled-login \ | ||
--uid 1000 --ingroup hermes hermes | ||
|
||
USER hermes | ||
WORKDIR /home/hermes | ||
|
||
CMD ["bash", "scripts/start-hermes.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM golang:1.21-alpine3.17 AS builder | ||
|
||
WORKDIR /src/ | ||
|
||
ENV COMMIT_HASH=v2.5.2 | ||
|
||
RUN apk add --update git make gcc linux-headers libc-dev eudev-dev | ||
RUN git clone https://github.com/cosmos/relayer.git \ | ||
&& cd relayer \ | ||
&& git checkout ${COMMIT_HASH} \ | ||
&& CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"' make install | ||
|
||
FROM alpine:3.17 | ||
|
||
COPY --from=builder /go/bin/rly /usr/local/bin/ | ||
RUN apk add --no-cache --update bash vim curl iputils jq yq \ | ||
&& addgroup -g 1000 relayer \ | ||
&& adduser -S -h /home/relayer -D relayer -u 1000 -G relayer | ||
|
||
USER relayer | ||
WORKDIR /home/relayer | ||
|
||
CMD ["bash", "scripts/start-relayer.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[global] | ||
log_level = 'debug' | ||
|
||
[mode] | ||
[mode.clients] | ||
enabled = true | ||
refresh = true | ||
misbehaviour = true | ||
|
||
[mode.connections] | ||
enabled = true | ||
|
||
[mode.channels] | ||
enabled = true | ||
|
||
[mode.packets] | ||
enabled = true | ||
clear_interval = 100 | ||
clear_on_start = true | ||
|
||
[rest] | ||
enabled = false | ||
host = '0.0.0.0' | ||
port = 3000 | ||
|
||
[telemetry] | ||
enabled = false | ||
host = '127.0.0.1' | ||
port = 3001 | ||
|
||
[[chains]] | ||
id = 'stride-test-1' | ||
rpc_addr = 'http://stride-validator.integration.svc:26657' | ||
grpc_addr = 'http://stride-validator.integration.svc:9090' | ||
event_source = { mode = 'push', url = 'ws://stride-validator.integration.svc:26657/websocket', batch_delay = '500ms' } | ||
rpc_timeout = '10s' | ||
account_prefix = 'stride' | ||
key_name = 'stride' | ||
store_prefix = 'ibc' | ||
# TODO: investigate why this has to be set so high | ||
gas_price = { price = 1, denom = 'ustrd' } | ||
gas_multiplier = 1.3 | ||
clock_drift = '10s' | ||
max_block_time = '10s' | ||
address_type = { derivation = 'cosmos' } | ||
memo_prefix = 'stride-tests' | ||
|
||
[[chains]] | ||
id = 'cosmoshub-test-1' | ||
rpc_addr = 'http://cosmoshub-validator.integration.svc:26657' | ||
grpc_addr = 'http://cosmoshub-validator.integration.svc:9090' | ||
event_source = { mode = 'push', url = 'ws://cosmoshub-validator.integration.svc:26657/websocket', batch_delay = '500ms' } | ||
rpc_timeout = '10s' | ||
account_prefix = 'cosmos' | ||
key_name = 'cosmoshub' | ||
store_prefix = 'ibc' | ||
# TODO: investigate why this has to be set so high | ||
gas_price = { price = 1, denom = 'uatom' } | ||
gas_multiplier = 1.3 | ||
clock_drift = '10s' | ||
max_block_time = '10s' | ||
address_type = { derivation = 'cosmos' } | ||
memo_prefix = 'stride-tests' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
global: | ||
api-listen-addr: :5183 | ||
timeout: 10s | ||
memo: stride-tests | ||
light-cache-size: 20 | ||
chains: | ||
stride: | ||
type: cosmos | ||
value: | ||
key: stride | ||
chain-id: stride-test-1 | ||
rpc-addr: http://stride-validator.integration.svc:26657 | ||
account-prefix: stride | ||
keyring-backend: test | ||
gas-adjustment: 1.3 | ||
# TODO: investigate why this has to be set so high | ||
gas-prices: 1ustrd | ||
coin-type: 118 | ||
debug: false | ||
timeout: 20s | ||
output-format: json | ||
sign-mode: direct | ||
min-loop-duration: 1s | ||
cosmoshub: | ||
type: cosmos | ||
value: | ||
key: cosmoshub | ||
chain-id: cosmoshub-test-1 | ||
rpc-addr: http://cosmoshub-validator.integration.svc:26657 | ||
account-prefix: cosmos | ||
keyring-backend: test | ||
gas-adjustment: 1.3 | ||
# TODO: investigate why this has to be set so high | ||
gas-prices: 1uatom | ||
coin-type: 118 | ||
min-loop-duration: 1s | ||
debug: false | ||
timeout: 20s | ||
output-format: json | ||
sign-mode: direct | ||
paths: | ||
stride-cosmoshub: | ||
src: | ||
chain-id: stride-test-1 | ||
dst: | ||
chain-id: cosmoshub-test-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTS_DIR=scripts | ||
CONFIG_DIR=configs | ||
|
||
VALIDATOR_KEYS_DIR=validator-keys | ||
NODE_KEYS_DIR=node-keys | ||
NODE_IDS_DIR=node-ids | ||
GENESIS_DIR=genesis | ||
KEYS_FILE=${CONFIG_DIR}/keys.json | ||
|
||
PEER_PORT=26656 | ||
RPC_PORT=26657 | ||
|
||
API_ENDPOINT=${API_ENDPOINT:-'http://api.integration.svc:8000'} |
Oops, something went wrong.