Skip to content

Commit

Permalink
Remove interchain-queries Relayer (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampocs authored Nov 3, 2022
1 parent 4cb9626 commit 4133ccd
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 151 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "deps/interchain-queries"]
# Commit: c6609dfcfbf6f5b902fd6882bc7ce65a063cf837
path = deps/interchain-queries
url = git@github.com:Stride-Labs/interchain-queries.git
[submodule "deps/hermes"]
# Commit: fd92eb6d17342bc83003f2067d6a9cd8261f2884
path = deps/hermes
Expand Down
26 changes: 0 additions & 26 deletions Dockerfile.icq

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Developers who wish to develop on Stride can easily spin up 3 Stride nodes, 3 Ga
The fastest way to develop on Stride is local development mode.

#### Set up local development mode
Install the required git submodule dependencies (gaia, hermes, interchain-queries).
Install the required git submodule dependencies (gaia, hermes).
```
git submodule update --init
```
Expand All @@ -68,7 +68,6 @@ You can optionally pass build arguments to specify which binary to rebuild
5. `t` This will re-build the Stargaze binary
6. `r` This will re-build the Go Relayer binary
7. `h` This will re-build the Hermes binary
8. `i` This will re-build the ICQ binary

Example: `make start-docker build=sg`, this will:
- Rebuild the Stride and Gaia binarys
Expand Down
1 change: 0 additions & 1 deletion deps/interchain-queries
Submodule interchain-queries deleted from c6609d
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,3 @@ services:
- ./scripts/state/relayer:/home/relayer/.relayer
restart: always
command: [ "bash", "start.sh", "stride-stars" ]

icq:
image: stridezone:icq
volumes:
- ./scripts/state/icq:/home/icq/.icq
restart: always
30 changes: 27 additions & 3 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ while getopts sgojhir{n} flag; do
{CHAIN_ID}_VAL_MNEMONIC_5=""
{CHAIN_ID}_VAL_MNEMONICS=("${CHAIN_ID}_VAL_MNEMONIC_1","${CHAIN_ID}_VAL_MNEMONIC_2","${CHAIN_ID}_VAL_MNEMONIC_3","${CHAIN_ID}_VAL_MNEMONIC_4","${CHAIN_ID}_VAL_MNEMONIC_5")
HERMES_${CHAIN_ID}_ACCT=rly{add one since the account from the last host zone}
HERMES_${CHAIN_ID}_MNEMONIC=""
ICQ_${CHAIN_ID}_ACCT=rly{add one since the account from the last host zone}
ICQ_${CHAIN_ID}_MNEMONIC=""
RELAYER_{CHAIN_ID}_EXEC="docker-compose run --rm relayer-{new-host-zone}"
RELAYER_{CHAIN_ID}_ACCT=rly{add one since the account from the last host zone}
RELAYER_{CHAIN_ID}_MNEMONIC=""
```
* Add the IBC denom's for the host zone across each channel. You can use the following code block (just temporarily throw it in any of the test files and run it)
```
Expand Down Expand Up @@ -117,6 +118,29 @@ paths:
rule: ""
channel-list: []
```
* Add a section to hermes
```
[[chains]]
id = '{CHAIN_ID}'
rpc_addr = 'http://{NODE_PREFIX}1:26657'
grpc_addr = 'http://{NODE_PREFIX}1:9090'
websocket_addr = 'ws://{NODE_PREFIX}:26657/websocket'
rpc_timeout = '10s'
account_prefix = '{ADDRESS_PREFIX}'
key_name = 'hrly{next relayer ID}'
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3000000
gas_price = { price = 0.000, denom = '{DENOM}' }
gas_multiplier = 1.1
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '10s'
trusting_period = '119s'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }
```
* Finally add the execution of the `init_chain` script for this host zone in `scripts/start_network.sh`, and add it to the array of `HOST_CHAINS`
```
sh ${SCRIPT_DIR}/init_chain.sh {NEW-HOST-ZONE}
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ revert_admin_address() {
}

