Skip to content

Commit 7243674

Browse files
committed
docs: port instructions from multichain-testing/README.md
1 parent 2779d1c commit 7243674

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed

e2e-testing/README.md

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Starship
2+
3+
End-to-end testing environment for fully simulated chains, powered by [Starship](https://docs.cosmology.zone/starship).
4+
5+
## Configuration
6+
7+
The current commands will read from [`config.yaml`](./config.yaml) to build a multi-chain testing environment. Currently, the image includes `agoric`, `osmosis`, and `cosmoshub` chains and a hermes relayer between each.
8+
9+
The `agoric` software revision includes the vats necessary for building and testing orchestration applications:
10+
- vat-network
11+
- vat-ibc
12+
- vat-localchain
13+
- vat-transfer
14+
- vat-orchestration
15+
16+
## Initial Setup
17+
18+
Install the relevant dependencies:
19+
20+
```sh
21+
yarn install
22+
```
23+
24+
Ensure you have Kubernetes available. See https://docs.cosmology.zone/starship/get-started/step-2.
25+
26+
The following will install `kubectl`, `kind`, `helm`, and `yq` as needed:
27+
28+
```sh
29+
make clean setup
30+
```
31+
32+
## Getting Started
33+
34+
You can start everything with a single command:
35+
36+
```sh
37+
make start
38+
```
39+
40+
This command will:
41+
1. Install the Helm chart and start the Starship service
42+
2. Wait for all pods to be ready
43+
3. Set up port forwarding
44+
4. Fund the provision pool
45+
5. Override the chain registry
46+
47+
The process may take 7-12 minutes to complete. You'll see status updates as the pods come online.
48+
49+
Alternatively, you can run the steps individually:
50+
51+
```sh
52+
# install helm chart and start starship service
53+
make install
54+
55+
# wait for all pods to spin up
56+
make wait-for-pods
57+
58+
# expose ports on your local machine (useful for testing dapps)
59+
make port-forward
60+
61+
# set up Agoric testing environment
62+
make fund-provision-pool override-chain-registry register-bank-assets
63+
```
64+
65+
If you get an error like "connection refused", you need to wait longer, until all the pods are Running.
66+
67+
## Cleanup
68+
69+
```sh
70+
# stop the containers and port-forwarding
71+
make stop
72+
73+
# delete the clusters
74+
make clean
75+
```
76+
77+
## Logs
78+
79+
You can use the following commands to view logs:
80+
81+
```sh
82+
# agoric slogfile
83+
make tail-slog
84+
85+
# agoric validator logs
86+
kubectl logs agoriclocal-genesis-0 --container=validator --follow
87+
88+
# relayer logs
89+
kubectl logs hermes-agoric-gaia-0 --container=relayer --follow
90+
kubectl logs hermes-osmosis-gaia-0 --container=relayer --follow
91+
```
92+
93+
## Agoric Smart Wallet
94+
95+
For the steps below, you must import a key to `agd` or create a new one.
96+
97+
```bash
98+
# create a `user1` key from a random seed
99+
kubectl exec -i agoriclocal-genesis-0 -c validator -- agd keys add user1
100+
101+
# get the newly created address
102+
ADDR=$(kubectl exec -i agoriclocal-genesis-0 -c validator -- agd keys show user1 -a)
103+
104+
# fund the wallet with some tokens
105+
make fund-wallet COIN=20000000ubld ADDR=$ADDR
106+
107+
# provision the smart wallet
108+
make provision-smart-wallet ADDR=$ADDR
109+
```
110+
111+
## Chain Registry
112+
113+
These only work if you've done `make port-forward`.
114+
115+
- http://localhost:8081/chains/agoriclocal
116+
- http://localhost:8081/chains/osmosislocal
117+
- http://localhost:8081/chains/gaialocal
118+
- http://localhost:8081/chains/agoriclocal/keys
119+
- http://localhost:8081/ibc

0 commit comments

Comments
 (0)