Skip to content

Commit

Permalink
chore: add agoric chain (#423)
Browse files Browse the repository at this point in the history
* initial setup for agoric chain

* update default setup for agoric setup

* run only single node test case

* add agoric chain to be run in e2e-test and pr-e2e-test

* disable redinessProbe for cometmock enabled chains

* add rediness probe to cometmock
  • Loading branch information
Anmol1696 authored Mar 23, 2024
1 parent 20c3a7b commit 110f32c
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- "two-chain-cometmock.yaml"
- "neutron.yaml"
- "three-chain.yaml"
- "agoric.yaml"
fail-fast: true
max-parallel: 1

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- "two-chain-cometmock.yaml"
- "neutron.yaml"
- "three-chain.yaml"
- "agoric.yaml"
fail-fast: true
max-parallel: 1

Expand Down
42 changes: 42 additions & 0 deletions charts/devnet/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,48 @@ defaultChains:
exponent: 6
coingecko_id: akash-network
keywords: [ "cloud" ]
agoric:
image: ghcr.io/agoric/agoric-3-proposals:main
home: /root/.agoric
binary: agd
prefix: agoric
denom: ubld
prettyName: Agoric
coins: 100000000000000ubld
hdPath: m/44'/564'/0'/0/0
coinType: 564
repo: https://github.com/Agoric/agoric-sdk
assets:
- base: ubld
description: "The native token of Agoric"
name: Agoric
display: bld
symbol: BLD
logo_URIs:
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/agoric/images/bld.png"
svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/agoric/images/bld.svg"
denom_units:
- denom: ubld
exponent: 0
- denom: bld
exponent: 6
coingecko_id: agoric
keywords: [ "agoric" ]
- base: uist
description: "IST is the stable token used by the Agoric chain for execution fees and commerce."
name: Inter Stable Token
display: ist
symbol: IST
logo_URIs:
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/agoric/images/ist.png"
svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/agoric/images/ist.svg"
denom_units:
- denom: uist
exponent: 0
- denom: ist
exponent: 6
coingecko_id: inter-stable-token
keywords: [ "inter-stable-token" ]
eth:
storageClassName: hostpath
genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz
Expand Down
5 changes: 4 additions & 1 deletion charts/devnet/scripts/default/create-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

DENOM="${DENOM:=uosmo}"
CHAIN_BIN="${CHAIN_BIN:=osmosisd}"
CHAIN_DIR="${CHAIN_DIR:=$HOME/.osmosisd}"
KEYS_CONFIG="${KEYS_CONFIG:=configs/keys.json}"
VAL_NAME="${VAL_NAME:=osmosis}"
NODE_URL="${NODE_URL:=http://0.0.0.0:26657}"
Expand Down Expand Up @@ -74,6 +75,7 @@ function cosmos-sdk-version-default() {
then
args+='--min-self-delegation=1000000'
fi
$CHAIN_BIN keys list --keyring-backend test --output json --home $CHAIN_DIR | jq
$CHAIN_BIN tx staking create-validator \
--node $NODE_URL \
--pubkey=$($CHAIN_BIN tendermint show-validator $NODE_ARGS) \
Expand All @@ -84,7 +86,8 @@ function cosmos-sdk-version-default() {
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--keyring-backend="test" \
--keyring-backend test \
--home $CHAIN_DIR \
--fees 100000$DENOM \
--gas $GAS \
--output json \
Expand Down
6 changes: 6 additions & 0 deletions charts/devnet/templates/chains/cosmos/cometmock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ spec:
name: scripts
- mountPath: /configs
name: addresses
readinessProbe:
httpGet:
path: /status
port: 22331
initialDelaySeconds: 10
periodSeconds: 10
volumes:
- name: node
emptyDir: { }
Expand Down
26 changes: 24 additions & 2 deletions charts/devnet/templates/chains/cosmos/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ spec:
{{- include "devnet.evnVars" $chain | indent 12 }}
- name: FAUCET_ENABLED
value: "{{ $chain.faucet.enabled }}"
- name: SLOGFILE
value: "slog.slog"
command:
- bash
- "-c"
Expand All @@ -201,6 +203,14 @@ spec:
name: addresses
- mountPath: /scripts
name: scripts
{{- if not ($chain.cometmock.enabled) }}
readinessProbe:
httpGet:
path: /status
port: 26657
initialDelaySeconds: 10
periodSeconds: 10
{{- end }}
- name: exposer
image: {{ $.Values.exposer.image }}
imagePullPolicy: {{ $.Values.images.imagePullPolicy }}
Expand Down Expand Up @@ -277,7 +287,13 @@ spec:
echo "FAUCET_PATH_PATTERN: $FAUCET_PATH_PATTERN"
export | grep "FAUCET"
sleep 30
while [ $(curl -sw '%{http_code}' http://localhost:26657/status -o /dev/null) -ne 200 ]; do
echo "Validator node does not seem to be ready. Waiting for it to start..."
echo "Checking: http://localhost:26657/status"
sleep 10;
done
/app/packages/faucet/bin/cosmos-faucet-dist start "http://localhost:26657"
volumeMounts:
- mountPath: /configs
Expand Down Expand Up @@ -328,7 +344,13 @@ spec:
export FAUCET_MNEMONIC=$(jq -r ".faucet[0].mnemonic" /configs/keys.json)
export | grep "FAUCET"
sleep 30
while [ $(curl -sw '%{http_code}' http://localhost:26657/status -o /dev/null) -ne 200 ]; do
echo "Validator node does not seem to be ready. Waiting for it to start..."
echo "Checking: http://localhost:26657/status"
sleep 10;
done
/faucet/faucet --credit-coins="$CREDIT_COINS" --chain-fees="$FEES"
volumeMounts:
- mountPath: /configs
Expand Down
18 changes: 17 additions & 1 deletion charts/devnet/templates/chains/cosmos/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ spec:
{{- include "devnet.genesisVars" $dataExposer | indent 12}}
- name: KEYS_CONFIG
value: /configs/keys.json
- name: SLOGFILE
value: "slog.slog"
command:
- bash
- "-c"
Expand Down Expand Up @@ -210,8 +212,14 @@ spec:
- "-c"
- "-e"
- |
sleep 30
while [ $(curl -sw '%{http_code}' http://localhost:26657/status -o /dev/null) -ne 200 ]; do
echo "Validator node does not seem to be ready. Waiting for it to start..."
echo "Checking: http://localhost:26657/status"
sleep 10;
done
set -eux
export
VAL_INDEX=${HOSTNAME##*-}
VAL_NAME="$(jq -r ".validators[0].name" $KEYS_CONFIG)-$VAL_INDEX"
echo "Validator Index: $VAL_INDEX, Key name: $VAL_NAME. Chain bin $CHAIN_BIN"
Expand All @@ -235,6 +243,14 @@ spec:
name: addresses
- mountPath: /scripts
name: scripts
{{- if not ($chain.cometmock.enabled) }}
readinessProbe:
httpGet:
path: /status
port: 26657
initialDelaySeconds: 10
periodSeconds: 10
{{- end }}
- name: exposer
image: {{ $.Values.exposer.image }}
imagePullPolicy: {{ $.Values.images.imagePullPolicy }}
Expand Down
3 changes: 2 additions & 1 deletion charts/devnet/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"injective",
"polymer",
"virtual",
"akash"
"akash",
"agoric"
]
},
"numValidators": {
Expand Down
38 changes: 38 additions & 0 deletions tests/e2e/configs/agoric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
chains:
- name: agoric-3
type: agoric
image: ghcr.io/agoric/agoric-3-proposals:main
numValidators: 1
faucet:
enabled: true
type: starship
ports:
rest: 1313
rpc: 26653
exposer: 38083
resources:
cpu: 1
memory: 2Gi
- name: cosmoshub-4
type: cosmos
image: ghcr.io/cosmology-tech/starship/gaia:v10.0.1
numValidators: 1
ports:
rest: 1317
rpc: 26657
exposer: 38087
faucet: 8007

relayers:
- name: agoric-cosmos
type: hermes
replicas: 1
chains:
- agoric-3
- cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091

0 comments on commit 110f32c

Please sign in to comment.