# build docker images and local binaries
while getopts sgojthir flag; do
while getopts sgojthr flag; do
case "${flag}" in
# For stride, we need to update the admin address to one that we have the seed phrase for
s) replace_admin_address
Expand All @@ -55,7 +55,6 @@ while getopts sgojthir flag; do
j) build_local_and_docker juno deps/juno ;;
o) build_local_and_docker osmo deps/osmosis ;;
t) build_local_and_docker stars deps/stargaze ;;
i) build_local_and_docker icq deps/interchain-queries ;;
r) build_local_and_docker relayer deps/relayer ;;
h) echo "Building Hermes Docker... ";
docker build --tag stridezone:hermes -f Dockerfile.hermes . ;
Expand Down
72 changes: 0 additions & 72 deletions scripts/config/icq_config.yaml

This file was deleted.

7 changes: 1 addition & 6 deletions scripts/init_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ IFS=',' read -r -a VAL_MNEMONICS <<< "${!VAL_MNEMONICS_VAR}"

HERMES_ACCT=$(GET_VAR_VALUE HERMES_${CHAIN_ID}_ACCT)
HERMES_MNEMONIC=$(GET_VAR_VALUE HERMES_${CHAIN_ID}_MNEMONIC)
ICQ_ACCT=$(GET_VAR_VALUE ICQ_${CHAIN_ID}_ACCT)
ICQ_MNEMONIC=$(GET_VAR_VALUE ICQ_${CHAIN_ID}_MNEMONIC)
RELAYER_ACCT=$(GET_VAR_VALUE RELAYER_${CHAIN_ID}_ACCT)
RELAYER_MNEMONIC=$(GET_VAR_VALUE RELAYER_${CHAIN_ID}_MNEMONIC)

Expand Down Expand Up @@ -134,17 +132,14 @@ for (( i=1; i <= $NUM_NODES; i++ )); do
fi
done

# add Hermes and ICQ relayer accounts on Stride
# add Hermes and relayer accounts on Stride
echo "$HERMES_MNEMONIC" | $MAIN_NODE_CMD keys add $HERMES_ACCT --recover --keyring-backend=test >> $KEYS_LOGS 2>&1
echo "$ICQ_MNEMONIC" | $MAIN_NODE_CMD keys add $ICQ_ACCT --recover --keyring-backend=test >> $KEYS_LOGS 2>&1
echo "$RELAYER_MNEMONIC" | $MAIN_NODE_CMD keys add $RELAYER_ACCT --recover --keyring-backend=test >> $KEYS_LOGS 2>&1
HERMES_ADDRESS=$($MAIN_NODE_CMD keys show $HERMES_ACCT --keyring-backend test -a)
ICQ_ADDRESS=$($MAIN_NODE_CMD keys show $ICQ_ACCT --keyring-backend test -a)
RELAYER_ADDRESS=$($MAIN_NODE_CMD keys show $RELAYER_ACCT --keyring-backend test -a)

# give relayer accounts token balances
$MAIN_NODE_CMD add-genesis-account ${HERMES_ADDRESS} ${VAL_TOKENS}${DENOM}
$MAIN_NODE_CMD add-genesis-account ${ICQ_ADDRESS} ${VAL_TOKENS}${DENOM}
$MAIN_NODE_CMD add-genesis-account ${RELAYER_ADDRESS} ${VAL_TOKENS}${DENOM}

if [ "$CHAIN_ID" == "$STRIDE_CHAIN_ID" ]; then
Expand Down
11 changes: 0 additions & 11 deletions scripts/init_relayers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ if [[ "$CHAINS" == "" ]]; then
fi

mkdir -p $STATE/hermes
mkdir -p $STATE/icq
mkdir -p $STATE/relayer/config

cp ${SCRIPT_DIR}/config/icq_config.yaml $STATE/icq/config.yaml
cp ${SCRIPT_DIR}/config/hermes_config.toml $STATE/hermes/config.toml
cp ${SCRIPT_DIR}/config/relayer_config.yaml $STATE/relayer/config/config.yaml

Expand All @@ -39,12 +37,3 @@ for chain_id in ${CHAINS[@]}; do

$RELAYER_CMD keys restore $chain_name $account_name "$mnemonic"
done

