diff --git a/.gitmodules b/.gitmodules index 301bcd0003..5a10bdfe59 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/Dockerfile.icq b/Dockerfile.icq deleted file mode 100644 index a63cac9fb9..0000000000 --- a/Dockerfile.icq +++ /dev/null @@ -1,26 +0,0 @@ -FROM golang:1.17-alpine3.15 AS builder - -RUN apk add --upgrade git - -WORKDIR /opt - -ENV COMMIT_HASH=c6609dfcfbf6f5b902fd6882bc7ce65a063cf837 - -RUN git clone https://github.com/Stride-Labs/interchain-queries.git icq-install \ - && cd icq-install \ - && git checkout $COMMIT_HASH \ - && go build - -FROM alpine:3.15 - -COPY --from=builder /opt/icq-install/interchain-queries /usr/local/bin/ - -RUN adduser -S -h /home/icq -D icq -u 1000 -USER icq - -WORKDIR /home/icq - -RUN echo "while true; do interchain-queries run; done" > /home/icq/start.sh - -CMD ["sh", "/home/icq/start.sh"] - diff --git a/README.md b/README.md index 849ded72fa..46b01c037f 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 diff --git a/deps/interchain-queries b/deps/interchain-queries deleted file mode 160000 index c6609dfcfb..0000000000 --- a/deps/interchain-queries +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c6609dfcfbf6f5b902fd6882bc7ce65a063cf837 diff --git a/docker-compose.yml b/docker-compose.yml index 7859186d40..65ea1820d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/scripts/README.md b/scripts/README.md index 69dfb1382d..ed5d94d536 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -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) ``` @@ -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} diff --git a/scripts/build.sh b/scripts/build.sh index dda67f50c7..2678b8de57 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 @@ -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 . ; diff --git a/scripts/config/icq_config.yaml b/scripts/config/icq_config.yaml deleted file mode 100644 index b9ebce4d2a..0000000000 --- a/scripts/config/icq_config.yaml +++ /dev/null @@ -1,72 +0,0 @@ -default_chain: stride -chains: - stride: - key: icq1 - chain-id: STRIDE - rpc-addr: http://stride1:26657 - grpc-addr: http://stride1:9090 - account-prefix: stride - keyring-backend: test - gas-adjustment: 1.2 - gas-prices: 1ustrd - debug: false - timeout: 20s - block-timeout: "" - output-format: json - sign-mode: direct - gaia: - key: icq2 - chain-id: GAIA - rpc-addr: http://gaia1:26657 - grpc-addr: http://gaia1:9090 - account-prefix: cosmos - keyring-backend: test - gas-adjustment: 1.2 - gas-prices: 1uatom - debug: false - timeout: 20s - block-timeout: "" - output-format: json - sign-mode: direct - juno: - key: icq3 - chain-id: JUNO - rpc-addr: http://juno1:26657 - grpc-addr: http://juno1:9090 - account-prefix: juno - keyring-backend: test - gas-adjustment: 1.2 - gas-prices: 1ujuno - debug: false - timeout: 20s - block-timeout: "" - output-format: json - sign-mode: direct - osmo: - key: icq4 - chain-id: OSMO - rpc-addr: http://osmo1:26657 - grpc-addr: http://osmo1:9090 - account-prefix: osmo - keyring-backend: test - gas-adjustment: 1.2 - gas-prices: 1uosmo - debug: false - timeout: 20s - block-timeout: "" - output-format: json - sign-mode: direct - stars: - key: icq5 - chain-id: STARS - rpc-addr: http://stars1:26657 - grpc-addr: http://stars1:9090 - account-prefix: stars - keyring-backend: test - gas-adjustment: 1.2 - gas-prices: 1ustars - debug: false - timeout: 20s - block-timeout: "" - output-format: json - sign-mode: direct diff --git a/scripts/init_chain.sh b/scripts/init_chain.sh index c70242ebef..c1c7651b1a 100644 --- a/scripts/init_chain.sh +++ b/scripts/init_chain.sh @@ -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) @@ -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 diff --git a/scripts/init_relayers.sh b/scripts/init_relayers.sh index 4776a213e0..326053b452 100644 --- a/scripts/init_relayers.sh +++ b/scripts/init_relayers.sh @@ -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 @@ -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 \ No newline at end of file diff --git a/scripts/local-to-mainnet/init_stride.sh b/scripts/local-to-mainnet/init_stride.sh index 7d45784f98..331f5f3c47 100644 --- a/scripts/local-to-mainnet/init_stride.sh +++ b/scripts/local-to-mainnet/init_stride.sh @@ -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) diff --git a/scripts/start_network.sh b/scripts/start_network.sh index f081270b64..9e0451cec9 100755 --- a/scripts/start_network.sh +++ b/scripts/start_network.sh @@ -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 diff --git a/scripts/vars.sh b/scripts/vars.sh index 7b4bbe5624..c91107da8b 100644 --- a/scripts/vars.sh +++ b/scripts/vars.sh @@ -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'