From 41d23f9aa50601072c929ad4f7e1ec0fecdae823 Mon Sep 17 00:00:00 2001 From: Victor Pham Date: Sun, 26 Jun 2022 01:21:43 +0700 Subject: [PATCH] Fix issue import validator for evmos based chain + Add docs setup tools (#22) --- Install-Required-Tools-on-Ubuntu.md | 66 ++++++++++++++++ README.md | 5 +- blockchain-in-docker/1_prepare-genesis.sh | 91 +++++++++-------------- blockchain-in-docker/README.md | 13 ++-- blockchain-in-docker/_config.sh | 8 -- env.sh | 14 +--- keys/README.md | 6 +- sample.cosmos-and-evmos.override-env.sh | 3 +- 8 files changed, 120 insertions(+), 86 deletions(-) create mode 100644 Install-Required-Tools-on-Ubuntu.md diff --git a/Install-Required-Tools-on-Ubuntu.md b/Install-Required-Tools-on-Ubuntu.md new file mode 100644 index 0000000..2e8b80c --- /dev/null +++ b/Install-Required-Tools-on-Ubuntu.md @@ -0,0 +1,66 @@ +I use `Ubuntu 22.04 LTS` machine for development purpose so I will provide some command lines that helps you install tools required by scripts within this repo + +Update system first `sudo apt-get update -y` + +- Go 1.18.3 + > cd /tmp + + > wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz + + > sudo tar -zxvf go1.18.3.linux-amd64.tar.gz -C /usr/local/ + + > mkdir ~/go + + > echo -e "\nexport GOPATH=\\$HOME/go\nexport PATH=\\$PATH:/usr/local/go/bin:\\$GOPATH/bin" >> ~/.bashrc + +- jq + > sudo apt-get install jq -y + +- yq & tomlq + > sudo apt update -y && sudo apt install python3-pip -y && pip3 install yq + +- docker + > sudo apt-get update -y + + > sudo apt-get install ca-certificates curl gnupg lsb-release -y + + > sudo mkdir -p /etc/apt/keyrings + + > curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + + > echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + + > sudo apt-get update -y + + > sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y + + > sudo groupadd docker + + > sudo usermod -aG docker $USER + +- docker-compose + > mkdir -p ~/.docker/cli-plugins/ + + > curl -SL https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose + + > chmod +x ~/.docker/cli-plugins/docker-compose + + > sudo ln -s ~/.docker/cli-plugins/docker-compose /usr/bin/docker-compose + +- Rust + > curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + +- psql (PostgreSQL client) + > sudo apt install postgresql-client -y + +- NodeJS + > curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh + + > sudo bash /tmp/nodesource_setup.sh + + > sudo apt-get install -y nodejs + +- hasura-cli + > curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash + +#### Remember to relog to all new PATH update takes effect \ No newline at end of file diff --git a/README.md b/README.md index b563f63..5d5c0b4 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ Not only EVMOS, you can use this script to build for other chains like cosmos,.. - [docker](https://docs.docker.com/engine/install/) & [docker compose](https://docs.docker.com/compose/install/) - Node JS to build & run Big Dipper 2.0 for Cosmos based chains - PostgreSQL client (psql) for postgres 12.5 to setup Big Dipper +- [Hasura cli](https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli/) for bdjuno + +You can find commands to install the above tools [here](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/Install-Required-Tools-on-Ubuntu.md) I created all of the following samples on an Ubuntu 22.04 LTS machine with 4 CPU 16 GB RAM. It can run - 2 [EVMOS](https://github.com/evmos/evmos/tree/v5.0.0) chains @@ -37,7 +40,7 @@ without any performance issue (CPU ~20-80% per core, ram ~50% via htop) - You can change their version by updating file [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) - This sample is using keyring `test`, you may need to change to `file` for secure your test env if needed in [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) - You can create `override-env.sh` file and override values of [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) -- The [sample.cosmos-and-evmos.override-env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/sample.cosmos-and-evmos.override-env.sh) file contains example which tell you how to override variables of [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) and make the chain 1 use cosmos source, rename it to `override-env.sh` to make it effectives +- The [sample.cosmos-and-evmos.override-env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/sample.cosmos-and-evmos.override-env.sh) file contains example which tell you how to override variables of [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) and make the chain 1 use Cosmos (gaia) source, rename it to `override-env.sh` to make it effectives - The [sample.expose-big-dipper-ui.override-env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/sample.expose-big-dipper-ui.override-env.sh) file contains example which tell you how to override variables of [env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh) and make the block explorer UI (Big Dipper 2.0) accessible from outside world, rename it to `override-env.sh` to make it effectives #### Default ports used in these samples diff --git a/blockchain-in-docker/1_prepare-genesis.sh b/blockchain-in-docker/1_prepare-genesis.sh index a35ddb8..906ed78 100755 --- a/blockchain-in-docker/1_prepare-genesis.sh +++ b/blockchain-in-docker/1_prepare-genesis.sh @@ -33,43 +33,20 @@ else fi if [ "$CHAIN_TYPE" = "evmos" ]; then - if [ "$VALIDATOR_IMPORT_TYPE" = "private_key" ] || [ "$VALIDATOR_IMPORT_TYPE" = "pk" ]; then - echo - else - echo "Chain type 'evmos' only supports validator import type = 'private_key' (check variable 'CHAIN_${CHAIN_NO}_VALIDATOR_IMPORT_TYPE') due to bug of daemon can not import seed phrase programatically via command line" - exit 1 - fi - if [ "$HD_COINTYPE" -ne "60" ]; then echo "Chain type 'evmos' requires coin type 60 (check variable 'CHAIN_${CHAIN_NO}_COINTYPE')" fi -else - if [ "$VALIDATOR_IMPORT_TYPE" = "seed" ] || [ "$VALIDATOR_IMPORT_TYPE" = "seed_phrase" ] || [ "$VALIDATOR_IMPORT_TYPE" = "sp" ]; then - echo - else - echo "Chain type 'cosmos' only supports validator import type = 'seed_phrase' (check variable 'CHAIN_${CHAIN_NO}_VALIDATOR_IMPORT_TYPE') because the daemon does not support 'unsafe-import-eth-key' command" - exit 1 - fi fi if [ "$KEYRING" = "file" ]; then echo "Keyring: file" elif [ "$KEYRING" = "test" ]; then - echo "Keyring: test **WARNING** only use keyring-backend=test for development purpose" + echo "Keyring: test **WARNING** only use keyring-backend=test for development purpose on local machine or you must secure your cloud env by whitelist some IP addresses, otherwise someone will take all your token, even tho it's only a test env" else echo "Non supported keyring mode = $KEYRING, only support 'file' & 'test'" exit 1 fi -if [ "$VALIDATOR_IMPORT_TYPE" = "private_key" ] || [ "$VALIDATOR_IMPORT_TYPE" = "pk" ]; then - export VALIDATOR_IMPORT_MODE=1 -elif [ "$VALIDATOR_IMPORT_TYPE" = "seed" ] || [ "$VALIDATOR_IMPORT_TYPE" = "seed_phrase" ] || [ "$VALIDATOR_IMPORT_TYPE" = "sp" ]; then - export VALIDATOR_IMPORT_MODE=2 -else - echo "Non supported validator import type = $VALIDATOR_IMPORT_TYPE, only support ('private_key' or 'pk') & ('seed' or 'seed_phrase' or 'sp')" - exit 1 -fi - # Binary export BINARY="$GOPATH/bin/$DAEMON_BINARY_NAME" @@ -110,48 +87,54 @@ $BINARY init $MONIKER --chain-id $CHAIN_ID --home $VAL_HOME_3 > /dev/null 2>&1 [ $? -eq 0 ] || { echo "Err: Failed to init pseudo chain for node 2"; exit 1; } # Import validator keys -echo 'Import validator keys' -if [ $VALIDATOR_IMPORT_MODE -eq 1 ]; then # mode private_key - if [ "$KEYRING" = "test" ]; then - echo "- Validator 1, key name '$VAL_1_KEY_NAME'" - $BINARY keys unsafe-import-eth-key "$VAL_1_KEY_NAME" "$VAL_1_PRIVATE_KEY" --keyring-backend "test" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 2, key name '$VAL_2_KEY_NAME'" - $BINARY keys unsafe-import-eth-key "$VAL_2_KEY_NAME" "$VAL_2_PRIVATE_KEY" --keyring-backend "test" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 3, key name '$VAL_3_KEY_NAME'" - $BINARY keys unsafe-import-eth-key "$VAL_3_KEY_NAME" "$VAL_3_PRIVATE_KEY" --keyring-backend "test" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - else - echo "- Validator 1, key name '$VAL_1_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD'" - (echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys unsafe-import-eth-key "$VAL_1_KEY_NAME" "$VAL_1_PRIVATE_KEY" --keyring-backend "file" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 2, key name '$VAL_2_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD'" - (echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys unsafe-import-eth-key "$VAL_2_KEY_NAME" "$VAL_2_PRIVATE_KEY" --keyring-backend "file" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 3, key name '$VAL_3_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD'" - (echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys unsafe-import-eth-key "$VAL_3_KEY_NAME" "$VAL_3_PRIVATE_KEY" --keyring-backend "file" --home "$VAL_HOME_1" - [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - fi -elif [ $VALIDATOR_IMPORT_MODE -eq 2 ]; then # mode seed_phrase - if [ "$KEYRING" = "test" ]; then +echo "Import validator keys for chain no $CHAIN_NO id $CHAIN_ID" +if [ "$KEYRING" = "test" ]; then + echo "- Validator 1, key name '$VAL_1_KEY_NAME'" + ( echo "$VAL_1_SEED"; ) | $BINARY keys add "$VAL_1_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } + echo "- Validator 2, key name '$VAL_2_KEY_NAME'" + ( echo "$VAL_2_SEED"; ) | $BINARY keys add "$VAL_2_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } + echo "- Validator 3, key name '$VAL_3_KEY_NAME'" + ( echo "$VAL_3_SEED"; ) | $BINARY keys add "$VAL_3_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } +else + if [ "$CHAIN_TYPE" = "evmos" ]; then echo "- Validator 1, key name '$VAL_1_KEY_NAME'" - ( echo "$VAL_1_SEED"; ) | $BINARY keys add "$VAL_1_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + echo "** Due to evmos daemon bug, it is not possible to import seed & encryption password automatically at the same time, please copy & paste the following seed:" + echo "___" + echo "$VAL_1_SEED" + echo "___" + echo "and encryption password '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD' to encrypt seed phrase" + echo "of validator 1" + $BINARY keys add "$VAL_1_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } echo "- Validator 2, key name '$VAL_2_KEY_NAME'" - ( echo "$VAL_2_SEED"; ) | $BINARY keys add "$VAL_2_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + echo "** Due to evmos daemon bug, it is not possible to import seed & encryption password automatically at the same time, please copy & paste the following seed:" + echo "___" + echo "$VAL_2_SEED" + echo "___" + echo "and encryption password '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD' to encrypt seed phrase" + echo "of validator 2" + $BINARY keys add "$VAL_2_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } echo "- Validator 3, key name '$VAL_3_KEY_NAME'" - ( echo "$VAL_3_SEED"; ) | $BINARY keys add "$VAL_3_KEY_NAME" --recover --keyring-backend "test" --home "$VAL_HOME_1" + echo "** Due to evmos daemon bug, it is not possible to import seed & encryption password automatically at the same time, please copy & paste the following seed:" + echo "___" + echo "$VAL_3_SEED" + echo "___" + echo "and encryption password '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD' to encrypt seed phrase" + echo "of validator 3" + $BINARY keys add "$VAL_3_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } else echo "- Validator 1, key name '$VAL_1_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD', seed phase '$VAL_1_SEED'" ( echo "$VAL_1_SEED"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys add "$VAL_1_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 2, key name '$VAL_2_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD'" + echo "- Validator 2, key name '$VAL_2_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD', seed phase '$VAL_2_SEED'" ( echo "$VAL_2_SEED"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys add "$VAL_2_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } - echo "- Validator 3, key name '$VAL_3_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD'" + echo "- Validator 3, key name '$VAL_3_KEY_NAME', encryption password: '$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD', seed phase '$VAL_3_SEED'" ( echo "$VAL_3_SEED"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; echo "$VAL_KEYRING_FILE_ENCRYPTION_PASSWORD"; ) | $BINARY keys add "$VAL_3_KEY_NAME" --recover --keyring-backend "file" --home "$VAL_HOME_1" [ $? -eq 0 ] || { echo "ERR: Failed to import"; exit 1; } fi diff --git a/blockchain-in-docker/README.md b/blockchain-in-docker/README.md index e0800d0..7a6a9cb 100644 --- a/blockchain-in-docker/README.md +++ b/blockchain-in-docker/README.md @@ -35,23 +35,23 @@ Now you can [follow this sample](https://github.com/VictorTrustyDev/EVMOS-sample + evmosvaloper1wuqvcpuunf7r5rg7xutqddhw55grfzc7ewkz9a + 50m EVMOS + 7k coin staked - + Addr: evmos1wuqvcpuunf7r5rg7xutqddhw55grfzc75qejyq - + Private key: FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE + + EVMOS wallet addr: evmos1wuqvcpuunf7r5rg7xutqddhw55grfzc75qejyq + Mnemonic: spoil senior door access upset floor decorate shield high punch senior tape pigeon base slogan height clever buffalo cat report poem weapon labor satoshi + + ETH private key: FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE + Key name: val1 + evmosvaloper1zxgt4pwzzsv02z24g80lc5rhtsp0prw046yxss + 50m EVMOS + 3k coin staked - + Addr: evmos1zxgt4pwzzsv02z24g80lc5rhtsp0prw0c5tk3d - + Private key: 0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9 + + EVMOS wallet addr: evmos1zxgt4pwzzsv02z24g80lc5rhtsp0prw0c5tk3d + Mnemonic: width produce brush hour horse retreat play flag fresh broken measure culture scare broken erupt pilot buzz embody depend topic behind rigid fan battle + + ETH private key: 0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9 + Key name: val2 + evmosvaloper1vcy9v4jp0sd4hysqqcuwleytxre3ms4cmv5ajl + 50m EVMOS + 3k coin staked - + Addr: evmos1vcy9v4jp0sd4hysqqcuwleytxre3ms4ckzmdnz - + Private key: E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F + + EVMOS wallet addr: evmos1vcy9v4jp0sd4hysqqcuwleytxre3ms4ckzmdnz + Mnemonic: stage grid emotion thumb safe myth chair dizzy beyond casual select polar hover retire master neglect shift zero trigger section token replace truly father + + ETH private key: E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F + Key name: val3 ### IV. Customization @@ -72,7 +72,6 @@ Here are some of them: | `CHAIN_2_TYPE` | evmos | Chain type of chain 2 | | `CHAIN_2_COINTYPE` | 60 | [HD key derivation path](https://docs.evmos.org/users/technical_concepts/accounts.html) for chain 2's accounts | - Performance: 2 chains created by this sample can run in parallel smoothly in a 4 Core 4 Gb RAM machine This sample is using keyring-backend is `test`, you may need to change to `file` ([env.sh](https://github.com/VictorTrustyDev/EVMOS-sample-scripts/blob/main/env.sh)) to secure your test env if needed \ No newline at end of file diff --git a/blockchain-in-docker/_config.sh b/blockchain-in-docker/_config.sh index 74c8bf3..df8b985 100755 --- a/blockchain-in-docker/_config.sh +++ b/blockchain-in-docker/_config.sh @@ -13,12 +13,8 @@ if [ "$CHAIN_NO" = "1" ]; then export MIN_DENOM_SYMBOL="$CHAIN_1_MIN_DENOM_SYMBOL" export GAS_DENOM_SYMBOL="$CHAIN_1_GAS_DENOM_SYMBOL" export VAL_1_SEED="$VAL_1_CHAIN_1_SEED" - export VAL_1_PRIVATE_KEY="$VAL_1_CHAIN_1_PRIVATE_KEY" export VAL_2_SEED="$VAL_2_CHAIN_1_SEED" - export VAL_2_PRIVATE_KEY="$VAL_2_CHAIN_1_PRIVATE_KEY" export VAL_3_SEED="$VAL_3_CHAIN_1_SEED" - export VAL_3_PRIVATE_KEY="$VAL_3_CHAIN_1_PRIVATE_KEY" - export VALIDATOR_IMPORT_TYPE="$CHAIN_1_VALIDATOR_IMPORT_TYPE" export ACCOUNT_PREFIX="$CHAIN_1_ACCOUNT_PREFIX" export EVMOS_CLAIM_MODULE_ACCOUNT="$EVMOS_CHAIN_1_CLAIM_MODULE_ACCOUNT" elif [ "$CHAIN_NO" = "2" ]; then @@ -34,12 +30,8 @@ elif [ "$CHAIN_NO" = "2" ]; then export MIN_DENOM_SYMBOL="$CHAIN_2_MIN_DENOM_SYMBOL" export GAS_DENOM_SYMBOL="$CHAIN_2_GAS_DENOM_SYMBOL" export VAL_1_SEED="$VAL_1_CHAIN_2_SEED" - export VAL_1_PRIVATE_KEY="$VAL_1_CHAIN_2_PRIVATE_KEY" export VAL_2_SEED="$VAL_2_CHAIN_2_SEED" - export VAL_2_PRIVATE_KEY="$VAL_2_CHAIN_2_PRIVATE_KEY" export VAL_3_SEED="$VAL_3_CHAIN_2_SEED" - export VAL_3_PRIVATE_KEY="$VAL_3_CHAIN_2_PRIVATE_KEY" - export VALIDATOR_IMPORT_TYPE="$CHAIN_2_VALIDATOR_IMPORT_TYPE" export ACCOUNT_PREFIX="$CHAIN_2_ACCOUNT_PREFIX" export EVMOS_CLAIM_MODULE_ACCOUNT="$EVMOS_CHAIN_2_CLAIM_MODULE_ACCOUNT" fi diff --git a/env.sh b/env.sh index 82e00df..a6454fe 100644 --- a/env.sh +++ b/env.sh @@ -9,11 +9,11 @@ command -v make > /dev/null 2>&1 || { echo >&2 "make command could not be found" command -v go > /dev/null 2>&1 || { echo >&2 "go was not installed. More info: https://go.dev/doc/install"; exit 1; } # Configurations + ## Keyring -### Valid values are 'file' or 'test' ### Must be lowercase -### change to file for cloud or production env (DANGER: keyring test will allow transfer token from validator without key) -export KEYRING="test" # change to file for cloud or production env (DANGER: keyring test will allow transfer token from validator without key) +export KEYRING="test" # Valid values are 'file' or 'test', must be 'file' for cloud or production env (DANGER: keyring test will allow transfer token from validator without key) + ## export NOTICE_DEV_ENV="This sample scripts was developed on an Ubuntu 22.04 LTS machine" @@ -23,7 +23,6 @@ export MONIKER='moniker' export CHAIN_1_TYPE="evmos" # valid values are 'evmos' or 'cosmos' only, must be 'evmos' for evmos chain, otherwise 'cosmos' for other chains export CHAIN_1_ID="evmos_9006-1" export CHAIN_1_COINTYPE=60 # 60 for EVMOS, 118 for Cosmos -export CHAIN_1_VALIDATOR_IMPORT_TYPE="private_key" # 'private_key' for EVMOS, 'seed_phrase' for Cosmos. Aliases: ('private_key' or 'pk') and ('seed_phrase' or 'seed' or 'sp') export CHAIN_1_ACCOUNT_PREFIX="evmos" export CHAIN_1_GIT_REPO="https://github.com/evmos/evmos.git" export CHAIN_1_GIT_REPO_BRANCH="v5.0.0" # must belong to repo $CHAIN_1_GIT_REPO @@ -42,7 +41,6 @@ export CHAIN_1_EXPOSE_P2P_TO_PORT=26656 export CHAIN_2_TYPE="evmos" # valid values are 'evmos' or 'cosmos' only, must be 'evmos' for evmos chain, otherwise 'cosmos' for other chains export CHAIN_2_ID="evmos_9007-1" export CHAIN_2_COINTYPE=60 # 60 for EVMOS, 118 for Cosmos -export CHAIN_2_VALIDATOR_IMPORT_TYPE="private_key" # 'private_key' for EVMOS, 'seed_phrase' for Cosmos. Aliases: ('private_key' or 'pk') and ('seed_phrase' or 'seed' or 'sp') export CHAIN_2_ACCOUNT_PREFIX="evmos" export CHAIN_2_GIT_REPO="https://github.com/evmos/evmos.git" export CHAIN_2_GIT_REPO_BRANCH="v5.0.0" # must belong to repo $CHAIN_2_GIT_REPO @@ -77,10 +75,8 @@ export VAL_1_RAW_STAKE=7000 # Validator 1 will stake this amount export VAL_1_RAW_CLAIM=1000 # Validator 1 can claim this amount, evmos only #### Chain 1 export VAL_1_CHAIN_1_SEED="spoil senior door access upset floor decorate shield high punch senior tape pigeon base slogan height clever buffalo cat report poem weapon labor satoshi" -export VAL_1_CHAIN_1_PRIVATE_KEY="FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE" #### Chain 2 export VAL_1_CHAIN_2_SEED="spoil senior door access upset floor decorate shield high punch senior tape pigeon base slogan height clever buffalo cat report poem weapon labor satoshi" -export VAL_1_CHAIN_2_PRIVATE_KEY="FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE" ### Validator 2 export VAL_2_KEY_NAME="val2" export VAL_2_RAW_BALANCE=50000000 # Validator 2 init with this amount of coint in balance @@ -88,10 +84,8 @@ export VAL_2_RAW_STAKE=3000 # Validator 2 will stake this amount export VAL_2_RAW_CLAIM=1000 # Validator 2 can claim this amount, evmos only #### Chain 1 export VAL_2_CHAIN_1_SEED="width produce brush hour horse retreat play flag fresh broken measure culture scare broken erupt pilot buzz embody depend topic behind rigid fan battle" -export VAL_2_CHAIN_1_PRIVATE_KEY="0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9" #### Chain 2 export VAL_2_CHAIN_2_SEED="width produce brush hour horse retreat play flag fresh broken measure culture scare broken erupt pilot buzz embody depend topic behind rigid fan battle" -export VAL_2_CHAIN_2_PRIVATE_KEY="0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9" ### Validator 3 export VAL_3_KEY_NAME="val3" export VAL_3_RAW_BALANCE=50000000 # Validator 3 init with this amount of coint in balance @@ -99,10 +93,8 @@ export VAL_3_RAW_STAKE=3000 # Validator 3 will stake this amount export VAL_3_RAW_CLAIM=1000 # Validator 3 can claim this amount, evmos only #### Chain 1 export VAL_3_CHAIN_1_SEED="stage grid emotion thumb safe myth chair dizzy beyond casual select polar hover retire master neglect shift zero trigger section token replace truly father" -export VAL_3_CHAIN_1_PRIVATE_KEY="E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F" #### Chain 2 export VAL_3_CHAIN_2_SEED="stage grid emotion thumb safe myth chair dizzy beyond casual select polar hover retire master neglect shift zero trigger section token replace truly father" -export VAL_3_CHAIN_2_PRIVATE_KEY="E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F" ## Hermes (IBC Relayer) export HERMES_GIT_REPO="https://github.com/informalsystems/ibc-rs.git" diff --git a/keys/README.md b/keys/README.md index 2075457..b4c8b40 100644 --- a/keys/README.md +++ b/keys/README.md @@ -2,18 +2,18 @@ - evmosvaloper1wuqvcpuunf7r5rg7xutqddhw55grfzc7ewkz9a + Wallet Addr: evmos1wuqvcpuunf7r5rg7xutqddhw55grfzc75qejyq - + Private key: FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE + Mnemonic: spoil senior door access upset floor decorate shield high punch senior tape pigeon base slogan height clever buffalo cat report poem weapon labor satoshi + + ETH private key: FC3F58B007A017166DE5A340C7A2641EB37CF37081D6F9013636CEBFBAF7B1FE + Cosmos addr: cosmos1r0ku6275wrtud9vtvzulvgrk8vznan7xzeuepz - evmosvaloper1zxgt4pwzzsv02z24g80lc5rhtsp0prw046yxss + Wallet Addr: evmos1zxgt4pwzzsv02z24g80lc5rhtsp0prw0c5tk3d - + Private key: 0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9 + Mnemonic: width produce brush hour horse retreat play flag fresh broken measure culture scare broken erupt pilot buzz embody depend topic behind rigid fan battle + + ETH private key: 0172DC491B5ACD04DD378D3FD8FD9F41A0D701E070941474FADECD72E1E085B9 + Cosmos addr: cosmos1fwqsdptgfvtjvhxu2eem3pgvjwn3yup24n75kh - evmosvaloper1vcy9v4jp0sd4hysqqcuwleytxre3ms4cmv5ajl + Wallet Addr: evmos1vcy9v4jp0sd4hysqqcuwleytxre3ms4ckzmdnz - + Private key: E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F + Mnemonic: stage grid emotion thumb safe myth chair dizzy beyond casual select polar hover retire master neglect shift zero trigger section token replace truly father + + ETH private key: E0D83C6054597638469CC91A46F14B7F62705297912524059629E4674302928F + Cosmos addr: cosmos1czg02jwz4rvu405mzxnw7h9zkzu7pm39wl6h5e #### The following is being used to create reserved account for paying IBC fee on both chains diff --git a/sample.cosmos-and-evmos.override-env.sh b/sample.cosmos-and-evmos.override-env.sh index 2ffc0bb..8e51c0b 100644 --- a/sample.cosmos-and-evmos.override-env.sh +++ b/sample.cosmos-and-evmos.override-env.sh @@ -1,6 +1,6 @@ #!/bin/bash -# You can rename this file into `override-env.sh` to make the first network become cosmos +# You can rename this file into `override-env.sh` to make the first network become Cosmos (gaia) export KEYRING="file" # Secure your chain, someone will absolutely transfer your token without your permission export VAL_KEYRING_FILE_ENCRYPTION_PASSWORD="11111111" @@ -8,7 +8,6 @@ export VAL_KEYRING_FILE_ENCRYPTION_PASSWORD="11111111" export CHAIN_1_TYPE="cosmos" # valid values are 'evmos' or 'cosmos' only, must be 'evmos' for evmos chain, otherwise 'cosmos' for other chains export CHAIN_1_ID="cosmos-8" export CHAIN_1_COINTYPE=118 # 60 for EVMOS, 118 for Cosmos -export CHAIN_1_VALIDATOR_IMPORT_TYPE="seed_phrase" # 'private_key' for EVMOS, 'seed_phrase' for Cosmos. Aliases: ('private_key' or 'pk') and ('seed_phrase' or 'seed' or 'sp') export CHAIN_1_ACCOUNT_PREFIX="cosmos" export CHAIN_1_GIT_REPO="https://github.com/cosmos/gaia" export CHAIN_1_GIT_REPO_BRANCH="v7.0.2"