From 785ab9fc466aa5baaa76dcd26e54fdeb905c5d77 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 29 Jul 2020 11:51:13 +0200 Subject: [PATCH 1/9] Update simapp to nightly-2020-07-29 --- scripts/simapp/env | 6 +- scripts/simapp/setup.sh | 21 +- ...4fe96a5d63899b4a1c6971d5da08e56ff5.address | 1 - .../template/.simapp/config/addrbook.json | 4 + .../template/.simapp/config/genesis.json | 539 +++++++++--------- ...829b87c30fe2c35ec3ad9d955fd4acabdda8f.json | 1 - ...8e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json | 1 + .../template/.simapp/config/node_key.json | 2 +- .../.simapp/config/priv_validator_key.json | 6 +- ...ad042297987744a7059c14b90cb36e1137.address | 1 + scripts/simapp/template/.simapp/data/.gitkeep | 0 scripts/simapp/template/.simapp/keyhash | 2 +- .../simapp/template/.simapp/validator.info | 2 +- scripts/simapp/template/setup.sh | 19 +- 14 files changed, 310 insertions(+), 295 deletions(-) delete mode 100644 scripts/simapp/template/.simapp/2bb7a14fe96a5d63899b4a1c6971d5da08e56ff5.address create mode 100644 scripts/simapp/template/.simapp/config/addrbook.json delete mode 100644 scripts/simapp/template/.simapp/config/gentx/gentx-666829b87c30fe2c35ec3ad9d955fd4acabdda8f.json create mode 100644 scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json create mode 100644 scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address delete mode 100644 scripts/simapp/template/.simapp/data/.gitkeep diff --git a/scripts/simapp/env b/scripts/simapp/env index 403fec6b..cf08ed75 100644 --- a/scripts/simapp/env +++ b/scripts/simapp/env @@ -1,4 +1,4 @@ -# Choose from https://hub.docker.com/r/interchainio/cosmos-sdk/tags -REPOSITORY="interchainio/cosmos-sdk" -VERSION="july-2-2020" +# Choose from https://hub.docker.com/r/marbar3778/simapp/tags +REPOSITORY="marbar3778/simapp" +VERSION="nightly-2020-07-29" CONTAINER_NAME="simapp" diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh index d274693c..d5e7b79f 100755 --- a/scripts/simapp/setup.sh +++ b/scripts/simapp/setup.sh @@ -5,21 +5,26 @@ command -v shellcheck > /dev/null && shellcheck "$0" PASSWORD=${PASSWORD:-1234567890} STAKE=${STAKE_TOKEN:-ustake} FEE=${FEE_TOKEN:-ucosm} -CHAIN_ID=${CHAIN_ID:-testing} +CHAIN_ID=${CHAIN_ID:-simd-testing} -simd init --chain-id="$CHAIN_ID" "$CHAIN_ID" -# staking/governance token is hardcoded in config, change this -sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json -if ! simcli keys show validator; then - (echo "$PASSWORD"; echo "$PASSWORD") | simcli keys add validator +echo "Creating genesis ..." +simd init --chain-id "$CHAIN_ID" "$CHAIN_ID" +sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this + +echo "Setting up validator ..." +if ! simd keys show validator; then + (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator fi # hardcode the validator account for this instance echo "$PASSWORD" | simd add-genesis-account validator "1000000000$STAKE,1000000000$FEE" + +echo "Setting up accounts ..." # (optionally) add a few more genesis accounts for addr in "$@"; do echo $addr simd add-genesis-account "$addr" "1000000000$STAKE,1000000000$FEE" done -# submit a genesis validator tx -(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx --name validator --amount "250000000$STAKE" + +echo "Creating genesis tx ..." +(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx validator --amount "250000000$STAKE" --chain-id "$CHAIN_ID" simd collect-gentxs diff --git a/scripts/simapp/template/.simapp/2bb7a14fe96a5d63899b4a1c6971d5da08e56ff5.address b/scripts/simapp/template/.simapp/2bb7a14fe96a5d63899b4a1c6971d5da08e56ff5.address deleted file mode 100644 index 9592fdd2..00000000 --- a/scripts/simapp/template/.simapp/2bb7a14fe96a5d63899b4a1c6971d5da08e56ff5.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0wMiAxMjowNzoyMy4xODYzNzMyMjMgKzAwMDAgVVRDIG09KzAuMTg4NzI3NzY0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiNGdMcVVEdlcyRGRaWk1NXyJ9.B-AuI5w3Sx51GG0g-VzBciHaWu8VpOvGfPJsWEMWZ3XpnOQib-6BeQ.ZrDU9r8QGYayFR1E.YtowOLcWfNA8bZmDvoJhVB_zrE1AWa-E5P2ShZV4hIAHBusrkyR-RwxEG4y7Kc4FHIXw5UCIuJvZaJy39z670xIhL6ktgTgZUmC4BTmHAnlC1oRDj_Ih0_J-oAsjTir8-Y0VXb1vyky1E4yo9jq-E3vTvqfxn3QCqHIBpnQ7dqoM8Zi3hCy9YxQoBGptEf9z5fimIszZMM1sXjqS7sEZPWoJO6jYmRUp9D5NvaY6zyTgOrEEWXF7JpqC.CTb3ibPIGwVtVIkziDg7GA \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/addrbook.json b/scripts/simapp/template/.simapp/config/addrbook.json new file mode 100644 index 00000000..edd624ad --- /dev/null +++ b/scripts/simapp/template/.simapp/config/addrbook.json @@ -0,0 +1,4 @@ +{ + "key": "86da05cfcdca4b52c778c78a", + "addrs": [] +} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/genesis.json b/scripts/simapp/template/.simapp/config/genesis.json index 8b9a1e7a..97da4b3b 100644 --- a/scripts/simapp/template/.simapp/config/genesis.json +++ b/scripts/simapp/template/.simapp/config/genesis.json @@ -1,5 +1,5 @@ { - "genesis_time": "2020-07-02T12:07:22.868761784Z", + "genesis_time": "2020-07-29T09:46:30.433319Z", "chain_id": "testing", "consensus_params": { "block": { @@ -19,130 +19,29 @@ }, "app_hash": "", "app_state": { - "auth": { - "params": { - "max_memo_characters": "256", - "tx_sig_limit": "7", - "tx_size_cost_per_byte": "10", - "sig_verify_cost_ed25519": "590", - "sig_verify_cost_secp256k1": "1000" + "gov": { + "starting_proposal_id": "1", + "deposits": null, + "votes": null, + "proposals": null, + "deposit_params": { + "min_deposit": [ + { + "denom": "ustake", + "amount": "10000000" + } + ], + "max_deposit_period": "172800000000000" }, - "accounts": [ - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml4lxx9p7" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej" - } - } - ] + "voting_params": { + "voting_period": "172800000000000" + }, + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto": "0.334000000000000000" + } }, - "evidence": { - "evidence": [] - }, - "params": null, - "upgrade": {}, "slashing": { "params": { "signed_blocks_window": "100", @@ -154,88 +53,16 @@ "signing_infos": {}, "missed_blocks": {} }, - "capability": { - "index": "1", - "owners": [] - }, - "mint": { - "minter": { - "inflation": "0.130000000000000000", - "annual_provisions": "0.000000000000000000" - }, - "params": { - "mint_denom": "ustake", - "inflation_rate_change": "0.130000000000000000", - "inflation_max": "0.200000000000000000", - "inflation_min": "0.070000000000000000", - "goal_bonded": "0.670000000000000000", - "blocks_per_year": "6311520" + "crisis": { + "constant_fee": { + "denom": "ustake", + "amount": "1000" } }, - "ibc": { - "client_genesis": { - "clients": [], - "clients_consensus": [], - "create_localhost": true - }, - "connection_genesis": { - "connections": [], - "client_connection_paths": [] - }, - "channel_genesis": { - "channels": [], - "acknowledgements": [], - "commitments": [], - "send_sequences": [], - "recv_sequences": [], - "ack_sequences": [] - } - }, - "genutil": { - "gentxs": [ - { - "type": "cosmos-sdk/StdTx", - "value": { - "msg": [ - { - "type": "cosmos-sdk/MsgCreateValidator", - "value": { - "description": { - "moniker": "testing" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "cosmos19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml4lxx9p7", - "validator_address": "cosmosvaloper19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml46jjsdd", - "pubkey": "cosmosvalconspub1zcjduepq97t76hzwgxnd6cj6tx6wuyv0d3llh8qr9uhdhdzjrurl5uvxjmcqhul8gk", - "value": { - "denom": "ustake", - "amount": "250000000" - } - } - } - ], - "fee": { - "amount": [], - "gas": "200000" - }, - "signatures": [ - { - "pub_key": "61rphyEDo5veugup1kp9T3NLAQiIk/eI21R0m82zpPRtj1y8GNQ=", - "signature": "QYjIsOmKs2aQAiEMFLd6X7viwHALp/lMonQi4wweMGU1lQGqztfV9xZncNXSJDljAqdj1BGjVxT9slAAaeMJgQ==" - } - ], - "memo": "666829b87c30fe2c35ec3ad9d955fd4acabdda8f@172.17.0.2:26656" - } - } - ] - }, "bank": { - "send_enabled": true, + "params": { + "default_send_enabled": true + }, "balances": [ { "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", @@ -250,19 +77,6 @@ } ] }, - { - "address": "cosmos19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml4lxx9p7", - "coins": [ - { - "denom": "ucosm", - "amount": "1000000000" - }, - { - "denom": "ustake", - "amount": "1000000000" - } - ] - }, { "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", "coins": [ @@ -419,6 +233,19 @@ } ] }, + { + "address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d", + "coins": [ + { + "denom": "ucosm", + "amount": "1000000000" + }, + { + "denom": "ustake", + "amount": "1000000000" + } + ] + }, { "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", "coins": [ @@ -472,59 +299,10 @@ ] } ], - "supply": [] - }, - "transfer": { - "port_id": "transfer" - }, - "gov": { - "starting_proposal_id": "1", - "deposits": null, - "votes": null, - "proposals": null, - "deposit_params": { - "min_deposit": [ - { - "denom": "ustake", - "amount": "10000000" - } - ], - "max_deposit_period": "172800000000000" - }, - "voting_params": { - "voting_period": "172800000000000" - }, - "tally_params": { - "quorum": "0.334000000000000000", - "threshold": "0.500000000000000000", - "veto": "0.334000000000000000" - } - }, - "distribution": { - "params": { - "community_tax": "0.020000000000000000", - "base_proposer_reward": "0.010000000000000000", - "bonus_proposer_reward": "0.040000000000000000", - "withdraw_addr_enabled": true - }, - "fee_pool": { - "community_pool": [] - }, - "delegator_withdraw_infos": [], - "previous_proposer": "", - "outstanding_rewards": [], - "validator_accumulated_commissions": [], - "validator_historical_rewards": [], - "validator_current_rewards": [], - "delegator_starting_infos": [], - "validator_slash_events": [] - }, - "crisis": { - "constant_fee": { - "denom": "ustake", - "amount": "1000" - } + "supply": [], + "denom_metadata": null }, + "params": null, "staking": { "params": { "unbonding_time": "1814400000000000", @@ -538,8 +316,231 @@ "validators": null, "delegations": null, "unbonding_delegations": null, - "redelegations": null, - "exported": false + "redelegations": null + }, + "capability": { + "index": "1", + "owners": [] + }, + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej" + } + } + ] + }, + "genutil": { + "gentxs": [ + { + "type": "cosmos-sdk/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgCreateValidator", + "value": { + "description": { + "moniker": "testing" + }, + "commission": { + "rate": "0.100000000000000000", + "max_rate": "0.200000000000000000", + "max_change_rate": "0.010000000000000000" + }, + "min_self_delegation": "1", + "delegator_address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d", + "validator_address": "cosmosvaloper160hxhtgyy2tesa6y5uzec99epjekuyfhmw6la7", + "pubkey": "cosmosvalconspub1zcjduepq5upt3p9eqm39ct8ccey6ys4nv4wmyrez838wekf2lfr8akvcve8qdr0g6a", + "value": { + "denom": "ustake", + "amount": "250000000" + } + } + } + ], + "fee": { + "amount": [], + "gas": "200000" + }, + "signatures": [ + { + "pub_key": "61rphyECJdjIz9unAUVohSFF7oDhGRMXlboKVaJ9sQUdbtdDeAY=", + "signature": "H6nbUSkjshfKvpwsVh3EICtQ0PxTCSO5iMwe0LwN5MUAZztWMmEiI+QNO6iSDNe/NlfxRpENZVLL2FCBvo3omw==" + } + ], + "memo": "e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53@172.17.0.2:26656" + } + } + ] + }, + "upgrade": {}, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "create_localhost": true + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [] + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [] + } + }, + "evidence": { + "evidence": [] + }, + "transfer": { + "port_id": "transfer" + }, + "distribution": { + "params": { + "community_tax": "0.020000000000000000", + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "mint": { + "minter": { + "inflation": "0.130000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "ustake", + "inflation_rate_change": "0.130000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } } } } \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-666829b87c30fe2c35ec3ad9d955fd4acabdda8f.json b/scripts/simapp/template/.simapp/config/gentx/gentx-666829b87c30fe2c35ec3ad9d955fd4acabdda8f.json deleted file mode 100644 index 53347d31..00000000 --- a/scripts/simapp/template/.simapp/config/gentx/gentx-666829b87c30fe2c35ec3ad9d955fd4acabdda8f.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"testing"},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml4lxx9p7","validator_address":"cosmosvaloper19wm6znlfdfwk8zvmfgwxjuw4mgyw2ml46jjsdd","pubkey":"cosmosvalconspub1zcjduepq97t76hzwgxnd6cj6tx6wuyv0d3llh8qr9uhdhdzjrurl5uvxjmcqhul8gk","value":{"denom":"ustake","amount":"250000000"}}}],"fee":{"amount":[],"gas":"200000"},"signatures":[{"pub_key":"61rphyEDo5veugup1kp9T3NLAQiIk/eI21R0m82zpPRtj1y8GNQ=","signature":"QYjIsOmKs2aQAiEMFLd6X7viwHALp/lMonQi4wweMGU1lQGqztfV9xZncNXSJDljAqdj1BGjVxT9slAAaeMJgQ=="}],"memo":"666829b87c30fe2c35ec3ad9d955fd4acabdda8f@172.17.0.2:26656"}} diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json b/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json new file mode 100644 index 00000000..5d8bdbca --- /dev/null +++ b/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json @@ -0,0 +1 @@ +{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"testing"},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d","validator_address":"cosmosvaloper160hxhtgyy2tesa6y5uzec99epjekuyfhmw6la7","pubkey":"cosmosvalconspub1zcjduepq5upt3p9eqm39ct8ccey6ys4nv4wmyrez838wekf2lfr8akvcve8qdr0g6a","value":{"denom":"ustake","amount":"250000000"}}}],"fee":{"amount":[],"gas":"200000"},"signatures":[{"pub_key":"61rphyECJdjIz9unAUVohSFF7oDhGRMXlboKVaJ9sQUdbtdDeAY=","signature":"H6nbUSkjshfKvpwsVh3EICtQ0PxTCSO5iMwe0LwN5MUAZztWMmEiI+QNO6iSDNe/NlfxRpENZVLL2FCBvo3omw=="}],"memo":"e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53@172.17.0.2:26656"}} diff --git a/scripts/simapp/template/.simapp/config/node_key.json b/scripts/simapp/template/.simapp/config/node_key.json index 59b1f8eb..c9ce579d 100644 --- a/scripts/simapp/template/.simapp/config/node_key.json +++ b/scripts/simapp/template/.simapp/config/node_key.json @@ -1 +1 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"4nAO7LSVDv3A7aRFdKReCGFPG5bbn7N+HmOvD+yy5bD3n3CY+jsnSjhdzhp+Ei7XNS0AXNz6z/hjqq3gkPjbgQ=="}} \ No newline at end of file +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"YJEoJGuUb+8uNgbuZuSbv5ZG+Bgwc510zkTfuA3yQL73uDitQWG7NBUJO2JTmy9TifMsBrHClQSpyE+QvJQxtA=="}} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/priv_validator_key.json b/scripts/simapp/template/.simapp/config/priv_validator_key.json index 5dec82c2..00cd7d73 100644 --- a/scripts/simapp/template/.simapp/config/priv_validator_key.json +++ b/scripts/simapp/template/.simapp/config/priv_validator_key.json @@ -1,11 +1,11 @@ { - "address": "440C0F8873E50FDB8DDEA8F836FBA828ACF221D6", + "address": "02606461C2E26116F283E39774869ED8DC0AD668", "pub_key": { "type": "tendermint/PubKeyEd25519", - "value": "L5ftXE5Bpt1iWlm07hGPbH/7nAMvLtu0Uh8H+nGGlvA=" + "value": "pwK4hLkG4lws+MZJokKzZV2yDyI8TuzZKvpGftmYZk4=" }, "priv_key": { "type": "tendermint/PrivKeyEd25519", - "value": "RAznCBLeFaH1/OlbKzkB20pxTH+pv3LmC6mP6Pt2hM4vl+1cTkGm3WJaWbTuEY9sf/ucAy8u27RSHwf6cYaW8A==" + "value": "2XSAqOHzvsPKrynhorWNzLiNOscBiGWfhwvNkq5U5rWnAriEuQbiXCz4xkmiQrNlXbIPIjxO7Nkq+kZ+2ZhmTg==" } } \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address b/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address new file mode 100644 index 00000000..e33d5f20 --- /dev/null +++ b/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAwOTo0NjozMS4wMjgzMjI5ICswMDAwIFVUQyBtPSswLjM0NjA3NTEwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ik1WcjFiS0VmOUhfank4aFcifQ.rGcqp2J5R76xnCFm9bArZZX5Tg_60KrsPfix_yUX_6TVrScmhNWzwQ.4wRP52dlfcRosPeH.iPvij7W6B9aWpoVgijAjkD3O_gLanjrmooKXdbZvn9bKea283jS3s3nPlWTo_hcS-K7px9YzULdMmFqFgRdJ-U4vIu_3HZKFk8vpO_XkREDkSPrc4atKmCNr-JQQnHERfmRQMtSE81YAr4s9uMah9ap6MYpbLt1uyltEuq8m7T3o_Yxts4ct9rBBGffFxQ6nDUntXmidwTM7kRLIJ5pXvwMOSpdHv_qpakGZOnwzdr3sZygQ2QDp0Zpk.I1d_bvC5ToHIei8I0DtTJw \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/data/.gitkeep b/scripts/simapp/template/.simapp/data/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/simapp/template/.simapp/keyhash b/scripts/simapp/template/.simapp/keyhash index 0dcb5b5c..44917d73 100755 --- a/scripts/simapp/template/.simapp/keyhash +++ b/scripts/simapp/template/.simapp/keyhash @@ -1 +1 @@ -$2a$10$2AeLq0go9NVRoA5qsAyTUuBOfVILtn2ZqqYcwx8uuummZAMPa2wt. \ No newline at end of file +$2a$10$Tl6lBvDSTtPHDnZly2mOSueorXC5VIrutGqORJvH83vSXG21guWnm \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/validator.info b/scripts/simapp/template/.simapp/validator.info index 34b4f3ad..df51731a 100644 --- a/scripts/simapp/template/.simapp/validator.info +++ b/scripts/simapp/template/.simapp/validator.info @@ -1 +1 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0wMiAxMjowNzoyMy4xNzQ5Nzc4NjMgKzAwMDAgVVRDIG09KzAuMTc3MzMyNDA0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoicFBxLVd0emZtTGFISHRLNCJ9.hcGBhR2s8TUx0gx_4nkafYHdpp4dTNyIFq9Yuncd_wRE6jY01EcxmA.GA-GnezDkH3vxfGe.Qf1TGdR-mJkct-MLbjPTekI9xzIBpuetY81gx7ifVT5NxptOHDoT4y8lUi96rbOH6wkgI3xYzBg9ieIKFz4-mpSqSOrdwbM4wSy_mOZLLqVE05x2ld3ggSRqFhOVlq2WLydqxEgZQIlXjXRuYq5iEvB1N977bZa8QW6Rs2-8-ZjApboNxp0hkZVyanAXMF70yc0kt3HW_vFfLBbI4xKe9ENAzDhDZvNkK8bpqBJtPIL-HMoD71UYa8z58XN7HKvtozmuqYhU9iRlU6pRTov0HzvepWEFuQaVPo1yXHpmNwwF-8fP03H1wMJ_wTVuLOEjIC-PnvZuEk9KOIm9QFnIXQmw_kaTLSVb1qXfq83F-Hf-Mt4w.pmuxyqelY9tPbPDErVEjAg \ No newline at end of file +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAwOTo0NjozMS4wMTM2OTY1ICswMDAwIFVUQyBtPSswLjMzMTQ1MTAwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ik0wNU9Ibk56c1YwTE91c3gifQ.084o7E12X7Bl9oLufz_PRd5y2fkgEoHREyhsszKd8hYZmXDILE8TOA.VdGZuoDa0Dcs5zhd.2PRQRbRqUx2sKyXRlhw2iW8CFQcSTKWlBpfCDtDCqeRVuOI6q2xDM3FxQjGpJJq9-dVg2Lwd7nAUjsRa9m4s5PI9SHPFklAXL5j7d2NackEKeoJ_5yATKcDSc6FOZe1pgXGtunukLLyMIfeGFp_2O9rQEHKy02-qNdY_McKjpLN0sIrg0GVV3X-VImJXUJHwhwSKZJutNBoVg6Uoi0YB1-jbD_C60LuelZ4SZtDTUir2UCrtascK1qV1f3wvuqqn4kV7TrntaC7dEAIaTEyFqRrrotdXHzDo5mex3nWRW5ILT-0kLY7aSmZ9BPz4MkX1u4uotV9nnN3jqrlA2j_yCmlNG4Nv1mQ60lD9hPUcX1wMT8Ff.ufqSBrtF-wWpmZMPKRv7hQ \ No newline at end of file diff --git a/scripts/simapp/template/setup.sh b/scripts/simapp/template/setup.sh index d274693c..f7b1e4a8 100755 --- a/scripts/simapp/template/setup.sh +++ b/scripts/simapp/template/setup.sh @@ -7,19 +7,24 @@ STAKE=${STAKE_TOKEN:-ustake} FEE=${FEE_TOKEN:-ucosm} CHAIN_ID=${CHAIN_ID:-testing} -simd init --chain-id="$CHAIN_ID" "$CHAIN_ID" -# staking/governance token is hardcoded in config, change this -sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json -if ! simcli keys show validator; then - (echo "$PASSWORD"; echo "$PASSWORD") | simcli keys add validator +echo "Creating genesis ..." +simd init --chain-id "$CHAIN_ID" "$CHAIN_ID" +sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this + +echo "Setting up validator ..." +if ! simd keys show validator; then + (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator fi # hardcode the validator account for this instance echo "$PASSWORD" | simd add-genesis-account validator "1000000000$STAKE,1000000000$FEE" + +echo "Setting up accounts ..." # (optionally) add a few more genesis accounts for addr in "$@"; do echo $addr simd add-genesis-account "$addr" "1000000000$STAKE,1000000000$FEE" done -# submit a genesis validator tx -(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx --name validator --amount "250000000$STAKE" + +echo "Creating genesis tx ..." +(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx validator --amount "250000000$STAKE" --chain-id "$CHAIN_ID" simd collect-gentxs From 4b812c3123550f02493d09746c6603f04243411e Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 29 Jul 2020 14:37:01 +0200 Subject: [PATCH 2/9] Use dedicated moniker; regenerate; check-in priv_validator_state.json --- scripts/simapp/setup.sh | 3 +- ...0cca1189f1074bffb9efc176c6fd7e2e38.address | 1 + .../template/.simapp/config/addrbook.json | 4 - .../template/.simapp/config/config.toml | 2 +- .../template/.simapp/config/genesis.json | 512 +++++++++--------- ...cbfaca8ecb898784bacca9facf262b796e201.json | 1 + ...8e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json | 1 - .../template/.simapp/config/node_key.json | 2 +- .../.simapp/config/priv_validator_key.json | 6 +- ...ad042297987744a7059c14b90cb36e1137.address | 1 - .../.simapp/data/priv_validator_state.json | 5 + scripts/simapp/template/.simapp/keyhash | 2 +- .../simapp/template/.simapp/validator.info | 2 +- scripts/simapp/template/setup.sh | 5 +- 14 files changed, 275 insertions(+), 272 deletions(-) create mode 100644 scripts/simapp/template/.simapp/be69af0cca1189f1074bffb9efc176c6fd7e2e38.address delete mode 100644 scripts/simapp/template/.simapp/config/addrbook.json create mode 100644 scripts/simapp/template/.simapp/config/gentx/gentx-6dbcbfaca8ecb898784bacca9facf262b796e201.json delete mode 100644 scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json delete mode 100644 scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address create mode 100644 scripts/simapp/template/.simapp/data/priv_validator_state.json diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh index d5e7b79f..d6755cb1 100755 --- a/scripts/simapp/setup.sh +++ b/scripts/simapp/setup.sh @@ -6,9 +6,10 @@ PASSWORD=${PASSWORD:-1234567890} STAKE=${STAKE_TOKEN:-ustake} FEE=${FEE_TOKEN:-ucosm} CHAIN_ID=${CHAIN_ID:-simd-testing} +MONIKER=${MONIKER:-simd-moniker} echo "Creating genesis ..." -simd init --chain-id "$CHAIN_ID" "$CHAIN_ID" +simd init --chain-id "$CHAIN_ID" "$MONIKER" sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this echo "Setting up validator ..." diff --git a/scripts/simapp/template/.simapp/be69af0cca1189f1074bffb9efc176c6fd7e2e38.address b/scripts/simapp/template/.simapp/be69af0cca1189f1074bffb9efc176c6fd7e2e38.address new file mode 100644 index 00000000..f841893e --- /dev/null +++ b/scripts/simapp/template/.simapp/be69af0cca1189f1074bffb9efc176c6fd7e2e38.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAxMjozMzo0My4yNzMwNzc0ICswMDAwIFVUQyBtPSswLjQyMDc1MDIwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ik1QUEpoYXdfUE9CTk84ckcifQ.1qbmeelJhpCbCgKFx3RUYchhFtsZhl8HpVe2TIk_ioOt4LE9zJ1a5A.rYvjRK55ePe7O9JU.-RTRUDq1_79yOeZoXXUyyiVlanfHFjlmxQ8ZdtDCfLg8OcIgEvQYWpQG0NXFVQSaV3yYc8m1sWuXQqnMH5pm9kgxFWq7jahobz9a70d9WibfAUNBqdcvC7AyvM1L8eWIo1a_HJV_C1-CkZDjUuAK4MDj8KReC4NFbOKW_A1rNkJxCrVX7m1v2SQF9fEAEepnEZzYtH0LFDTZYNhpwt8o-ofk-47lPYr0KJB6CXaMv2CJ2clRTg12V_a0.Xv8QuXyJcO_9ZLK6LBhBkg \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/addrbook.json b/scripts/simapp/template/.simapp/config/addrbook.json deleted file mode 100644 index edd624ad..00000000 --- a/scripts/simapp/template/.simapp/config/addrbook.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "key": "86da05cfcdca4b52c778c78a", - "addrs": [] -} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/config.toml b/scripts/simapp/template/.simapp/config/config.toml index 2e8062c5..3e4cabc4 100644 --- a/scripts/simapp/template/.simapp/config/config.toml +++ b/scripts/simapp/template/.simapp/config/config.toml @@ -13,7 +13,7 @@ proxy_app = "tcp://127.0.0.1:26658" # A custom human readable name for this node -moniker = "testing" +moniker = "simd-moniker" # If this node is many blocks behind the tip of the chain, FastSync # allows them to catchup quickly by downloading blocks in parallel diff --git a/scripts/simapp/template/.simapp/config/genesis.json b/scripts/simapp/template/.simapp/config/genesis.json index 97da4b3b..e5a6e25e 100644 --- a/scripts/simapp/template/.simapp/config/genesis.json +++ b/scripts/simapp/template/.simapp/config/genesis.json @@ -1,6 +1,6 @@ { - "genesis_time": "2020-07-29T09:46:30.433319Z", - "chain_id": "testing", + "genesis_time": "2020-07-29T12:33:42.4598863Z", + "chain_id": "simd-testing", "consensus_params": { "block": { "max_bytes": "22020096", @@ -19,6 +19,189 @@ }, "app_hash": "", "app_state": { + "mint": { + "minter": { + "inflation": "0.130000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "ustake", + "inflation_rate_change": "0.130000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } + }, + "params": null, + "slashing": { + "params": { + "signed_blocks_window": "100", + "min_signed_per_window": "0.500000000000000000", + "downtime_jail_duration": "600000000000", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": {}, + "missed_blocks": {} + }, + "staking": { + "params": { + "unbonding_time": "1814400000000000", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 100, + "bond_denom": "ustake" + }, + "last_total_power": "0", + "last_validator_powers": null, + "validators": null, + "delegations": null, + "unbonding_delegations": null, + "redelegations": null + }, + "transfer": { + "port_id": "transfer" + }, + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1he567rx2zxylzp6tl7u7lstkcm7hut3cfv966s" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u" + } + }, + { + "type": "cosmos-sdk/BaseAccount", + "value": { + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej" + } + } + ] + }, + "upgrade": {}, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "create_localhost": true + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [] + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [] + } + }, "gov": { "starting_proposal_id": "1", "deposits": null, @@ -42,16 +225,23 @@ "veto": "0.334000000000000000" } }, - "slashing": { + "distribution": { "params": { - "signed_blocks_window": "100", - "min_signed_per_window": "0.500000000000000000", - "downtime_jail_duration": "600000000000", - "slash_fraction_double_sign": "0.050000000000000000", - "slash_fraction_downtime": "0.010000000000000000" + "community_tax": "0.020000000000000000", + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "withdraw_addr_enabled": true }, - "signing_infos": {}, - "missed_blocks": {} + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] }, "crisis": { "constant_fee": { @@ -59,6 +249,49 @@ "amount": "1000" } }, + "genutil": { + "gentxs": [ + { + "type": "cosmos-sdk/StdTx", + "value": { + "msg": [ + { + "type": "cosmos-sdk/MsgCreateValidator", + "value": { + "description": { + "moniker": "simd-moniker" + }, + "commission": { + "rate": "0.100000000000000000", + "max_rate": "0.200000000000000000", + "max_change_rate": "0.010000000000000000" + }, + "min_self_delegation": "1", + "delegator_address": "cosmos1he567rx2zxylzp6tl7u7lstkcm7hut3cfv966s", + "validator_address": "cosmosvaloper1he567rx2zxylzp6tl7u7lstkcm7hut3cvc30kr", + "pubkey": "cosmosvalconspub1zcjduepq2r9g6vm7ss5m6ae34xpp33w87glwnrf0480pwlt5tf445scc3dkqxmewyp", + "value": { + "denom": "ustake", + "amount": "250000000" + } + } + } + ], + "fee": { + "amount": [], + "gas": "200000" + }, + "signatures": [ + { + "pub_key": "61rphyEDiRqk1Quo95zzOYnlLvQcUI09YZBXaxrst6RlfQuTyUI=", + "signature": "nA7GOLRiwa0XeVru59l4GuAxVgJEEYO1pFdszC9H1qxXn/5Lk0Pwq7SyMS7IsZcBReijt3MCkjzfBezTwEr6Ww==" + } + ], + "memo": "6dbcbfaca8ecb898784bacca9facf262b796e201@172.17.0.2:26656" + } + } + ] + }, "bank": { "params": { "default_send_enabled": true @@ -207,6 +440,19 @@ } ] }, + { + "address": "cosmos1he567rx2zxylzp6tl7u7lstkcm7hut3cfv966s", + "coins": [ + { + "denom": "ucosm", + "amount": "1000000000" + }, + { + "denom": "ustake", + "amount": "1000000000" + } + ] + }, { "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u", "coins": [ @@ -233,19 +479,6 @@ } ] }, - { - "address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d", - "coins": [ - { - "denom": "ucosm", - "amount": "1000000000" - }, - { - "denom": "ustake", - "amount": "1000000000" - } - ] - }, { "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", "coins": [ @@ -302,245 +535,12 @@ "supply": [], "denom_metadata": null }, - "params": null, - "staking": { - "params": { - "unbonding_time": "1814400000000000", - "max_validators": 100, - "max_entries": 7, - "historical_entries": 100, - "bond_denom": "ustake" - }, - "last_total_power": "0", - "last_validator_powers": null, - "validators": null, - "delegations": null, - "unbonding_delegations": null, - "redelegations": null - }, "capability": { "index": "1", "owners": [] }, - "auth": { - "params": { - "max_memo_characters": "256", - "tx_sig_limit": "7", - "tx_size_cost_per_byte": "10", - "sig_verify_cost_ed25519": "590", - "sig_verify_cost_secp256k1": "1000" - }, - "accounts": [ - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u" - } - }, - { - "type": "cosmos-sdk/BaseAccount", - "value": { - "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej" - } - } - ] - }, - "genutil": { - "gentxs": [ - { - "type": "cosmos-sdk/StdTx", - "value": { - "msg": [ - { - "type": "cosmos-sdk/MsgCreateValidator", - "value": { - "description": { - "moniker": "testing" - }, - "commission": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "min_self_delegation": "1", - "delegator_address": "cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d", - "validator_address": "cosmosvaloper160hxhtgyy2tesa6y5uzec99epjekuyfhmw6la7", - "pubkey": "cosmosvalconspub1zcjduepq5upt3p9eqm39ct8ccey6ys4nv4wmyrez838wekf2lfr8akvcve8qdr0g6a", - "value": { - "denom": "ustake", - "amount": "250000000" - } - } - } - ], - "fee": { - "amount": [], - "gas": "200000" - }, - "signatures": [ - { - "pub_key": "61rphyECJdjIz9unAUVohSFF7oDhGRMXlboKVaJ9sQUdbtdDeAY=", - "signature": "H6nbUSkjshfKvpwsVh3EICtQ0PxTCSO5iMwe0LwN5MUAZztWMmEiI+QNO6iSDNe/NlfxRpENZVLL2FCBvo3omw==" - } - ], - "memo": "e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53@172.17.0.2:26656" - } - } - ] - }, - "upgrade": {}, - "ibc": { - "client_genesis": { - "clients": [], - "clients_consensus": [], - "create_localhost": true - }, - "connection_genesis": { - "connections": [], - "client_connection_paths": [] - }, - "channel_genesis": { - "channels": [], - "acknowledgements": [], - "commitments": [], - "send_sequences": [], - "recv_sequences": [], - "ack_sequences": [] - } - }, "evidence": { "evidence": [] - }, - "transfer": { - "port_id": "transfer" - }, - "distribution": { - "params": { - "community_tax": "0.020000000000000000", - "base_proposer_reward": "0.010000000000000000", - "bonus_proposer_reward": "0.040000000000000000", - "withdraw_addr_enabled": true - }, - "fee_pool": { - "community_pool": [] - }, - "delegator_withdraw_infos": [], - "outstanding_rewards": [], - "validator_accumulated_commissions": [], - "validator_historical_rewards": [], - "validator_current_rewards": [], - "delegator_starting_infos": [], - "validator_slash_events": [] - }, - "mint": { - "minter": { - "inflation": "0.130000000000000000", - "annual_provisions": "0.000000000000000000" - }, - "params": { - "mint_denom": "ustake", - "inflation_rate_change": "0.130000000000000000", - "inflation_max": "0.200000000000000000", - "inflation_min": "0.070000000000000000", - "goal_bonded": "0.670000000000000000", - "blocks_per_year": "6311520" - } } } } \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-6dbcbfaca8ecb898784bacca9facf262b796e201.json b/scripts/simapp/template/.simapp/config/gentx/gentx-6dbcbfaca8ecb898784bacca9facf262b796e201.json new file mode 100644 index 00000000..0891ec2f --- /dev/null +++ b/scripts/simapp/template/.simapp/config/gentx/gentx-6dbcbfaca8ecb898784bacca9facf262b796e201.json @@ -0,0 +1 @@ +{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"simd-moniker"},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos1he567rx2zxylzp6tl7u7lstkcm7hut3cfv966s","validator_address":"cosmosvaloper1he567rx2zxylzp6tl7u7lstkcm7hut3cvc30kr","pubkey":"cosmosvalconspub1zcjduepq2r9g6vm7ss5m6ae34xpp33w87glwnrf0480pwlt5tf445scc3dkqxmewyp","value":{"denom":"ustake","amount":"250000000"}}}],"fee":{"amount":[],"gas":"200000"},"signatures":[{"pub_key":"61rphyEDiRqk1Quo95zzOYnlLvQcUI09YZBXaxrst6RlfQuTyUI=","signature":"nA7GOLRiwa0XeVru59l4GuAxVgJEEYO1pFdszC9H1qxXn/5Lk0Pwq7SyMS7IsZcBReijt3MCkjzfBezTwEr6Ww=="}],"memo":"6dbcbfaca8ecb898784bacca9facf262b796e201@172.17.0.2:26656"}} diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json b/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json deleted file mode 100644 index 5d8bdbca..00000000 --- a/scripts/simapp/template/.simapp/config/gentx/gentx-e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"testing"},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos160hxhtgyy2tesa6y5uzec99epjekuyfh76w23d","validator_address":"cosmosvaloper160hxhtgyy2tesa6y5uzec99epjekuyfhmw6la7","pubkey":"cosmosvalconspub1zcjduepq5upt3p9eqm39ct8ccey6ys4nv4wmyrez838wekf2lfr8akvcve8qdr0g6a","value":{"denom":"ustake","amount":"250000000"}}}],"fee":{"amount":[],"gas":"200000"},"signatures":[{"pub_key":"61rphyECJdjIz9unAUVohSFF7oDhGRMXlboKVaJ9sQUdbtdDeAY=","signature":"H6nbUSkjshfKvpwsVh3EICtQ0PxTCSO5iMwe0LwN5MUAZztWMmEiI+QNO6iSDNe/NlfxRpENZVLL2FCBvo3omw=="}],"memo":"e268e0e1b22a7ac8c012fc7e0eee4fa7e116fb53@172.17.0.2:26656"}} diff --git a/scripts/simapp/template/.simapp/config/node_key.json b/scripts/simapp/template/.simapp/config/node_key.json index c9ce579d..3e68a2f2 100644 --- a/scripts/simapp/template/.simapp/config/node_key.json +++ b/scripts/simapp/template/.simapp/config/node_key.json @@ -1 +1 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"YJEoJGuUb+8uNgbuZuSbv5ZG+Bgwc510zkTfuA3yQL73uDitQWG7NBUJO2JTmy9TifMsBrHClQSpyE+QvJQxtA=="}} \ No newline at end of file +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"WG36bpfjSh8gy3HBWU4buv4sA6b8SrRa4Jj5sjo2CXyPRlP2d8Br7UNztMkUSomavPEZoUo2WzlzZ2XnyPi0rQ=="}} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/priv_validator_key.json b/scripts/simapp/template/.simapp/config/priv_validator_key.json index 00cd7d73..a28b53e4 100644 --- a/scripts/simapp/template/.simapp/config/priv_validator_key.json +++ b/scripts/simapp/template/.simapp/config/priv_validator_key.json @@ -1,11 +1,11 @@ { - "address": "02606461C2E26116F283E39774869ED8DC0AD668", + "address": "69EA0594C2B1320ABFC6EEE8B9BF421DA9FD9195", "pub_key": { "type": "tendermint/PubKeyEd25519", - "value": "pwK4hLkG4lws+MZJokKzZV2yDyI8TuzZKvpGftmYZk4=" + "value": "UMqNM36EKb13MamCGMXH8j7pjS+p3hd9dFprWkMYi2w=" }, "priv_key": { "type": "tendermint/PrivKeyEd25519", - "value": "2XSAqOHzvsPKrynhorWNzLiNOscBiGWfhwvNkq5U5rWnAriEuQbiXCz4xkmiQrNlXbIPIjxO7Nkq+kZ+2ZhmTg==" + "value": "n8wH/j0kqdFfGVfvEbR1JVJeXps84BU+gNJ0kz+KJmFQyo0zfoQpvXcxqYIYxcfyPumNL6neF310WmtaQxiLbA==" } } \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address b/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address deleted file mode 100644 index e33d5f20..00000000 --- a/scripts/simapp/template/.simapp/d3ee6bad042297987744a7059c14b90cb36e1137.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAwOTo0NjozMS4wMjgzMjI5ICswMDAwIFVUQyBtPSswLjM0NjA3NTEwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ik1WcjFiS0VmOUhfank4aFcifQ.rGcqp2J5R76xnCFm9bArZZX5Tg_60KrsPfix_yUX_6TVrScmhNWzwQ.4wRP52dlfcRosPeH.iPvij7W6B9aWpoVgijAjkD3O_gLanjrmooKXdbZvn9bKea283jS3s3nPlWTo_hcS-K7px9YzULdMmFqFgRdJ-U4vIu_3HZKFk8vpO_XkREDkSPrc4atKmCNr-JQQnHERfmRQMtSE81YAr4s9uMah9ap6MYpbLt1uyltEuq8m7T3o_Yxts4ct9rBBGffFxQ6nDUntXmidwTM7kRLIJ5pXvwMOSpdHv_qpakGZOnwzdr3sZygQ2QDp0Zpk.I1d_bvC5ToHIei8I0DtTJw \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/data/priv_validator_state.json b/scripts/simapp/template/.simapp/data/priv_validator_state.json new file mode 100644 index 00000000..ca3ad2f7 --- /dev/null +++ b/scripts/simapp/template/.simapp/data/priv_validator_state.json @@ -0,0 +1,5 @@ +{ + "height": "0", + "round": "0", + "step": 0 +} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/keyhash b/scripts/simapp/template/.simapp/keyhash index 44917d73..977be397 100755 --- a/scripts/simapp/template/.simapp/keyhash +++ b/scripts/simapp/template/.simapp/keyhash @@ -1 +1 @@ -$2a$10$Tl6lBvDSTtPHDnZly2mOSueorXC5VIrutGqORJvH83vSXG21guWnm \ No newline at end of file +$2a$10$0haA89aJOZcjF4Vqcx99jeXOoDDnYym3wvGNHxxBdfoDOhvXdjumu \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/validator.info b/scripts/simapp/template/.simapp/validator.info index df51731a..92d91fb4 100644 --- a/scripts/simapp/template/.simapp/validator.info +++ b/scripts/simapp/template/.simapp/validator.info @@ -1 +1 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAwOTo0NjozMS4wMTM2OTY1ICswMDAwIFVUQyBtPSswLjMzMTQ1MTAwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ik0wNU9Ibk56c1YwTE91c3gifQ.084o7E12X7Bl9oLufz_PRd5y2fkgEoHREyhsszKd8hYZmXDILE8TOA.VdGZuoDa0Dcs5zhd.2PRQRbRqUx2sKyXRlhw2iW8CFQcSTKWlBpfCDtDCqeRVuOI6q2xDM3FxQjGpJJq9-dVg2Lwd7nAUjsRa9m4s5PI9SHPFklAXL5j7d2NackEKeoJ_5yATKcDSc6FOZe1pgXGtunukLLyMIfeGFp_2O9rQEHKy02-qNdY_McKjpLN0sIrg0GVV3X-VImJXUJHwhwSKZJutNBoVg6Uoi0YB1-jbD_C60LuelZ4SZtDTUir2UCrtascK1qV1f3wvuqqn4kV7TrntaC7dEAIaTEyFqRrrotdXHzDo5mex3nWRW5ILT-0kLY7aSmZ9BPz4MkX1u4uotV9nnN3jqrlA2j_yCmlNG4Nv1mQ60lD9hPUcX1wMT8Ff.ufqSBrtF-wWpmZMPKRv7hQ \ No newline at end of file +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0wNy0yOSAxMjozMzo0My4yNTA3MTQxICswMDAwIFVUQyBtPSswLjM5ODMzOTYwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6ImJUWEFGbmd6dlpGU0xIdUgifQ.OblR71PYvd-hM-i-umBX-8Rufz8oDYhC0YBf_NS8VjM8r_D0Dkg2Mg.ll8r6qH1V9srND3w.skQG_BTTBvr6lbxD5qQAqumjRk0Hpp160lCLaIhf0vJ0rmd93p66HmfxQd3ZLCODuPz_XRUefmrIlw6k5b0jYjvcb9qEKJxb2emDNd_8lRp4v5Z6SpeLNMpGRjP0_cDtaCUlYb-yuJ-aebAK_ftwr6kWgB8fJkdMhVRrTdsNjPxk-o9q9IWT_7aWvlnbjdXBi-IwKqZE-mqLxR3HnF2m5K4NnnW9EMzLZM3B_LoLjEGnnSl5IYVaGy-LC1EbINPbj2DDetxUj7atXwY3GJOsIU0VX26NdNHKvv29UWkGdg8vgJlvhKX0-_GFIKP3L_a6S6klnAngowlQPvYIXOq8AX8chk47yUmGeREmFcrZKFfyfF5Z.gu6X671jqogyqHOoHiKnxQ \ No newline at end of file diff --git a/scripts/simapp/template/setup.sh b/scripts/simapp/template/setup.sh index f7b1e4a8..d6755cb1 100755 --- a/scripts/simapp/template/setup.sh +++ b/scripts/simapp/template/setup.sh @@ -5,10 +5,11 @@ command -v shellcheck > /dev/null && shellcheck "$0" PASSWORD=${PASSWORD:-1234567890} STAKE=${STAKE_TOKEN:-ustake} FEE=${FEE_TOKEN:-ucosm} -CHAIN_ID=${CHAIN_ID:-testing} +CHAIN_ID=${CHAIN_ID:-simd-testing} +MONIKER=${MONIKER:-simd-moniker} echo "Creating genesis ..." -simd init --chain-id "$CHAIN_ID" "$CHAIN_ID" +simd init --chain-id "$CHAIN_ID" "$MONIKER" sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this echo "Setting up validator ..." From aa31b6c870e7e137cd791bd3ed7f62f8c35cbc7d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 29 Jul 2020 15:30:53 +0200 Subject: [PATCH 3/9] Switch to interchainio/simapp --- scripts/simapp/env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/simapp/env b/scripts/simapp/env index cf08ed75..487d4444 100644 --- a/scripts/simapp/env +++ b/scripts/simapp/env @@ -1,4 +1,4 @@ -# Choose from https://hub.docker.com/r/marbar3778/simapp/tags -REPOSITORY="marbar3778/simapp" +# Choose from https://hub.docker.com/r/interchainio/simapp/tags +REPOSITORY="interchainio/simapp" VERSION="nightly-2020-07-29" CONTAINER_NAME="simapp" From 4ece47e0e0c14c333b64fd411647f98769683992 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 20:44:06 +0200 Subject: [PATCH 4/9] Mount /root to simapp_data on chain start --- scripts/simapp/generate_template.sh | 4 ++-- scripts/simapp/run_simd.sh | 2 +- scripts/simapp/setup.sh | 0 scripts/simapp/start.sh | 8 ++++++-- scripts/simapp/template/run_simd.sh | 2 +- scripts/wasmd/start.sh | 4 +++- 6 files changed, 13 insertions(+), 7 deletions(-) mode change 100755 => 100644 scripts/simapp/run_simd.sh mode change 100755 => 100644 scripts/simapp/setup.sh diff --git a/scripts/simapp/generate_template.sh b/scripts/simapp/generate_template.sh index dff9811e..26dee504 100755 --- a/scripts/simapp/generate_template.sh +++ b/scripts/simapp/generate_template.sh @@ -9,8 +9,8 @@ source "$SCRIPT_DIR"/env rm -rf "$SCRIPT_DIR/template" mkdir "$SCRIPT_DIR/template" -cp setup.sh "$SCRIPT_DIR/template/" -cp run_simd.sh "$SCRIPT_DIR/template/" +cp setup.sh "$SCRIPT_DIR/template/" && chmod +x "$SCRIPT_DIR/template/setup.sh" +cp run_simd.sh "$SCRIPT_DIR/template/" && chmod +x "$SCRIPT_DIR/template/run_simd.sh" # The usage of the accounts below is documented in README.md of this directory docker run --rm \ diff --git a/scripts/simapp/run_simd.sh b/scripts/simapp/run_simd.sh old mode 100755 new mode 100644 index 7a66bbbb..3264dacc --- a/scripts/simapp/run_simd.sh +++ b/scripts/simapp/run_simd.sh @@ -2,6 +2,6 @@ set -o errexit -o nounset -o pipefail command -v shellcheck > /dev/null && shellcheck "$0" +cp -R "/template/.simapp" /root mkdir -p /root/log - simd start --rpc.laddr tcp://0.0.0.0:26657 --trace diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh old mode 100755 new mode 100644 diff --git a/scripts/simapp/start.sh b/scripts/simapp/start.sh index 7d66da2c..ad11f87e 100755 --- a/scripts/simapp/start.sh +++ b/scripts/simapp/start.sh @@ -15,12 +15,16 @@ echo "Using temporary dir $TMP_DIR" SIMD_LOGFILE="$TMP_DIR/simd.log" PORT=26657 +# Use a fresh volume for every start +docker volume rm -f simapp_data + docker run --rm \ --name "$CONTAINER_NAME" \ -p "$PORT:$PORT" \ - --mount type=bind,source="$SCRIPT_DIR/template",target=/root \ + --mount type=bind,source="$SCRIPT_DIR/template",target=/template \ + --mount type=volume,source=simapp_data,target=/root \ "$REPOSITORY:$VERSION" \ - ./run_simd.sh \ + /template/run_simd.sh \ > "$SIMD_LOGFILE" & echo "simd running on http://localhost:$PORT and logging into $SIMD_LOGFILE" diff --git a/scripts/simapp/template/run_simd.sh b/scripts/simapp/template/run_simd.sh index 7a66bbbb..3264dacc 100755 --- a/scripts/simapp/template/run_simd.sh +++ b/scripts/simapp/template/run_simd.sh @@ -2,6 +2,6 @@ set -o errexit -o nounset -o pipefail command -v shellcheck > /dev/null && shellcheck "$0" +cp -R "/template/.simapp" /root mkdir -p /root/log - simd start --rpc.laddr tcp://0.0.0.0:26657 --trace diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh index 06223a77..fdd04568 100755 --- a/scripts/wasmd/start.sh +++ b/scripts/wasmd/start.sh @@ -17,9 +17,11 @@ echo "Using temporary dir $TMP_DIR" WASMD_LOGFILE="$TMP_DIR/wasmd.log" REST_SERVER_LOGFILE="$TMP_DIR/rest-server.log" +# Use a fresh volume for every start +docker volume rm -f wasmd_data + # This starts up wasmd # The Tendermint port (26657) and the p2p port (26656) are not exposed since we don't need for testing -docker volume rm -f wasmd_data docker run --rm \ --name "$CONTAINER_NAME" \ -p "$REST_PORT_HOST":"$REST_PORT_GUEST" \ From 29644a219e25dd3bbe3f3f6cc08ab9a9cb353a75 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 20:47:59 +0200 Subject: [PATCH 5/9] Rename REST_ -> LCD_API_ --- scripts/wasmd/start.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh index fdd04568..50ee88ed 100755 --- a/scripts/wasmd/start.sh +++ b/scripts/wasmd/start.sh @@ -2,8 +2,10 @@ set -o errexit -o nounset -o pipefail command -v shellcheck > /dev/null && shellcheck "$0" -REST_PORT_GUEST="1317" -REST_PORT_HOST="1317" +LCD_API_PORT_GUEST="1317" +LCD_API_PORT_HOST="1317" +# Tendermint port (26657) and p2p port (26656) are not exposed since we don't need them for testing + SCRIPT_DIR="$(realpath "$(dirname "$0")")" # shellcheck source=./env # shellcheck disable=SC1091 @@ -21,10 +23,9 @@ REST_SERVER_LOGFILE="$TMP_DIR/rest-server.log" docker volume rm -f wasmd_data # This starts up wasmd -# The Tendermint port (26657) and the p2p port (26656) are not exposed since we don't need for testing docker run --rm \ --name "$CONTAINER_NAME" \ - -p "$REST_PORT_HOST":"$REST_PORT_GUEST" \ + -p "$LCD_API_PORT_HOST":"$LCD_API_PORT_GUEST" \ --mount type=bind,source="$SCRIPT_DIR/template",target=/template \ --mount type=volume,source=wasmd_data,target=/root \ "$REPOSITORY:$VERSION" \ @@ -50,10 +51,10 @@ docker exec "$CONTAINER_NAME" \ --node tcp://localhost:26657 \ --trust-node \ --unsafe-cors \ - --laddr "tcp://0.0.0.0:$REST_PORT_GUEST" \ + --laddr "tcp://0.0.0.0:$LCD_API_PORT_GUEST" \ > "$REST_SERVER_LOGFILE" & -echo "rest server running on http://localhost:$REST_PORT_HOST and logging into $REST_SERVER_LOGFILE" +echo "rest server running on http://localhost:$LCD_API_PORT_HOST and logging into $REST_SERVER_LOGFILE" # Give REST server some time to come alive. No idea why this helps. Needed for CI. if [ -n "${CI:-}" ]; then From fcb213c39f326355f08620fa696d2c48fd204b52 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 20:52:51 +0200 Subject: [PATCH 6/9] Make simd ports more explicit --- scripts/simapp/start.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/simapp/start.sh b/scripts/simapp/start.sh index ad11f87e..0b8a2b3d 100755 --- a/scripts/simapp/start.sh +++ b/scripts/simapp/start.sh @@ -2,6 +2,9 @@ set -o errexit -o nounset -o pipefail command -v shellcheck > /dev/null && shellcheck "$0" +TENDERMINT_PORT_GUEST="26657" +TENDERMINT_PORT_HOST="26657" + SCRIPT_DIR="$(realpath "$(dirname "$0")")" # shellcheck source=./env # shellcheck disable=SC1091 @@ -13,21 +16,20 @@ TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/simapp.XXXXXXXXX") chmod 777 "$TMP_DIR" echo "Using temporary dir $TMP_DIR" SIMD_LOGFILE="$TMP_DIR/simd.log" -PORT=26657 # Use a fresh volume for every start docker volume rm -f simapp_data docker run --rm \ --name "$CONTAINER_NAME" \ - -p "$PORT:$PORT" \ + -p "$TENDERMINT_PORT_HOST":"$TENDERMINT_PORT_GUEST" \ --mount type=bind,source="$SCRIPT_DIR/template",target=/template \ --mount type=volume,source=simapp_data,target=/root \ "$REPOSITORY:$VERSION" \ /template/run_simd.sh \ > "$SIMD_LOGFILE" & -echo "simd running on http://localhost:$PORT and logging into $SIMD_LOGFILE" +echo "simd running on http://localhost:$TENDERMINT_PORT_HOST and logging into $SIMD_LOGFILE" if [ -n "${CI:-}" ]; then # Follow the logs in CI's background job From 03db5b5f01646e738e12c07c4278046923fc31b4 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 20:54:34 +0200 Subject: [PATCH 7/9] Fix wasmd temp file pattern --- scripts/wasmd/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh index 50ee88ed..6aee3adf 100755 --- a/scripts/wasmd/start.sh +++ b/scripts/wasmd/start.sh @@ -13,7 +13,7 @@ source "$SCRIPT_DIR"/env echo "$CONTAINER_NAME" -TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/gaia.XXXXXXXXX") +TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/wasmd.XXXXXXXXX") chmod 777 "$TMP_DIR" echo "Using temporary dir $TMP_DIR" WASMD_LOGFILE="$TMP_DIR/wasmd.log" From b47168dd2d701ccbc5fcd694de296690139cddd6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 20:56:53 +0200 Subject: [PATCH 8/9] Remove container name debugging --- scripts/simapp/start.sh | 2 -- scripts/wasmd/start.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/scripts/simapp/start.sh b/scripts/simapp/start.sh index 0b8a2b3d..6fef2b4d 100755 --- a/scripts/simapp/start.sh +++ b/scripts/simapp/start.sh @@ -10,8 +10,6 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")" # shellcheck disable=SC1091 source "$SCRIPT_DIR"/env -echo "$CONTAINER_NAME" - TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/simapp.XXXXXXXXX") chmod 777 "$TMP_DIR" echo "Using temporary dir $TMP_DIR" diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh index 6aee3adf..0d540321 100755 --- a/scripts/wasmd/start.sh +++ b/scripts/wasmd/start.sh @@ -11,8 +11,6 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")" # shellcheck disable=SC1091 source "$SCRIPT_DIR"/env -echo "$CONTAINER_NAME" - TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/wasmd.XXXXXXXXX") chmod 777 "$TMP_DIR" echo "Using temporary dir $TMP_DIR" From dcb10352aa84f5e8c0309ab971505d6552585830 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Aug 2020 21:12:50 +0200 Subject: [PATCH 9/9] Add log entry when generating validator --- scripts/simapp/setup.sh | 1 + scripts/simapp/template/setup.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh index d6755cb1..6d61efb0 100644 --- a/scripts/simapp/setup.sh +++ b/scripts/simapp/setup.sh @@ -14,6 +14,7 @@ sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/g echo "Setting up validator ..." if ! simd keys show validator; then + echo "Validator does not yet exist. Creating it ..." (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator fi # hardcode the validator account for this instance diff --git a/scripts/simapp/template/setup.sh b/scripts/simapp/template/setup.sh index d6755cb1..6d61efb0 100755 --- a/scripts/simapp/template/setup.sh +++ b/scripts/simapp/template/setup.sh @@ -14,6 +14,7 @@ sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/g echo "Setting up validator ..." if ! simd keys show validator; then + echo "Validator does not yet exist. Creating it ..." (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator fi # hardcode the validator account for this instance