echo "Adding ICQ keys"
for chain_id in ${CHAINS[@]}; do
account_name=$(GET_VAR_VALUE ICQ_${chain_id}_ACCT)
mnemonic=$(GET_VAR_VALUE ICQ_${chain_id}_MNEMONIC)
chain_name=$(printf "$chain_id" | awk '{ print tolower($0) }')

echo $mnemonic | $ICQ_CMD keys restore $account_name --chain $chain_name
done
2 changes: 1 addition & 1 deletion scripts/local-to-mainnet/init_stride.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ rm -rf ${client_toml}-E
rm -rf ${genesis_json}-E
rm -rf ${app_toml}-E

# add Hermes and ICQ relayer accounts on Stride
# add Hermes and relayer accounts on Stride
echo "$HERMES_MNEMONIC" | $CMD keys add $HERMES_ACCT --recover --keyring-backend=test >> $KEYS_LOGS 2>&1
echo "$RELAYER_MNEMONIC" | $CMD keys add $RELAYER_ACCT --recover --keyring-backend=test >> $KEYS_LOGS 2>&1
HERMES_ADDRESS=$($CMD keys show $HERMES_ACCT --keyring-backend test -a)
Expand Down
1 change: 0 additions & 1 deletion scripts/start_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rm -rf $SCRIPT_DIR/state $SCRIPT_DIR/logs/*.log $SCRIPT_DIR/logs/temp
mkdir -p $SCRIPT_DIR/logs

HERMES_LOGS=$SCRIPT_DIR/logs/hermes.log
ICQ_LOGS=$SCRIPT_DIR/logs/icq.log

# If we're testing an upgrade, setup cosmovisor
if [[ "$UPGRADE_NAME" != "" ]]; then
Expand Down
16 changes: 0 additions & 16 deletions scripts/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,6 @@ RELAYER_JUNO_MNEMONIC="kiwi betray topple van vapor flag decorate cement crystal
RELAYER_OSMO_MNEMONIC="unaware wine ramp february bring trust leaf beyond fever inside option dilemma save know captain endless salute radio humble chicken property culture foil taxi"
RELAYER_STARS_MNEMONIC="deposit dawn erosion talent old broom flip recipe pill hammer animal hill nice ten target metal gas shoe visual nephew soda harbor child simple"

# ICQ
ICQ_CMD="$SCRIPT_DIR/../build/interchain-queries --home $STATE/icq"
ICQ_EXEC="docker-compose run --rm icq interchain-queries"

ICQ_STRIDE_ACCT=icq1
ICQ_GAIA_ACCT=icq2
ICQ_JUNO_ACCT=icq3
ICQ_OSMO_ACCT=icq4
ICQ_STARS_ACCT=icq5

ICQ_STRIDE_MNEMONIC="helmet say goat special plug umbrella finger night flip axis resource tuna trigger angry shove essay point laundry horror eager forget depend siren alarm"
ICQ_GAIA_MNEMONIC="capable later bamboo snow drive afraid cheese practice latin brush hand true visa drama mystery bird client nature jealous guess tank marriage volume fantasy"
ICQ_JUNO_MNEMONIC="divorce loop depth announce strategy goddess short cash private raise spatial parent deal acid casual love inner bind ozone picnic fee earn scene galaxy"
ICQ_OSMO_MNEMONIC="mix deal extend cargo office intact illegal cage fabric must upset yellow put any shaft area use piece patrol tobacco village guilt iron program"
ICQ_STARS_MNEMONIC="absurd uncle wrestle paper cream sample wreck job couch brother antique resist napkin easily deliver arrest original iron rough puppy solid false next section"

GAIA_DELEGATE_VAL='cosmosvaloper1pcag0cj4ttxg8l7pcg0q4ksuglswuuedadj7ne'
GAIA_DELEGATION_ICA_ADDR='cosmos1sy63lffevueudvvlvh2lf6s387xh9xq72n3fsy6n2gr5hm6u2szs2v0ujm'
GAIA_REDEMPTION_ICA_ADDR='cosmos1xmcwu75s8v7s54k79390wc5gwtgkeqhvzegpj0nm2tdwacv47tmqg9ut30'
Expand Down

0 comments on commit 4133ccd

Please sign in to comment.