Skip to content

Commit

Permalink
ci: multichain-testing with go-relayer (#10182)
Browse files Browse the repository at this point in the history
closes: #10179

## Description

Ensures compatibility with [go-relayer](https://github.com/cosmos/relayer) by adding workflow dispatch jobs to `multichain-e2e` for Orchestration API (`config.go-relayer.yaml`) and FastUSDC (`config.fusdc.go-relayer.yaml`). Our existing tests using [hermes](https://github.com/informalsystems/hermes). Scope is mainly for the Orchestration API, but `x/vibc` is also covered to an extent.

Towards this goal:
- enable starship faucet for agoric in all configs (required for `go-relayer`)
- update channel-close tests to use `go-relayer` when `RELAYER_TYPE` env var is present

### Security Considerations
n/a, test code

### Scaling Considerations
Not currently part of integration tests that run on merges to master. 

### Documentation Considerations
Added a section in the `README.md` with instructions for running the tests with `go-relayer`.

### Testing Considerations
Runs existing test suite against `go-relayer`, extending our test coverage across to the two main `cosmos-sdk` relayer clients. This should help identify any relayer-specific issues or discrepancies. Please note: these tests will not run on every PR and must be dispatched manually.

### Upgrade Considerations
n/a
  • Loading branch information
mergify[bot] authored Jan 17, 2025
2 parents 44f449b + ca78eab commit fdc566c
Show file tree
Hide file tree
Showing 16 changed files with 506 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/multichain-e2e-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
working-directory: ./agoric-sdk/multichain-testing

- name: Run @agoric/multichain-testing E2E Tests
run: yarn ${{ inputs.test_command }}
run: ${{ inputs.test_command }}
working-directory: ./agoric-sdk/multichain-testing
env:
FILE: ${{ inputs.config }}
Expand Down
48 changes: 42 additions & 6 deletions .github/workflows/multichain-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,55 @@ name: Multichain E2E Tests

on:
workflow_dispatch:
inputs:
test_type:
description: 'Select which test to run'
type: choice
required: true
options:
- orchestration-api-hermes
- fast-usdc-hermes
- orchestration-api-go-relayer
- fast-usdc-go-relayer
workflow_call:

jobs:
orchestration-api-test:
name: Multichain E2E (Orchestration API)
orchestration-api-hermes:
name: Multichain E2E (Orchestration API - Hermes)
if: |
github.event_name == 'workflow_call' ||
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' && inputs.test_type == 'orchestration-api-hermes')
uses: ./.github/workflows/multichain-e2e-template.yml
with:
config: config.yaml
test_command: test:main
test_command: yarn test:main

fast-usdc-test:
name: Multichain E2E (Fast USDC)
fast-usdc-hermes:
name: Multichain E2E (Fast USDC - Hermes)
if: |
github.event_name == 'workflow_call' ||
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' && inputs.test_type == 'fast-usdc-hermes')
uses: ./.github/workflows/multichain-e2e-template.yml
with:
config: config.fusdc.yaml
test_command: test:fast-usdc
test_command: yarn test:fast-usdc

orchestration-api-go-relayer:
name: Multichain E2E (Orchestration API - Go Relayer)
# run on dispatch only
if: github.event_name == 'workflow_dispatch' && inputs.test_type == 'orchestration-api-go-relayer'
uses: ./.github/workflows/multichain-e2e-template.yml
with:
config: config.go-relayer.yaml
test_command: RELAYER_TYPE=go-relayer yarn test:main

fast-usdc-go-relayer:
name: Multichain E2E (Fast USDC - Go Relayer)
# run on dispatch only
if: github.event_name == 'workflow_dispatch' && inputs.test_type == 'fast-usdc-go-relayer'
uses: ./.github/workflows/multichain-e2e-template.yml
with:
config: config.fusdc.go-relayer.yaml
test_command: RELAYER_TYPE=go-relayer yarn test:fast-usdc
15 changes: 12 additions & 3 deletions multichain-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,17 @@ make tail-slog
kubectl logs agoriclocal-genesis-0 --container=validator --follow

# relayer logs
kubectl logs hermes-agoric-gaia-0 --container=relayer --follow
kubectl logs hermes-osmosis-gaia-0 --container=relayer --follow
kubectl logs hermes-agoric-cosmoshub-0 --container=relayer --follow
kubectl logs hermes-osmosis-cosmoshub-0 --container=relayer --follow
```

## Running with Go Relayer

```sh
# run tests with go-relayer configuration
make start FILE=config.go-relayer.yaml

RELAYER_TYPE=go-relayer yarn test
```

## Agoric Smart Wallet
Expand All @@ -116,6 +125,6 @@ These only work if you've done `make port-forward`.

- http://localhost:8081/chains/agoriclocal
- http://localhost:8081/chains/osmosislocal
- http://localhost:8081/chains/gaialocal
- http://localhost:8081/chains/cosmoshublocal
- http://localhost:8081/chains/agoriclocal/keys
- http://localhost:8081/ibc
112 changes: 112 additions & 0 deletions multichain-testing/config.fusdc.go-relayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: agoric-multichain-testing-fusdc-go-relayer
version: 0.2.20

chains:
- id: agoriclocal
name: agoric
image: ghcr.io/agoric/agoric-sdk:dev
numValidators: 1
env:
- name: DEBUG
value: SwingSet:vat,SwingSet:ls
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
swingset:
params:
bootstrap_vat_config: '@agoric/vm-config/decentral-itest-orchestration-config.json'
scripts:
updateConfig:
file: scripts/update-config.sh
faucet:
enabled: true
type: starship
ports:
rest: 1317
rpc: 26657
exposer: 38087
grpc: 9090
faucet: 8082
resources:
cpu: 1
memory: 4Gi
- id: osmosislocal
name: osmosis
numValidators: 1
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
interchain_accounts:
host_genesis_state:
params:
host_enabled: true
allow_messages: ['*']
interchainquery:
host_port: 'icqhost'
params:
host_enabled: true
allow_queries:
- /cosmos.bank.v1beta1.Query/Balance
- /cosmos.bank.v1beta1.Query/AllBalances
faucet:
enabled: true
type: starship
ports:
rest: 1315
rpc: 26655
grpc: 9093
faucet: 8084
resources:
cpu: 1
memory: 1Gi
- id: noblelocal
name: noble
numValidators: 1
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
faucet:
enabled: true
type: starship
ports:
rest: 1314
rpc: 26654
grpc: 9092
faucet: 8083
resources:
cpu: 1
memory: 1Gi

relayers:
- name: osmosis-noble
type: go-relayer
replicas: 1
chains:
- osmosislocal
- noblelocal
- name: agoric-osmosis
type: go-relayer
replicas: 1
chains:
- agoriclocal
- osmosislocal
- name: agoric-noble
type: go-relayer
replicas: 1
chains:
- agoriclocal
- noblelocal

explorer:
enabled: false

registry:
enabled: true
ports:
rest: 8081
4 changes: 3 additions & 1 deletion multichain-testing/config.fusdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ chains:
updateConfig:
file: scripts/update-config.sh
faucet:
enabled: false
enabled: true
type: starship
ports:
rest: 1317
rpc: 26657
exposer: 38087
grpc: 9090
faucet: 8082
resources:
cpu: 1
memory: 4Gi
Expand Down
117 changes: 117 additions & 0 deletions multichain-testing/config.go-relayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: agoric-multichain-testing-go-relayer
version: 0.2.20

chains:
- id: agoriclocal
name: agoric
image: ghcr.io/agoric/agoric-sdk:dev
numValidators: 1
env:
- name: DEBUG
value: SwingSet:vat,SwingSet:ls
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
swingset:
params:
bootstrap_vat_config: '@agoric/vm-config/decentral-itest-orchestration-config.json'
scripts:
updateConfig:
file: scripts/update-config.sh
faucet:
enabled: true
type: starship
ports:
rest: 1317
rpc: 26657
exposer: 38087
grpc: 9090
faucet: 8082
resources:
cpu: 1
memory: 4Gi
- id: osmosislocal
name: osmosis
numValidators: 1
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
interchain_accounts:
host_genesis_state:
params:
host_enabled: true
allow_messages: ['*']
interchainquery:
host_port: 'icqhost'
params:
host_enabled: true
allow_queries:
- /cosmos.bank.v1beta1.Query/Balance
- /cosmos.bank.v1beta1.Query/AllBalances
faucet:
enabled: true
type: starship
ports:
rest: 1315
rpc: 26655
grpc: 9093
faucet: 8084
resources:
cpu: 1
memory: 1Gi
- id: cosmoshublocal
name: cosmoshub
numValidators: 1
genesis:
app_state:
staking:
params:
unbonding_time: '2m'
interchain_accounts:
host_genesis_state:
params:
host_enabled: true
allow_messages: ['*']
faucet:
enabled: true
type: starship
ports:
rest: 1314
rpc: 26654
grpc: 9092
faucet: 8083
resources:
cpu: 1
memory: 1Gi

relayers:
- name: osmosis-cosmoshub
type: go-relayer
replicas: 1
chains:
- osmosislocal
- cosmoshublocal
- name: agoric-osmosis
type: go-relayer
replicas: 1
chains:
- agoriclocal
- osmosislocal
- name: agoric-cosmoshub
type: go-relayer
replicas: 1
chains:
- agoriclocal
- cosmoshublocal

explorer:
enabled: false

registry:
enabled: true
ports:
rest: 8081
14 changes: 8 additions & 6 deletions multichain-testing/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ chains:
updateConfig:
file: scripts/update-config.sh
faucet:
enabled: false
enabled: true
type: starship
ports:
rest: 1317
rpc: 26657
exposer: 38087
grpc: 9090
faucet: 8082
resources:
cpu: 1
memory: 4Gi
Expand Down Expand Up @@ -61,7 +63,7 @@ chains:
resources:
cpu: 1
memory: 1Gi
- id: gaialocal
- id: cosmoshublocal
name: cosmoshub
numValidators: 1
genesis:
Expand All @@ -87,24 +89,24 @@ chains:
memory: 1Gi

relayers:
- name: osmosis-gaia
- name: osmosis-cosmoshub
type: hermes
replicas: 1
chains:
- osmosislocal
- gaialocal
- cosmoshublocal
- name: agoric-osmosis
type: hermes
replicas: 1
chains:
- agoriclocal
- osmosislocal
- name: agoric-gaia
- name: agoric-cosmoshub
type: hermes
replicas: 1
chains:
- agoriclocal
- gaialocal
- cosmoshublocal

explorer:
enabled: false
Expand Down
Loading

0 comments on commit fdc566c

Please sign in to comment.