From c1bb094dee636d2e6250ee6e5a0be3624103b939 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 6 Jul 2022 08:54:33 +0200 Subject: [PATCH 01/16] Add slow simapp ports --- HACKING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HACKING.md b/HACKING.md index 8f520d3a..15cfd620 100644 --- a/HACKING.md +++ b/HACKING.md @@ -109,6 +109,7 @@ order to avoid conflicts. Here is an overview of the ports used: | ----- | ------------------------------ | ------------------------------- | | 1318 | simapp LCD API | Manual Stargate debugging | | 1319 | wasmd LCD API | Manual Stargate debugging | +| 1320 | simapp slow LCD API | Manual Stargate debugging | | 4444 | socketserver | @cosmjs/sockets tests | | 4445 | socketserver slow | @cosmjs/sockets tests | | 5555 | httpserver | @cosmjs/tendermint-rpc tests | @@ -117,3 +118,4 @@ order to avoid conflicts. Here is an overview of the ports used: | 11135 | Standalone Tendermint 0.35 RPC | @cosmjs/tendermint-rpc tests | | 26658 | simapp Tendermint RPC | Stargate client tests | | 26659 | wasmd Tendermint RPC | @cosmjs/cosmwasm-stargate tests | +| 26660 | simapp slow Tendermint RPC | Stargate client tests | From fa550fe5722eb1c70e158172e7649e9314c6eeb9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 6 Jul 2022 08:55:00 +0200 Subject: [PATCH 02/16] Add simapp46 folder --- scripts/simapp46/.gitignore | 1 + scripts/simapp46/README.md | 66 ++ scripts/simapp46/env | 5 + scripts/simapp46/generate_template.sh | 73 ++ scripts/simapp46/generate_template_slow.sh | 22 + scripts/simapp46/run_simd.sh | 7 + scripts/simapp46/setup.sh | 47 + scripts/simapp46/slow_start.sh | 42 + scripts/simapp46/slow_stop.sh | 11 + scripts/simapp46/start.sh | 45 + scripts/simapp46/stop.sh | 11 + .../simapp46/template/.simapp/config/app.toml | 152 +++ .../template/.simapp/config/config.toml | 393 ++++++++ .../template/.simapp/config/genesis.json | 666 +++++++++++++ ...cdbcfe545eaaaea99378bc70bf22eef3401a4.json | 1 + .../template/.simapp/config/node_key.json | 1 + .../.simapp/config/priv_validator_key.json | 11 + ...13d84ba0fed8a6a4f9ef9abc9967a402c3.address | 1 + scripts/simapp46/template/.simapp/keyhash | 1 + .../simapp46/template/.simapp/validator.info | 1 + scripts/simapp46/template/run_simd.sh | 7 + scripts/simapp46/template/setup.sh | 47 + .../template_slow/.simapp/config/app.toml | 152 +++ .../template_slow/.simapp/config/config.toml | 393 ++++++++ .../template_slow/.simapp/config/genesis.json | 925 ++++++++++++++++++ ...cdbcfe545eaaaea99378bc70bf22eef3401a4.json | 1 + .../.simapp/config/node_key.json | 1 + .../.simapp/config/priv_validator_key.json | 11 + .../.simapp/data/priv_validator_state.json | 5 + ...13d84ba0fed8a6a4f9ef9abc9967a402c3.address | 1 + .../simapp46/template_slow/.simapp/keyhash | 1 + .../template_slow/.simapp/validator.info | 1 + scripts/simapp46/template_slow/run_simd.sh | 7 + scripts/simapp46/template_slow/setup.sh | 47 + 34 files changed, 3156 insertions(+) create mode 100644 scripts/simapp46/.gitignore create mode 100644 scripts/simapp46/README.md create mode 100644 scripts/simapp46/env create mode 100755 scripts/simapp46/generate_template.sh create mode 100755 scripts/simapp46/generate_template_slow.sh create mode 100644 scripts/simapp46/run_simd.sh create mode 100644 scripts/simapp46/setup.sh create mode 100755 scripts/simapp46/slow_start.sh create mode 100755 scripts/simapp46/slow_stop.sh create mode 100755 scripts/simapp46/start.sh create mode 100755 scripts/simapp46/stop.sh create mode 100644 scripts/simapp46/template/.simapp/config/app.toml create mode 100644 scripts/simapp46/template/.simapp/config/config.toml create mode 100644 scripts/simapp46/template/.simapp/config/genesis.json create mode 100644 scripts/simapp46/template/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json create mode 100644 scripts/simapp46/template/.simapp/config/node_key.json create mode 100644 scripts/simapp46/template/.simapp/config/priv_validator_key.json create mode 100644 scripts/simapp46/template/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address create mode 100755 scripts/simapp46/template/.simapp/keyhash create mode 100644 scripts/simapp46/template/.simapp/validator.info create mode 100755 scripts/simapp46/template/run_simd.sh create mode 100755 scripts/simapp46/template/setup.sh create mode 100644 scripts/simapp46/template_slow/.simapp/config/app.toml create mode 100644 scripts/simapp46/template_slow/.simapp/config/config.toml create mode 100644 scripts/simapp46/template_slow/.simapp/config/genesis.json create mode 100644 scripts/simapp46/template_slow/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json create mode 100644 scripts/simapp46/template_slow/.simapp/config/node_key.json create mode 100644 scripts/simapp46/template_slow/.simapp/config/priv_validator_key.json create mode 100644 scripts/simapp46/template_slow/.simapp/data/priv_validator_state.json create mode 100644 scripts/simapp46/template_slow/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address create mode 100755 scripts/simapp46/template_slow/.simapp/keyhash create mode 100644 scripts/simapp46/template_slow/.simapp/validator.info create mode 100755 scripts/simapp46/template_slow/run_simd.sh create mode 100755 scripts/simapp46/template_slow/setup.sh diff --git a/scripts/simapp46/.gitignore b/scripts/simapp46/.gitignore new file mode 100644 index 00000000..920c4e6e --- /dev/null +++ b/scripts/simapp46/.gitignore @@ -0,0 +1 @@ +template/.simapp/data/ diff --git a/scripts/simapp46/README.md b/scripts/simapp46/README.md new file mode 100644 index 00000000..ad1890f1 --- /dev/null +++ b/scripts/simapp46/README.md @@ -0,0 +1,66 @@ +# Local Simd development network + +## Starting the blockchain + +Run the following: + +``` +cd scripts/simapp44 +./start.sh +``` + +## Preset accounts + +1. **Faucet**
+ economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone
+ Address 0: cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6
+ Address 1: cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5
+ Address 2: cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k
+ Address 3: cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx
+ Address 4: cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx
+ Pubkey 0: A08EGB7ro1ORuFhjOnZcSgwYlpe0DSFjVNUIkNNQxwKQ
+ Pubkey 1: AiDosfIbBi54XJ1QjCeApumcy/FjdtF+YhywPf3DKTx7
+ Pubkey 2: AzQg33JZqH7vSsm09esZY5bZvmzYwE/SY78cA0iLxpD7
+ Pubkey 3: A3gOAlB6aiRTCPvWMQg2+ZbGYNsLd8qlvV28m8p2UhY2
+ Pubkey 4: Aum2063ub/ErUnIUB36sK55LktGUStgcbSiaAnL1wadu +2. **Alice**: Test account for the cosmwasm package that can run in parallel with faucet without sequence conflicts
+ enlist hip relief stomach skate base shallow young switch frequent cry park
+ Address 0: cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada
+ Address 1: cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0
+ Address 2: cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5
+ Address 3: cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta
+ Address 4: cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce
+ Pubkey 0: A9cXhWb8ZpqCzkA8dQCPV29KdeRLV3rUYxrkHudLbQtS
+ Pubkey 1: A4XluzvcUx0ViLF0DjYW5/noArGwpltDstoUUZo+g1b0
+ Pubkey 2: A5TKr1NKc/MKRJ7+EHDD9PlzmGaPD/di/6hzZyBwxoy5
+ Pubkey 3: A/HSABDUqMB2qDy+PA7fiuuuA+hfrco2VwwiThMiTzUx
+ Pubkey 4: A7usTiqgqfxL/WKhoephDUSCHBQlLagtwI/qTmEteTRM +3. **Bob**: Test account (unused for now)
+ remain fragile remove stamp quiz bus country dress critic mammal office need
+ Address 0: cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl
+ Address 1: cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh
+ Address 2: cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au
+ Address 3: cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw
+ Address 4: cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6
+ Pubkey 0: A0d/GxY+UALE+miWJP0qyq4/EayG1G6tsg24v+cbD6By
+ Pubkey 1: Agqd6njsVEQD1CR+F2aqEb8hil5NXZ06mjKgetaNC12t
+ Pubkey 2: A6e9ElvKaM0DKWh1bIdK3bgB14dyEDgIXYMA0Lbs1GoQ
+ Pubkey 3: AkAK5PQaucieWMb0+tTRY01feYI+upRnoNK556eD0Ibb
+ Pubkey 4: A5HMVEAJsupdQWItbZv5Z1xZifDixQi6tjU/hJpZY1bF +4. **Unused**: for testing account state; this account never changes balances or sequences
+ oyster design unusual machine spread century engine gravity focus cave carry slot
+ ArkCaFUJ/IH+vKBmNRCdUVl3mCAhbopk9jjW4Ko4OfRQ
+ cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u +5. **Guest**: account for manual testing
+ degree tackle suggest window test behind mesh extra cover prepare oak script
+ Am/+YV0LaeqQPu7BDJuDHV7J8y68ptkGs10YS+9s71Nq
+ cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej + +### Multisig accounts + +1. 1/5 threshold multisig of the first 5 faucet accounts
+ cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq +2. 2/5 threshold multisig of the first 5 faucet accounts
+ cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9 +3. 3/5 threshold multisig of the first 5 faucet accounts
+ cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc diff --git a/scripts/simapp46/env b/scripts/simapp46/env new file mode 100644 index 00000000..1bdc14a2 --- /dev/null +++ b/scripts/simapp46/env @@ -0,0 +1,5 @@ +# Choose from https://hub.docker.com/r/interchainio/simapp/tags +REPOSITORY="interchainio/simapp" +VERSION="v0.46.0-rc2" +CONTAINER_NAME="simapp" +CONTAINER_NAME_SLOW="simapp-slow" diff --git a/scripts/simapp46/generate_template.sh b/scripts/simapp46/generate_template.sh new file mode 100755 index 00000000..faa6908c --- /dev/null +++ b/scripts/simapp46/generate_template.sh @@ -0,0 +1,73 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +gnused="$(command -v gsed || echo sed)" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" +# shellcheck source=./env +# shellcheck disable=SC1091 +source "$SCRIPT_DIR"/env + +rm -rf "$SCRIPT_DIR/template" +mkdir "$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 \ + -e PASSWORD=my-secret-password \ + --mount type=bind,source="$SCRIPT_DIR/template",target=/root \ + "$REPOSITORY:$VERSION" \ + ./setup.sh \ + cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6 cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5 cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx \ + cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0 cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5 cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce \ + cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6 \ + cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u \ + cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej \ + cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9 cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc + +# The ./template folder is created by the docker daemon's user (root on Linux, current user +# when using Docker Desktop on macOS), let's make it ours if needed +if [ ! -x "$SCRIPT_DIR/template/.simapp/config/gentx" ]; then + sudo chown -R "$(id -u):$(id -g)" "$SCRIPT_DIR/template" +fi + +function inline_jq() { + IN_OUT_PATH="$1" + shift + TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/inline_jq.XXXXXXXXX") + TMP_FILE="$TMP_DIR/$(basename "$IN_OUT_PATH")" + jq "$@" <"$IN_OUT_PATH" >"$TMP_FILE" + if ! mv "$TMP_FILE" "$IN_OUT_PATH"; then + echo >&2 "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually." + exit 3 + fi +} + +( + cd "$SCRIPT_DIR" + + # Sort genesis + inline_jq "template/.simapp/config/genesis.json" -S + + # Custom settings in config.toml + "$gnused" -i \ + -e 's/^cors_allowed_origins =.*$/cors_allowed_origins = ["*"]/' \ + -e 's/^timeout_propose =.*$/timeout_propose = "300ms"/' \ + -e 's/^timeout_propose_delta =.*$/timeout_propose_delta = "100ms"/' \ + -e 's/^timeout_prevote =.*$/timeout_prevote = "300ms"/' \ + -e 's/^timeout_prevote_delta =.*$/timeout_prevote_delta = "100ms"/' \ + -e 's/^timeout_precommit =.*$/timeout_precommit = "300ms"/' \ + -e 's/^timeout_precommit_delta =.*$/timeout_precommit_delta = "100ms"/' \ + -e 's/^timeout_commit =.*$/timeout_commit = "1s"/' \ + "template/.simapp/config/config.toml" + + # Custom settings app.toml + "$gnused" -i \ + -e 's/^enable =.*$/enable = true/' \ + -e 's/^enabled-unsafe-cors =.*$/enabled-unsafe-cors = true/' \ + "template/.simapp/config/app.toml" +) diff --git a/scripts/simapp46/generate_template_slow.sh b/scripts/simapp46/generate_template_slow.sh new file mode 100755 index 00000000..992e6382 --- /dev/null +++ b/scripts/simapp46/generate_template_slow.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +gnused="$(command -v gsed || echo sed)" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" + +# Create template for slow simapp +( + cd "$SCRIPT_DIR" + rm -rf template_slow + cp -R template template_slow + chmod +x "$SCRIPT_DIR/template_slow/setup.sh" + chmod +x "$SCRIPT_DIR/template_slow/run_simd.sh" + + # Slow settings in config.toml + "$gnused" -i \ + -e 's/^timeout_broadcast_tx_commit =.*$/timeout_broadcast_tx_commit = "1s"/' \ + -e 's/^timeout_commit =.*$/timeout_commit = "10s"/' \ + "template_slow/.simapp/config/config.toml" +) diff --git a/scripts/simapp46/run_simd.sh b/scripts/simapp46/run_simd.sh new file mode 100644 index 00000000..9334906b --- /dev/null +++ b/scripts/simapp46/run_simd.sh @@ -0,0 +1,7 @@ +#!/bin/sh +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/simapp46/setup.sh b/scripts/simapp46/setup.sh new file mode 100644 index 00000000..23648554 --- /dev/null +++ b/scripts/simapp46/setup.sh @@ -0,0 +1,47 @@ +#!/bin/sh +set -o errexit -o nounset +command -v shellcheck >/dev/null && shellcheck "$0" + +gnused="$(command -v gsed || echo sed)" + +PASSWORD=${PASSWORD:-1234567890} +CHAIN_ID=${CHAIN_ID:-simd-testing} +MONIKER=${MONIKER:-simd-moniker} + +# The staking and the fee tokens. The supply of the staking token is low compared to the fee token (factor 100). +STAKE=${STAKE_TOKEN:-ustake} +FEE=${FEE_TOKEN:-ucosm} + +# 2000 STAKE and 1000 COSM +START_BALANCE="2000000000$STAKE,1000000000$FEE" + +echo "Creating genesis ..." +simd init --chain-id "$CHAIN_ID" "$MONIKER" +"$gnused" -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 2>/dev/null; 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 +echo "$PASSWORD" | simd add-genesis-account validator "$START_BALANCE" + +echo "Setting up accounts ..." +# (optionally) add a few more genesis accounts +for addr in "$@"; do + echo "$addr" + simd add-genesis-account "$addr" "$START_BALANCE" +done + +echo "Creating genesis tx ..." +SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3) +( + echo "$PASSWORD" + echo "$PASSWORD" + echo "$PASSWORD" +) | simd gentx validator "$SELF_DELEGATION" --offline --chain-id "$CHAIN_ID" --moniker="$MONIKER" +simd collect-gentxs diff --git a/scripts/simapp46/slow_start.sh b/scripts/simapp46/slow_start.sh new file mode 100755 index 00000000..4a0f6b3b --- /dev/null +++ b/scripts/simapp46/slow_start.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +# Please keep this in sync with the Ports overview in HACKING.md +TENDERMINT_PORT_GUEST="26657" +TENDERMINT_PORT_HOST="26660" +API_PORT_GUEST="1317" +API_PORT_HOST="1320" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" +# shellcheck source=./env +# shellcheck disable=SC1091 +source "$SCRIPT_DIR"/env + +TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/simapp_slow.XXXXXXXXX") +chmod 777 "$TMP_DIR" +echo "Using temporary dir $TMP_DIR" +SIMD_LOGFILE="$TMP_DIR/simd_slow.log" + +# Use a fresh volume for every start +docker volume rm -f simapp_slow_data + +docker run --rm \ + --name "$CONTAINER_NAME_SLOW" \ + -p "$TENDERMINT_PORT_HOST":"$TENDERMINT_PORT_GUEST" \ + -p "$API_PORT_HOST":"$API_PORT_GUEST" \ + --mount type=bind,source="$SCRIPT_DIR/template_slow",target=/template \ + --mount type=volume,source=simapp_slow_data,target=/root \ + "$REPOSITORY:$VERSION" \ + /template/run_simd.sh \ + >"$SIMD_LOGFILE" 2>&1 & + +echo "slow simd running on http://localhost:$TENDERMINT_PORT_HOST and logging into $SIMD_LOGFILE" + +if [ -n "${CI:-}" ]; then + # Give process some time to come alive. No idea why this helps. Needed for CI. + sleep 0.5 + + # Follow the logs in CI's background job + tail -f "$SIMD_LOGFILE" +fi diff --git a/scripts/simapp46/slow_stop.sh b/scripts/simapp46/slow_stop.sh new file mode 100755 index 00000000..4ad190e4 --- /dev/null +++ b/scripts/simapp46/slow_stop.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" +# shellcheck source=./env +# shellcheck disable=SC1091 +source "$SCRIPT_DIR"/env + +echo "Killing slow simapp container..." +docker container kill "$CONTAINER_NAME_SLOW" diff --git a/scripts/simapp46/start.sh b/scripts/simapp46/start.sh new file mode 100755 index 00000000..5c1791cd --- /dev/null +++ b/scripts/simapp46/start.sh @@ -0,0 +1,45 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +# Please keep this in sync with the Ports overview in HACKING.md +TENDERMINT_PORT_GUEST="26657" +TENDERMINT_PORT_HOST="26658" +API_PORT_GUEST="1317" +API_PORT_HOST="1318" +GRPC_PORT_GUEST="9090" +GRPC_PORT_HOST="9090" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" +# shellcheck source=./env +# shellcheck disable=SC1091 +source "$SCRIPT_DIR"/env + +TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/simapp.XXXXXXXXX") +chmod 777 "$TMP_DIR" +echo "Using temporary dir $TMP_DIR" +SIMD_LOGFILE="$TMP_DIR/simd.log" + +# Use a fresh volume for every start +docker volume rm -f simapp_data + +docker run --rm \ + --name "$CONTAINER_NAME" \ + -p "$TENDERMINT_PORT_HOST":"$TENDERMINT_PORT_GUEST" \ + -p "$API_PORT_HOST":"$API_PORT_GUEST" \ + -p "$GRPC_PORT_HOST":"$GRPC_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" 2>&1 & + +echo "simd running on http://localhost:$TENDERMINT_PORT_HOST and logging into $SIMD_LOGFILE" + +if [ -n "${CI:-}" ]; then + # Give process some time to come alive. No idea why this helps. Needed for CI. + sleep 0.5 + + # Follow the logs in CI's background job + tail -f "$SIMD_LOGFILE" +fi diff --git a/scripts/simapp46/stop.sh b/scripts/simapp46/stop.sh new file mode 100755 index 00000000..9497d937 --- /dev/null +++ b/scripts/simapp46/stop.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck >/dev/null && shellcheck "$0" + +SCRIPT_DIR="$(realpath "$(dirname "$0")")" +# shellcheck source=./env +# shellcheck disable=SC1091 +source "$SCRIPT_DIR"/env + +echo "Killing simapp container..." +docker container kill "$CONTAINER_NAME" diff --git a/scripts/simapp46/template/.simapp/config/app.toml b/scripts/simapp46/template/.simapp/config/app.toml new file mode 100644 index 00000000..4855c250 --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/app.toml @@ -0,0 +1,152 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Base Configuration ### +############################################################################### + +# The minimum gas prices a validator is willing to accept for processing a +# transaction. A transaction's fees must meet the minimum of any denomination +# specified in this config (e.g. 0.25token1;0.0001token2). +minimum-gas-prices = "" + +# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) +# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' +pruning = "default" + +# These are applied if and only if the pruning strategy is custom. +pruning-keep-recent = "0" +pruning-keep-every = "0" +pruning-interval = "0" + +# HaltHeight contains a non-zero block height at which a node will gracefully +# halt and shutdown that can be used to assist upgrades and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-height = 0 + +# HaltTime contains a non-zero minimum block time (in Unix seconds) at which +# a node will gracefully halt and shutdown that can be used to assist upgrades +# and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-time = 0 + +# MinRetainBlocks defines the minimum block height offset from the current +# block being committed, such that all blocks past this offset are pruned +# from Tendermint. It is used as part of the process of determining the +# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates +# that no blocks should be pruned. +# +# This configuration value is only responsible for pruning Tendermint blocks. +# It has no bearing on application state pruning which is determined by the +# "pruning-*" configurations. +# +# Note: Tendermint block pruning is dependant on this parameter in conunction +# with the unbonding (safety threshold) period, state pruning and state sync +# snapshot parameters to determine the correct minimum value of +# ResponseCommit.RetainHeight. +min-retain-blocks = 0 + +# InterBlockCache enables inter-block caching. +inter-block-cache = true + +# IndexEvents defines the set of events in the form {eventType}.{attributeKey}, +# which informs Tendermint what to index. If empty, all events will be indexed. +# +# Example: +# ["message.sender", "message.recipient"] +index-events = [] + +############################################################################### +### Telemetry Configuration ### +############################################################################### + +[telemetry] + +# Prefixed with keys to separate services. +service-name = "" + +# Enabled enables the application telemetry functionality. When enabled, +# an in-memory sink is also enabled by default. Operators may also enabled +# other sinks such as Prometheus. +enabled = false + +# Enable prefixing gauge values with hostname. +enable-hostname = false + +# Enable adding hostname to labels. +enable-hostname-label = false + +# Enable adding service to labels. +enable-service-label = false + +# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. +prometheus-retention-time = 0 + +# GlobalLabels defines a global set of name/value label tuples applied to all +# metrics emitted using the wrapper functions defined in telemetry package. +# +# Example: +# [["chain_id", "cosmoshub-1"]] +global-labels = [ +] + +############################################################################### +### API Configuration ### +############################################################################### + +[api] + +# Enable defines if the API server should be enabled. +enable = true + +# Swagger defines if swagger documentation should automatically be registered. +swagger = false + +# Address defines the API server to listen on. +address = "tcp://0.0.0.0:1317" + +# MaxOpenConnections defines the number of maximum open connections. +max-open-connections = 1000 + +# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). +rpc-read-timeout = 10 + +# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). +rpc-write-timeout = 0 + +# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). +rpc-max-body-bytes = 1000000 + +# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). +enabled-unsafe-cors = true + +############################################################################### +### gRPC Configuration ### +############################################################################### + +[grpc] + +# Enable defines if the gRPC server should be enabled. +enable = true + +# Address defines the gRPC server address to bind to. +address = "0.0.0.0:9090" + +############################################################################### +### State Sync Configuration ### +############################################################################### + +# State sync snapshots allow other nodes to rapidly join the network without replaying historical +# blocks, instead downloading and applying a snapshot of the application state at a given height. +[state-sync] + +# snapshot-interval specifies the block interval at which local state sync snapshots are +# taken (0 to disable). Must be a multiple of pruning-keep-every. +snapshot-interval = 0 + +# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). +snapshot-keep-recent = 2 diff --git a/scripts/simapp46/template/.simapp/config/config.toml b/scripts/simapp46/template/.simapp/config/config.toml new file mode 100644 index 00000000..288d1d98 --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/config.toml @@ -0,0 +1,393 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +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 +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "info" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = ["*"] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof_laddr = "localhost:6060" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +unconditional_peer_ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +persistent_peers_max_dial_period = "0s" + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. +max_tx_bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max_batch_bytes = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# RPC servers (comma-separated) for light client verification of the synced state machine and +# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding +# header hash obtained from a trusted source, and a period during which validators can be trusted. +# +# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 +# weeks) during which they can be financially punished (slashed) for misbehavior. +rpc_servers = "" +trust_height = 0 +trust_hash = "" +trust_period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery_time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). +# Will create a new, randomly named directory within, and remove it when done. +temp_dir = "" + +####################################################### +### Fast Sync Configuration Connections ### +####################################################### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +# 2) "v2" - complete redesign of v0, optimized for testability & readability +version = "v0" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal_file = "data/cs.wal/wal" + +# How long we wait for a proposal block before prevoting nil +timeout_propose = "300ms" +# How much timeout_propose increases with each round +timeout_propose_delta = "100ms" +# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) +timeout_prevote = "300ms" +# How much the timeout_prevote increases with each round +timeout_prevote_delta = "100ms" +# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) +timeout_precommit = "300ms" +# How much the timeout_precommit increases with each round +timeout_precommit_delta = "100ms" +# How long we wait after committing a block, before starting on the new +# height (this gives us a chance to receive some more precommits, even +# though we already have +2/3). +timeout_commit = "1s" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double_sign_check_height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double_sign_check_height = 0 + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx_index] + +# What indexer to use for transactions +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = "kv" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/simapp46/template/.simapp/config/genesis.json b/scripts/simapp46/template/.simapp/config/genesis.json new file mode 100644 index 00000000..2ee88700 --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/genesis.json @@ -0,0 +1,666 @@ +{ + "app_hash": "", + "app_state": { + "auth": { + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc", + "pub_key": null, + "sequence": "0" + } + ], + "params": { + "max_memo_characters": "256", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10" + } + }, + "bank": { + "balances": [ + { + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + } + ], + "denom_metadata": [ + { + "description": "The fee token of this test chain", + "denom_units": [ + { + "denom": "ucosm", + "exponent": 0, + "aliases": [] + }, + { + "denom": "COSM", + "exponent": 6, + "aliases": [] + } + ], + "base": "ucosm", + "display": "COSM" + } + ], + "params": { + "default_send_enabled": true, + "send_enabled": [] + }, + "supply": [ + { + "amount": "21000000000", + "denom": "ucosm" + }, + { + "amount": "42000000000", + "denom": "ustake" + } + ] + }, + "capability": { + "index": "1", + "owners": [] + }, + "crisis": { + "constant_fee": { + "amount": "1000", + "denom": "ustake" + } + }, + "distribution": { + "delegator_starting_infos": [], + "delegator_withdraw_infos": [], + "fee_pool": { + "community_pool": [] + }, + "outstanding_rewards": [], + "params": { + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "community_tax": "0.020000000000000000", + "withdraw_addr_enabled": true + }, + "previous_proposer": "", + "validator_accumulated_commissions": [], + "validator_current_rewards": [], + "validator_historical_rewards": [], + "validator_slash_events": [] + }, + "evidence": { + "evidence": [] + }, + "genutil": { + "gen_txs": [ + { + "auth_info": { + "fee": { + "amount": [], + "gas_limit": "200000", + "granter": "", + "payer": "" + }, + "signer_infos": [ + { + "mode_info": { + "single": { + "mode": "SIGN_MODE_DIRECT" + } + }, + "public_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf" + }, + "sequence": "0" + } + ] + }, + "body": { + "extension_options": [], + "memo": "ad7cdbcfe545eaaaea99378bc70bf22eef3401a4@172.17.0.2:26656", + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "commission": { + "max_change_rate": "0.010000000000000000", + "max_rate": "0.200000000000000000", + "rate": "0.100000000000000000" + }, + "delegator_address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "description": { + "details": "", + "identity": "", + "moniker": "simd-moniker", + "security_contact": "", + "website": "" + }, + "min_self_delegation": "1", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU=" + }, + "validator_address": "cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk", + "value": { + "amount": "3000000", + "denom": "ustake" + } + } + ], + "non_critical_extension_options": [], + "timeout_height": "0" + }, + "signatures": [ + "XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g==" + ] + } + ] + }, + "gov": { + "deposit_params": { + "max_deposit_period": "172800s", + "min_deposit": [ + { + "amount": "10000000", + "denom": "ustake" + } + ] + }, + "deposits": [], + "proposals": [], + "starting_proposal_id": "1", + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + }, + "votes": [], + "voting_params": { + "voting_period": "172800s" + } + }, + "mint": { + "minter": { + "annual_provisions": "0.000000000000000000", + "inflation": "0.130000000000000000" + }, + "params": { + "blocks_per_year": "6311520", + "goal_bonded": "0.670000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "inflation_rate_change": "0.130000000000000000", + "mint_denom": "ustake" + } + }, + "params": null, + "slashing": { + "missed_blocks": [], + "params": { + "downtime_jail_duration": "600s", + "min_signed_per_window": "0.500000000000000000", + "signed_blocks_window": "100", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": [] + }, + "staking": { + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "ustake", + "historical_entries": 10000, + "max_entries": 7, + "max_validators": 100, + "unbonding_time": "1814400s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [] + }, + "transfer": { + "denom_traces": [], + "params": { + "receive_enabled": true, + "send_enabled": true + }, + "port_id": "transfer" + }, + "upgrade": {}, + "vesting": {} + }, + "chain_id": "simd-testing", + "consensus_params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1", + "time_iota_ms": "1000" + }, + "evidence": { + "max_age_duration": "172800000000000", + "max_age_num_blocks": "100000", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, + "genesis_time": "2021-07-27T15:14:14.2361126Z", + "initial_height": "1" +} diff --git a/scripts/simapp46/template/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json b/scripts/simapp46/template/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json new file mode 100644 index 00000000..88c7c613 --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"simd-moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679","validator_address":"cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU="},"value":{"denom":"ustake","amount":"3000000"}}],"memo":"ad7cdbcfe545eaaaea99378bc70bf22eef3401a4@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g=="]} diff --git a/scripts/simapp46/template/.simapp/config/node_key.json b/scripts/simapp46/template/.simapp/config/node_key.json new file mode 100644 index 00000000..8eb3f72f --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/node_key.json @@ -0,0 +1 @@ +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"VJWbZaD0jAkAh4VBLS9I2FDFwAKhbCYjs/ycVEDRNW6teVZgaxLnZ+mW3sMhvdIKY99DaD55h9L1MXkx8WsQ+g=="}} \ No newline at end of file diff --git a/scripts/simapp46/template/.simapp/config/priv_validator_key.json b/scripts/simapp46/template/.simapp/config/priv_validator_key.json new file mode 100644 index 00000000..cbb56b7a --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/priv_validator_key.json @@ -0,0 +1,11 @@ +{ + "address": "30AF3420A11D7357C54EB716B209D4C3707D1BF3", + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU=" + }, + "priv_key": { + "type": "tendermint/PrivKeyEd25519", + "value": "H/y/XQLnbLKzR3Ey6VCCw0tu87VbA3GO4goA+PPz7VRxQlEPAfK3Lxkw7dy1Ko+97Nw4/ZJinVIMId3X9KkC5Q==" + } +} \ No newline at end of file diff --git a/scripts/simapp46/template/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address b/scripts/simapp46/template/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address new file mode 100644 index 00000000..e79a087b --- /dev/null +++ b/scripts/simapp46/template/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42ODc0MDc3ICswMDAwIFVUQyBtPSswLjIyNTIwMDMwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjgtN0l6TXhWUmhrMGlBM2kifQ.9c48lG_ZZDrQ5esu0Tw45oacS4V22SLEIChtqW14z17rJtZuS7XYuw.aVNkJGer3Dv--lIR.ulhj65STVqG5ciBObgXc-oyYndKuOzvp03PH9wnh3WTg77SSjwxpEkIMwd9DpkcfBSL0qBvN7aXLAFEG59ydL5GamUTOU94xFISet6dKjxSWbkBmq4_zWmUbe0Qas4eVvPsb6U5w0PIyVTkZwAHDeMtdaEXthBU1JE4biOoi0uICCJkFyqO01q5nrbN7d45EE8vijdPusxfn-abtvSvXLUTcr50nt_w5_YbxsSZnG52Ty2TiV_fjn_Wq.Aj72rrWgBh9fHj1CIoJ7lA \ No newline at end of file diff --git a/scripts/simapp46/template/.simapp/keyhash b/scripts/simapp46/template/.simapp/keyhash new file mode 100755 index 00000000..80f4992a --- /dev/null +++ b/scripts/simapp46/template/.simapp/keyhash @@ -0,0 +1 @@ +$2a$10$PUzdQ9WON1SgvDtewSKIUerA9LxW51qGoHj2EGZ5TT6oKfHXU7hcK \ No newline at end of file diff --git a/scripts/simapp46/template/.simapp/validator.info b/scripts/simapp46/template/.simapp/validator.info new file mode 100644 index 00000000..5c2daa91 --- /dev/null +++ b/scripts/simapp46/template/.simapp/validator.info @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42Njk0MzQ3ICswMDAwIFVUQyBtPSswLjIwNzI1MDUwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjB4YU1QYjR4RVVHS29JeW4ifQ.jLK0jNefYAdHELJr3MPhajfSFJfTAre0yBzqnvS1rhzxou2ZMyMJ3w.4h0CQ8NAekW0lshZ.Cusi2aIkUmPlVKdkzjK7SpgrN8xrFcm_L3mf1zTNFfS1GEKHIjMd7a-c7XVOM06hXF_MuIvdCrlHRsWAzX9HgSPQ_T4aQDx8dzdj6iRxv0rwAKjSVLMpuqT3ASSENuPkP21niOuPCnKohVYACq0hpsrYoEt0wMSqnUF7Smz7-hbYmp4EleCEcvwas4qs2LM_hZWvAEFnNdDGFWeyGrNTXXbwXBpCFnWXH-F9FHVtexlwo0OCTJscWFazn8LVGOepO4mQRnsQQ4XMG6WL18Yclz7TmPi3WKkOHOdyhydu7KX_tAISy-jVpMX41kb5OLABuxXYSM6Q1wnyY4SUHvExJ1b41lSER11tIopHbh_Au6ifRRtD.kbUtqwd5x8QH52nHddfwcA \ No newline at end of file diff --git a/scripts/simapp46/template/run_simd.sh b/scripts/simapp46/template/run_simd.sh new file mode 100755 index 00000000..9334906b --- /dev/null +++ b/scripts/simapp46/template/run_simd.sh @@ -0,0 +1,7 @@ +#!/bin/sh +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/simapp46/template/setup.sh b/scripts/simapp46/template/setup.sh new file mode 100755 index 00000000..23648554 --- /dev/null +++ b/scripts/simapp46/template/setup.sh @@ -0,0 +1,47 @@ +#!/bin/sh +set -o errexit -o nounset +command -v shellcheck >/dev/null && shellcheck "$0" + +gnused="$(command -v gsed || echo sed)" + +PASSWORD=${PASSWORD:-1234567890} +CHAIN_ID=${CHAIN_ID:-simd-testing} +MONIKER=${MONIKER:-simd-moniker} + +# The staking and the fee tokens. The supply of the staking token is low compared to the fee token (factor 100). +STAKE=${STAKE_TOKEN:-ustake} +FEE=${FEE_TOKEN:-ucosm} + +# 2000 STAKE and 1000 COSM +START_BALANCE="2000000000$STAKE,1000000000$FEE" + +echo "Creating genesis ..." +simd init --chain-id "$CHAIN_ID" "$MONIKER" +"$gnused" -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 2>/dev/null; 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 +echo "$PASSWORD" | simd add-genesis-account validator "$START_BALANCE" + +echo "Setting up accounts ..." +# (optionally) add a few more genesis accounts +for addr in "$@"; do + echo "$addr" + simd add-genesis-account "$addr" "$START_BALANCE" +done + +echo "Creating genesis tx ..." +SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3) +( + echo "$PASSWORD" + echo "$PASSWORD" + echo "$PASSWORD" +) | simd gentx validator "$SELF_DELEGATION" --offline --chain-id "$CHAIN_ID" --moniker="$MONIKER" +simd collect-gentxs diff --git a/scripts/simapp46/template_slow/.simapp/config/app.toml b/scripts/simapp46/template_slow/.simapp/config/app.toml new file mode 100644 index 00000000..4855c250 --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/app.toml @@ -0,0 +1,152 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Base Configuration ### +############################################################################### + +# The minimum gas prices a validator is willing to accept for processing a +# transaction. A transaction's fees must meet the minimum of any denomination +# specified in this config (e.g. 0.25token1;0.0001token2). +minimum-gas-prices = "" + +# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) +# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' +pruning = "default" + +# These are applied if and only if the pruning strategy is custom. +pruning-keep-recent = "0" +pruning-keep-every = "0" +pruning-interval = "0" + +# HaltHeight contains a non-zero block height at which a node will gracefully +# halt and shutdown that can be used to assist upgrades and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-height = 0 + +# HaltTime contains a non-zero minimum block time (in Unix seconds) at which +# a node will gracefully halt and shutdown that can be used to assist upgrades +# and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-time = 0 + +# MinRetainBlocks defines the minimum block height offset from the current +# block being committed, such that all blocks past this offset are pruned +# from Tendermint. It is used as part of the process of determining the +# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates +# that no blocks should be pruned. +# +# This configuration value is only responsible for pruning Tendermint blocks. +# It has no bearing on application state pruning which is determined by the +# "pruning-*" configurations. +# +# Note: Tendermint block pruning is dependant on this parameter in conunction +# with the unbonding (safety threshold) period, state pruning and state sync +# snapshot parameters to determine the correct minimum value of +# ResponseCommit.RetainHeight. +min-retain-blocks = 0 + +# InterBlockCache enables inter-block caching. +inter-block-cache = true + +# IndexEvents defines the set of events in the form {eventType}.{attributeKey}, +# which informs Tendermint what to index. If empty, all events will be indexed. +# +# Example: +# ["message.sender", "message.recipient"] +index-events = [] + +############################################################################### +### Telemetry Configuration ### +############################################################################### + +[telemetry] + +# Prefixed with keys to separate services. +service-name = "" + +# Enabled enables the application telemetry functionality. When enabled, +# an in-memory sink is also enabled by default. Operators may also enabled +# other sinks such as Prometheus. +enabled = false + +# Enable prefixing gauge values with hostname. +enable-hostname = false + +# Enable adding hostname to labels. +enable-hostname-label = false + +# Enable adding service to labels. +enable-service-label = false + +# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. +prometheus-retention-time = 0 + +# GlobalLabels defines a global set of name/value label tuples applied to all +# metrics emitted using the wrapper functions defined in telemetry package. +# +# Example: +# [["chain_id", "cosmoshub-1"]] +global-labels = [ +] + +############################################################################### +### API Configuration ### +############################################################################### + +[api] + +# Enable defines if the API server should be enabled. +enable = true + +# Swagger defines if swagger documentation should automatically be registered. +swagger = false + +# Address defines the API server to listen on. +address = "tcp://0.0.0.0:1317" + +# MaxOpenConnections defines the number of maximum open connections. +max-open-connections = 1000 + +# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). +rpc-read-timeout = 10 + +# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). +rpc-write-timeout = 0 + +# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). +rpc-max-body-bytes = 1000000 + +# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). +enabled-unsafe-cors = true + +############################################################################### +### gRPC Configuration ### +############################################################################### + +[grpc] + +# Enable defines if the gRPC server should be enabled. +enable = true + +# Address defines the gRPC server address to bind to. +address = "0.0.0.0:9090" + +############################################################################### +### State Sync Configuration ### +############################################################################### + +# State sync snapshots allow other nodes to rapidly join the network without replaying historical +# blocks, instead downloading and applying a snapshot of the application state at a given height. +[state-sync] + +# snapshot-interval specifies the block interval at which local state sync snapshots are +# taken (0 to disable). Must be a multiple of pruning-keep-every. +snapshot-interval = 0 + +# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). +snapshot-keep-recent = 2 diff --git a/scripts/simapp46/template_slow/.simapp/config/config.toml b/scripts/simapp46/template_slow/.simapp/config/config.toml new file mode 100644 index 00000000..f00db58f --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/config.toml @@ -0,0 +1,393 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable +# or --home cmd flag. + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +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 +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "info" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = ["*"] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "1s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to Tendermint's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof_laddr = "localhost:6060" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +unconditional_peer_ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +persistent_peers_max_dial_period = "0s" + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. +max_tx_bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max_batch_bytes = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# RPC servers (comma-separated) for light client verification of the synced state machine and +# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding +# header hash obtained from a trusted source, and a period during which validators can be trusted. +# +# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 +# weeks) during which they can be financially punished (slashed) for misbehavior. +rpc_servers = "" +trust_height = 0 +trust_hash = "" +trust_period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery_time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). +# Will create a new, randomly named directory within, and remove it when done. +temp_dir = "" + +####################################################### +### Fast Sync Configuration Connections ### +####################################################### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +# 2) "v2" - complete redesign of v0, optimized for testability & readability +version = "v0" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal_file = "data/cs.wal/wal" + +# How long we wait for a proposal block before prevoting nil +timeout_propose = "300ms" +# How much timeout_propose increases with each round +timeout_propose_delta = "100ms" +# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) +timeout_prevote = "300ms" +# How much the timeout_prevote increases with each round +timeout_prevote_delta = "100ms" +# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) +timeout_precommit = "300ms" +# How much the timeout_precommit increases with each round +timeout_precommit_delta = "100ms" +# How long we wait after committing a block, before starting on the new +# height (this gives us a chance to receive some more precommits, even +# though we already have +2/3). +timeout_commit = "10s" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double_sign_check_height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double_sign_check_height = 0 + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx_index] + +# What indexer to use for transactions +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = "kv" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/scripts/simapp46/template_slow/.simapp/config/genesis.json b/scripts/simapp46/template_slow/.simapp/config/genesis.json new file mode 100644 index 00000000..e9c0fb4f --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/genesis.json @@ -0,0 +1,925 @@ +{ + "app_hash": "", + "app_state": { + "auth": { + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9", + "pub_key": null, + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "account_number": "0", + "address": "cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc", + "pub_key": null, + "sequence": "0" + } + ], + "params": { + "max_memo_characters": "256", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10" + } + }, + "bank": { + "balances": [ + { + "address": "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1f7j7ryulwjfe9ljplvhtcaxa6wqgula3etktce", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1vkv9sfwaak76weyamqx0flmng2vuquxqcuqukh", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1v75snhly7wfndk83ud4daygh397vcmkta8rlzq", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1d2mg2euvus3tu2tprfwrfzeal4xu7kygugjxjc", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1h90ml36rcu7yegwduzgzderj2jmq49hcpfclw9", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1hhg2rlu9jscacku2wwckws7932qqqu8x3gfgw0", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1c7wpeen2uv8thayf7g8q2rgpm29clj0dgrdtzw", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1mjxpv9ft30wer7ma7kwfxhm42l379xutplrdk6", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos17d0jcz59jf68g52vq38tuuncmwwjk42u6mcxej", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + }, + { + "address": "cosmos1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83lktgzl", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "2000000000", + "denom": "ustake" + } + ] + } + ], + "denom_metadata": [], + "params": { + "default_send_enabled": true, + "send_enabled": [] + }, + "supply": [ + { + "amount": "21000000000", + "denom": "ucosm" + }, + { + "amount": "42000000000", + "denom": "ustake" + } + ] + }, + "capability": { + "index": "1", + "owners": [] + }, + "crisis": { + "constant_fee": { + "amount": "1000", + "denom": "ustake" + } + }, + "distribution": { + "delegator_starting_infos": [], + "delegator_withdraw_infos": [], + "fee_pool": { + "community_pool": [] + }, + "outstanding_rewards": [], + "params": { + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "community_tax": "0.020000000000000000", + "withdraw_addr_enabled": true + }, + "previous_proposer": "", + "validator_accumulated_commissions": [], + "validator_current_rewards": [], + "validator_historical_rewards": [], + "validator_slash_events": [] + }, + "evidence": { + "evidence": [] + }, + "genutil": { + "gen_txs": [ + { + "auth_info": { + "fee": { + "amount": [], + "gas_limit": "200000", + "granter": "", + "payer": "" + }, + "signer_infos": [ + { + "mode_info": { + "single": { + "mode": "SIGN_MODE_DIRECT" + } + }, + "public_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf" + }, + "sequence": "0" + } + ] + }, + "body": { + "extension_options": [], + "memo": "ad7cdbcfe545eaaaea99378bc70bf22eef3401a4@172.17.0.2:26656", + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "commission": { + "max_change_rate": "0.010000000000000000", + "max_rate": "0.200000000000000000", + "rate": "0.100000000000000000" + }, + "delegator_address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679", + "description": { + "details": "", + "identity": "", + "moniker": "simd-moniker", + "security_contact": "", + "website": "" + }, + "min_self_delegation": "1", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU=" + }, + "validator_address": "cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk", + "value": { + "amount": "3000000", + "denom": "ustake" + } + } + ], + "non_critical_extension_options": [], + "timeout_height": "0" + }, + "signatures": [ + "XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g==" + ] + } + ] + }, + "gov": { + "deposit_params": { + "max_deposit_period": "172800s", + "min_deposit": [ + { + "amount": "10000000", + "denom": "ustake" + } + ] + }, + "deposits": [], + "proposals": [], + "starting_proposal_id": "1", + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + }, + "votes": [], + "voting_params": { + "voting_period": "172800s" + } + }, + "ibc": { + "channel_genesis": { + "ack_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "1" + } + ], + "acknowledgements": [], + "channels": [ + { + "channel_id": "channel-0", + "connection_hops": [ + "connection-0" + ], + "counterparty": { + "channel_id": "channel-0", + "port_id": "transfer" + }, + "ordering": "ORDER_UNORDERED", + "port_id": "transfer", + "state": "STATE_OPEN", + "version": "ics20-1" + } + ], + "commitments": [ + { + "channel_id": "channel-0", + "data": "hYz5Dx6o09DcSEWZR6xlJYwLgYUnLithsXMGtujic4I=", + "port_id": "transfer", + "sequence": "1" + } + ], + "next_channel_sequence": "0", + "receipts": [], + "recv_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "1" + } + ], + "send_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "2" + } + ] + }, + "client_genesis": { + "clients": [ + { + "client_id": "07-tendermint-0", + "client_state": { + "@type": "/ibc.lightclients.tendermint.v1.ClientState", + "allow_update_after_expiry": false, + "allow_update_after_misbehaviour": false, + "chain_id": "ibc-1", + "frozen_height": { + "revision_height": "0", + "revision_number": "0" + }, + "latest_height": { + "revision_height": "274", + "revision_number": "1" + }, + "max_clock_drift": "600s", + "proof_specs": [ + { + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 33, + "empty_child": null, + "hash": "SHA256", + "max_prefix_length": 12, + "min_prefix_length": 4 + }, + "leaf_spec": { + "hash": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + }, + { + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 32, + "empty_child": null, + "hash": "SHA256", + "max_prefix_length": 1, + "min_prefix_length": 1 + }, + "leaf_spec": { + "hash": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + } + ], + "trust_level": { + "denominator": "3", + "numerator": "1" + }, + "trusting_period": "1209600s", + "unbonding_period": "1814400s", + "upgrade_path": [ + "upgrade", + "upgradedIBCState" + ] + } + } + ], + "clients_consensus": [ + { + "client_id": "07-tendermint-0", + "consensus_states": [ + { + "consensus_state": { + "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", + "root": { + "hash": "7PmRnufr0ItJMAtq3GOJEtupU93W9fh9utvgKL+2DX0=" + }, + "timestamp": "2021-01-11T11:02:53.837998Z" + }, + "height": { + "revision_height": "258", + "revision_number": "1" + } + }, + { + "consensus_state": { + "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", + "root": { + "hash": "l4c9z7RZNTXk+tNM1BClb0MLnR5sWHdoofjPNyb2u7s=" + }, + "timestamp": "2021-01-11T11:02:56.184633Z" + }, + "height": { + "revision_height": "260", + "revision_number": "1" + } + }, + { + "consensus_state": { + "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", + "root": { + "hash": "4Z4hxSmijgVvMR//if6aJFhYIBW6w9rYYtEqs+eIUcg=" + }, + "timestamp": "2021-01-11T11:03:02.268862Z" + }, + "height": { + "revision_height": "265", + "revision_number": "1" + } + }, + { + "consensus_state": { + "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", + "root": { + "hash": "xFOoMvBw80wWTHqqrNpWb/Hv8+zKsTsbam8MFA9Gor4=" + }, + "timestamp": "2021-01-11T11:03:07.123191Z" + }, + "height": { + "revision_height": "269", + "revision_number": "1" + } + }, + { + "consensus_state": { + "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", + "root": { + "hash": "0s6RbgtxLkZ51lJJCq1iZuhvSqn/DsAQs9jEMhShv3A=" + }, + "timestamp": "2021-01-11T11:03:13.075754Z" + }, + "height": { + "revision_height": "274", + "revision_number": "1" + } + } + ] + } + ], + "clients_metadata": [ + { + "client_id": "07-tendermint-0", + "client_metadata": [ + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjU4L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomBj7tMA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjYwL3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomLBGmiA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY1L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomhjrK/g=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY5L3Byb2Nlc3NlZFRpbWU=", + "value": "Flkomzng9Qg=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjc0L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkonJ5n5Gg=" + } + ] + } + ], + "create_localhost": false, + "next_client_sequence": "0", + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + } + }, + "connection_genesis": { + "client_connection_paths": [ + { + "client_id": "07-tendermint-0", + "paths": [ + "connection-0" + ] + } + ], + "connections": [ + { + "client_id": "07-tendermint-0", + "counterparty": { + "client_id": "07-tendermint-0", + "connection_id": "connection-0", + "prefix": { + "key_prefix": "aWJj" + } + }, + "delay_period": "0", + "id": "connection-0", + "state": "STATE_OPEN", + "versions": [ + { + "features": [ + "ORDER_ORDERED", + "ORDER_UNORDERED" + ], + "identifier": "1" + } + ] + } + ], + "next_connection_sequence": "0" + } + }, + "mint": { + "minter": { + "annual_provisions": "0.000000000000000000", + "inflation": "0.130000000000000000" + }, + "params": { + "blocks_per_year": "6311520", + "goal_bonded": "0.670000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "inflation_rate_change": "0.130000000000000000", + "mint_denom": "ustake" + } + }, + "params": null, + "slashing": { + "missed_blocks": [], + "params": { + "downtime_jail_duration": "600s", + "min_signed_per_window": "0.500000000000000000", + "signed_blocks_window": "100", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": [] + }, + "staking": { + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "ustake", + "historical_entries": 10000, + "max_entries": 7, + "max_validators": 100, + "unbonding_time": "1814400s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [] + }, + "transfer": { + "denom_traces": [], + "params": { + "receive_enabled": true, + "send_enabled": true + }, + "port_id": "transfer" + }, + "upgrade": {}, + "vesting": {} + }, + "chain_id": "simd-testing", + "consensus_params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1", + "time_iota_ms": "1000" + }, + "evidence": { + "max_age_duration": "172800000000000", + "max_age_num_blocks": "100000", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, + "genesis_time": "2021-07-27T15:14:14.2361126Z", + "initial_height": "1" +} diff --git a/scripts/simapp46/template_slow/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json b/scripts/simapp46/template_slow/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json new file mode 100644 index 00000000..88c7c613 --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/gentx/gentx-ad7cdbcfe545eaaaea99378bc70bf22eef3401a4.json @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"simd-moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679","validator_address":"cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU="},"value":{"denom":"ustake","amount":"3000000"}}],"memo":"ad7cdbcfe545eaaaea99378bc70bf22eef3401a4@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g=="]} diff --git a/scripts/simapp46/template_slow/.simapp/config/node_key.json b/scripts/simapp46/template_slow/.simapp/config/node_key.json new file mode 100644 index 00000000..8eb3f72f --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/node_key.json @@ -0,0 +1 @@ +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"VJWbZaD0jAkAh4VBLS9I2FDFwAKhbCYjs/ycVEDRNW6teVZgaxLnZ+mW3sMhvdIKY99DaD55h9L1MXkx8WsQ+g=="}} \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/config/priv_validator_key.json b/scripts/simapp46/template_slow/.simapp/config/priv_validator_key.json new file mode 100644 index 00000000..cbb56b7a --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/priv_validator_key.json @@ -0,0 +1,11 @@ +{ + "address": "30AF3420A11D7357C54EB716B209D4C3707D1BF3", + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU=" + }, + "priv_key": { + "type": "tendermint/PrivKeyEd25519", + "value": "H/y/XQLnbLKzR3Ey6VCCw0tu87VbA3GO4goA+PPz7VRxQlEPAfK3Lxkw7dy1Ko+97Nw4/ZJinVIMId3X9KkC5Q==" + } +} \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/data/priv_validator_state.json b/scripts/simapp46/template_slow/.simapp/data/priv_validator_state.json new file mode 100644 index 00000000..48f3b67e --- /dev/null +++ b/scripts/simapp46/template_slow/.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/simapp46/template_slow/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address b/scripts/simapp46/template_slow/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address new file mode 100644 index 00000000..e79a087b --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/e0ec5413d84ba0fed8a6a4f9ef9abc9967a402c3.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42ODc0MDc3ICswMDAwIFVUQyBtPSswLjIyNTIwMDMwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjgtN0l6TXhWUmhrMGlBM2kifQ.9c48lG_ZZDrQ5esu0Tw45oacS4V22SLEIChtqW14z17rJtZuS7XYuw.aVNkJGer3Dv--lIR.ulhj65STVqG5ciBObgXc-oyYndKuOzvp03PH9wnh3WTg77SSjwxpEkIMwd9DpkcfBSL0qBvN7aXLAFEG59ydL5GamUTOU94xFISet6dKjxSWbkBmq4_zWmUbe0Qas4eVvPsb6U5w0PIyVTkZwAHDeMtdaEXthBU1JE4biOoi0uICCJkFyqO01q5nrbN7d45EE8vijdPusxfn-abtvSvXLUTcr50nt_w5_YbxsSZnG52Ty2TiV_fjn_Wq.Aj72rrWgBh9fHj1CIoJ7lA \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/keyhash b/scripts/simapp46/template_slow/.simapp/keyhash new file mode 100755 index 00000000..80f4992a --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/keyhash @@ -0,0 +1 @@ +$2a$10$PUzdQ9WON1SgvDtewSKIUerA9LxW51qGoHj2EGZ5TT6oKfHXU7hcK \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/validator.info b/scripts/simapp46/template_slow/.simapp/validator.info new file mode 100644 index 00000000..5c2daa91 --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/validator.info @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42Njk0MzQ3ICswMDAwIFVUQyBtPSswLjIwNzI1MDUwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjB4YU1QYjR4RVVHS29JeW4ifQ.jLK0jNefYAdHELJr3MPhajfSFJfTAre0yBzqnvS1rhzxou2ZMyMJ3w.4h0CQ8NAekW0lshZ.Cusi2aIkUmPlVKdkzjK7SpgrN8xrFcm_L3mf1zTNFfS1GEKHIjMd7a-c7XVOM06hXF_MuIvdCrlHRsWAzX9HgSPQ_T4aQDx8dzdj6iRxv0rwAKjSVLMpuqT3ASSENuPkP21niOuPCnKohVYACq0hpsrYoEt0wMSqnUF7Smz7-hbYmp4EleCEcvwas4qs2LM_hZWvAEFnNdDGFWeyGrNTXXbwXBpCFnWXH-F9FHVtexlwo0OCTJscWFazn8LVGOepO4mQRnsQQ4XMG6WL18Yclz7TmPi3WKkOHOdyhydu7KX_tAISy-jVpMX41kb5OLABuxXYSM6Q1wnyY4SUHvExJ1b41lSER11tIopHbh_Au6ifRRtD.kbUtqwd5x8QH52nHddfwcA \ No newline at end of file diff --git a/scripts/simapp46/template_slow/run_simd.sh b/scripts/simapp46/template_slow/run_simd.sh new file mode 100755 index 00000000..9334906b --- /dev/null +++ b/scripts/simapp46/template_slow/run_simd.sh @@ -0,0 +1,7 @@ +#!/bin/sh +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/simapp46/template_slow/setup.sh b/scripts/simapp46/template_slow/setup.sh new file mode 100755 index 00000000..23648554 --- /dev/null +++ b/scripts/simapp46/template_slow/setup.sh @@ -0,0 +1,47 @@ +#!/bin/sh +set -o errexit -o nounset +command -v shellcheck >/dev/null && shellcheck "$0" + +gnused="$(command -v gsed || echo sed)" + +PASSWORD=${PASSWORD:-1234567890} +CHAIN_ID=${CHAIN_ID:-simd-testing} +MONIKER=${MONIKER:-simd-moniker} + +# The staking and the fee tokens. The supply of the staking token is low compared to the fee token (factor 100). +STAKE=${STAKE_TOKEN:-ustake} +FEE=${FEE_TOKEN:-ucosm} + +# 2000 STAKE and 1000 COSM +START_BALANCE="2000000000$STAKE,1000000000$FEE" + +echo "Creating genesis ..." +simd init --chain-id "$CHAIN_ID" "$MONIKER" +"$gnused" -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 2>/dev/null; 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 +echo "$PASSWORD" | simd add-genesis-account validator "$START_BALANCE" + +echo "Setting up accounts ..." +# (optionally) add a few more genesis accounts +for addr in "$@"; do + echo "$addr" + simd add-genesis-account "$addr" "$START_BALANCE" +done + +echo "Creating genesis tx ..." +SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3) +( + echo "$PASSWORD" + echo "$PASSWORD" + echo "$PASSWORD" +) | simd gentx validator "$SELF_DELEGATION" --offline --chain-id "$CHAIN_ID" --moniker="$MONIKER" +simd collect-gentxs From 6e5a6824d2e37618a260b7731baf05ec7f7ebf5d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 6 Jul 2022 08:57:57 +0200 Subject: [PATCH 03/16] Regenerate app.toml/config.toml --- .../simapp46/template/.simapp/config/app.toml | 88 +++++++++++++++++-- .../template/.simapp/config/config.toml | 67 +++++++++++++- 2 files changed, 148 insertions(+), 7 deletions(-) diff --git a/scripts/simapp46/template/.simapp/config/app.toml b/scripts/simapp46/template/.simapp/config/app.toml index 4855c250..24b42635 100644 --- a/scripts/simapp46/template/.simapp/config/app.toml +++ b/scripts/simapp46/template/.simapp/config/app.toml @@ -8,17 +8,16 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "" +minimum-gas-prices = "0stake" -# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +# default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals -# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' +# everything: 2 latest states will be kept; pruning at 10 block intervals. +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' pruning = "default" # These are applied if and only if the pruning strategy is custom. pruning-keep-recent = "0" -pruning-keep-every = "0" pruning-interval = "0" # HaltHeight contains a non-zero block height at which a node will gracefully @@ -60,6 +59,16 @@ inter-block-cache = true # ["message.sender", "message.recipient"] index-events = [] +# IavlCacheSize set the size of the iavl tree cache. +# Default cache size is 50mb. +iavl-cache-size = 781250 + +# AppDBBackend defines the database backend type to use for the application and snapshots DBs. +# An empty string indicates that a fallback will be used. +# First fallback is the deprecated compile-time types.DBBackend value. +# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml. +app-db-backend = "" + ############################################################################### ### Telemetry Configuration ### ############################################################################### @@ -124,6 +133,42 @@ rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enabled-unsafe-cors = true +############################################################################### +### Rosetta Configuration ### +############################################################################### + +[rosetta] + +# Enable defines if the Rosetta API server should be enabled. +enable = true + +# Address defines the Rosetta API server to listen on. +address = ":8080" + +# Network defines the name of the blockchain that will be returned by Rosetta. +blockchain = "app" + +# Network defines the name of the network that will be returned by Rosetta. +network = "network" + +# Retries defines the number of retries when connecting to the node before failing. +retries = 3 + +# Offline defines if Rosetta server should run in offline mode. +offline = false + +# EnableDefaultSuggestedFee defines if the server should suggest fee by default. +# If 'construction/medata' is called without gas limit and gas price, +# suggested fee based on gas-to-suggest and denom-to-suggest will be given. +enable-fee-suggestion = false + +# GasToSuggest defines gas limit when calculating the fee +gas-to-suggest = 200000 + +# DenomToSuggest defines the defult denom for fee suggestion. +# Price must be in minimum-gas-prices. +denom-to-suggest = "uatom" + ############################################################################### ### gRPC Configuration ### ############################################################################### @@ -136,6 +181,30 @@ enable = true # Address defines the gRPC server address to bind to. address = "0.0.0.0:9090" +# MaxRecvMsgSize defines the max message size in bytes the server can receive. +# The default value is 10MB. +max-recv-msg-size = "10485760" + +# MaxSendMsgSize defines the max message size in bytes the server can send. +# The default value is math.MaxInt32. +max-send-msg-size = "2147483647" + +############################################################################### +### gRPC Web Configuration ### +############################################################################### + +[grpc-web] + +# GRPCWebEnable defines if the gRPC-web should be enabled. +# NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. +enable = true + +# Address defines the gRPC-web server address to bind to. +address = "0.0.0.0:9091" + +# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). +enable-unsafe-cors = false + ############################################################################### ### State Sync Configuration ### ############################################################################### @@ -145,8 +214,15 @@ address = "0.0.0.0:9090" [state-sync] # snapshot-interval specifies the block interval at which local state sync snapshots are -# taken (0 to disable). Must be a multiple of pruning-keep-every. +# taken (0 to disable). snapshot-interval = 0 # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). snapshot-keep-recent = 2 + +[wasm] +# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries +query_gas_limit = 300000 +# This is the number of wasm vm instances we keep cached in memory for speed-up +# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally +lru_size = 0 \ No newline at end of file diff --git a/scripts/simapp46/template/.simapp/config/config.toml b/scripts/simapp46/template/.simapp/config/config.toml index 288d1d98..f76fec17 100644 --- a/scripts/simapp46/template/.simapp/config/config.toml +++ b/scripts/simapp46/template/.simapp/config/config.toml @@ -136,6 +136,33 @@ max_subscription_clients = 100 # the estimated # maximum number of broadcast_tx_commit calls per block. max_subscriptions_per_client = 5 +# Experimental parameter to specify the maximum number of events a node will +# buffer, per subscription, before returning an error and closing the +# subscription. Must be set to at least 100, but higher values will accommodate +# higher event throughput rates (and will use more memory). +experimental_subscription_buffer_size = 200 + +# Experimental parameter to specify the maximum number of RPC responses that +# can be buffered per WebSocket client. If clients cannot read from the +# WebSocket endpoint fast enough, they will be disconnected, so increasing this +# parameter may reduce the chances of them being disconnected (but will cause +# the node to use more memory). +# +# Must be at least the same as "experimental_subscription_buffer_size", +# otherwise connections could be dropped unnecessarily. This value should +# ideally be somewhat higher than "experimental_subscription_buffer_size" to +# accommodate non-subscription-related RPC responses. +experimental_websocket_write_buffer_size = 200 + +# If a WebSocket client cannot read fast enough, at present we may +# silently drop events instead of generating an error or disconnecting the +# client. +# +# Enabling this experimental parameter will cause the WebSocket connection to +# be closed instead if it cannot read fast enough, allowing for greater +# predictability in subscription behaviour. +experimental_close_on_slow_client = false + # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. @@ -177,7 +204,8 @@ laddr = "tcp://0.0.0.0:26656" # Address to advertise to peers for them to dial # If empty, will use the same port as the laddr, # and will introspect on the listener or use UPnP -# to figure out the address. +# to figure out the address. ip and port are required +# example: 159.89.10.97:26656 external_address = "" # Comma separated list of seed nodes to connect to @@ -244,6 +272,14 @@ dial_timeout = "3s" ####################################################### [mempool] +# Mempool version to use: +# 1) "v0" - (default) FIFO mempool. +# 2) "v1" - prioritized mempool. +# WARNING: There's a known memory leak with the prioritized mempool +# that the team are working on. Read more here: +# https://github.com/tendermint/tendermint/issues/8775 +version = "v0" + recheck = true broadcast = true wal_dir = "" @@ -273,6 +309,22 @@ max_tx_bytes = 1048576 # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = 0 +# ttl-duration, if non-zero, defines the maximum amount of time a transaction +# can exist for in the mempool. +# +# Note, if ttl-num-blocks is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if it's +# insertion time into the mempool is beyond ttl-duration. +ttl-duration = "0s" + +# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction +# can exist for in the mempool. +# +# Note, if ttl-duration is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if +# it's insertion time into the mempool is beyond ttl-duration. +ttl-num-blocks = 0 + ####################################################### ### State Sync Configuration Options ### ####################################################### @@ -302,6 +354,13 @@ discovery_time = "15s" # Will create a new, randomly named directory within, and remove it when done. temp_dir = "" +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 1 minute). +chunk_request_timeout = "10s" + +# The number of concurrent chunk fetchers to run (default: 1). +chunk_fetchers = "4" + ####################################################### ### Fast Sync Configuration Connections ### ####################################################### @@ -368,8 +427,14 @@ peer_query_maj23_sleep_duration = "2s" # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +# 3) "psql" - the indexer services backed by PostgreSQL. +# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. indexer = "kv" +# The PostgreSQL connection configuration, the connection format: +# postgresql://:@:/? +psql-conn = "" + ####################################################### ### Instrumentation Configuration Options ### ####################################################### From 067147ec0d8d3ecf4198e55e708c71c08c809cee Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 6 Jul 2022 09:11:29 +0200 Subject: [PATCH 04/16] Set min_commission_rate --- scripts/simapp46/template/.simapp/config/genesis.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/simapp46/template/.simapp/config/genesis.json b/scripts/simapp46/template/.simapp/config/genesis.json index 2ee88700..8ed04fdb 100644 --- a/scripts/simapp46/template/.simapp/config/genesis.json +++ b/scripts/simapp46/template/.simapp/config/genesis.json @@ -625,6 +625,7 @@ "historical_entries": 10000, "max_entries": 7, "max_validators": 100, + "min_commission_rate": "0.000000000000000000", "unbonding_time": "1814400s" }, "redelegations": [], From 9b0478d4254f35db8406bcd9ecd04bf6b49ce3d8 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 6 Jul 2022 11:28:51 +0200 Subject: [PATCH 05/16] Add SIMAPP46_ENABLED/SLOW_SIMAPP46_ENABLED env variabled and add to CI --- .circleci/config.yml | 4 +++- packages/faucet/src/faucet.spec.ts | 4 ++-- packages/ledger-amino/src/testutils.spec.ts | 4 ++-- .../stargate/src/modules/authz/queries.spec.ts | 4 ++-- packages/stargate/src/modules/gov/messages.spec.ts | 6 +++--- packages/stargate/src/testutils.spec.ts | 14 +++++++++----- packages/stargate/webpack.web.config.js | 2 ++ 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f87633b9..5fd6a76c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ workflows: - build matrix: parameters: - simapp: ["simapp42", "simapp44"] + simapp: ["simapp42", "simapp44", "simapp46"] - test-node: requires: - build @@ -159,6 +159,7 @@ jobs: command: | [ "<< parameters.simapp >>" = "simapp42" ] && export SIMAPP42_ENABLED=1 SLOW_SIMAPP42_ENABLED=1 [ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1 + [ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1 yarn test --stream - run: name: Run CLI selftest @@ -178,6 +179,7 @@ jobs: command: | [ "<< parameters.simapp >>" = "simapp42" ] && export SIMAPP42_ENABLED=1 SLOW_SIMAPP42_ENABLED=1 [ "<< parameters.simapp >>" = "simapp44" ] && export SIMAPP44_ENABLED=1 SLOW_SIMAPP44_ENABLED=1 + [ "<< parameters.simapp >>" = "simapp46" ] && export SIMAPP46_ENABLED=1 SLOW_SIMAPP46_ENABLED=1 ./run_examples.sh - run: name: Stop chains diff --git a/packages/faucet/src/faucet.spec.ts b/packages/faucet/src/faucet.spec.ts index b97e91cd..5d2748ae 100644 --- a/packages/faucet/src/faucet.spec.ts +++ b/packages/faucet/src/faucet.spec.ts @@ -7,8 +7,8 @@ import { Faucet } from "./faucet"; import { TokenConfiguration } from "./tokenmanager"; function pendingWithoutSimapp(): void { - if (!process.env.SIMAPP42_ENABLED && !process.env.SIMAPP44_ENABLED) { - return pending("Set SIMAPP42_ENABLED or SIMAPP44_ENABLED to enabled Stargate node-based tests"); + if (!process.env.SIMAPP42_ENABLED && !process.env.SIMAPP44_ENABLED && !process.env.SIMAPP46_ENABLED) { + return pending("Set SIMAPP{42,44,46}_ENABLED to enabled Stargate node-based tests"); } } diff --git a/packages/ledger-amino/src/testutils.spec.ts b/packages/ledger-amino/src/testutils.spec.ts index 49dfd157..5a689c14 100644 --- a/packages/ledger-amino/src/testutils.spec.ts +++ b/packages/ledger-amino/src/testutils.spec.ts @@ -19,12 +19,12 @@ export function pendingWithoutLedger(): void { } export function simappEnabled(): boolean { - return !!process.env.SIMAPP42_ENABLED || !!process.env.SIMAPP44_ENABLED; + return !!process.env.SIMAPP42_ENABLED || !!process.env.SIMAPP44_ENABLED || !!process.env.SIMAPP46_ENABLED; } export function pendingWithoutSimapp(): void { if (!simappEnabled()) { - return pending("Set SIMAPP42_ENABLED or SIMAPP44_ENABLED to enable Simapp-based tests"); + return pending("Set SIMAPP{42,44,46}_ENABLED to enable Simapp-based tests"); } } diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index 2cf3316b..f79e2e59 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -11,7 +11,7 @@ import { defaultSigningClientOptions, faucet, makeRandomAddress, - pendingWithoutSimapp44, + pendingWithoutSimapp44Or46, simapp, simapp44Enabled, } from "../../testutils.spec"; @@ -79,7 +79,7 @@ describe("AuthzExtension", () => { describe("grants", () => { it("works", async () => { - pendingWithoutSimapp44(); + pendingWithoutSimapp44Or46(); const [client, tmClient] = await makeClientWithAuthz(simapp.tendermintUrl); const response = await client.authz.grants(granter1Address, grantee1Address, ""); expect(response.grants.length).toEqual(1); diff --git a/packages/stargate/src/modules/gov/messages.spec.ts b/packages/stargate/src/modules/gov/messages.spec.ts index 6724ca6a..3361468f 100644 --- a/packages/stargate/src/modules/gov/messages.spec.ts +++ b/packages/stargate/src/modules/gov/messages.spec.ts @@ -12,7 +12,7 @@ import { faucet, nonNegativeIntegerMatcher, pendingWithoutSimapp, - pendingWithoutSimapp44, + pendingWithoutSimapp44Or46, simapp, simappEnabled, validator, @@ -171,7 +171,7 @@ describe("gov messages", () => { describe("MsgVoteWeighted", () => { it("works", async () => { - pendingWithoutSimapp44(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42 + pendingWithoutSimapp44Or46(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42 assert(voterWallet); assert(proposalId, "Missing proposal ID"); const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, voterWallet); @@ -204,7 +204,7 @@ describe("gov messages", () => { }); it("works with Amino JSON sign mode", async () => { - pendingWithoutSimapp44(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42 + pendingWithoutSimapp44Or46(); // MsgVoteWeighted does not yet exist in Cosmos SDK 0.42 assert(voterWalletAmino); assert(proposalId, "Missing proposal ID"); const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, voterWalletAmino); diff --git a/packages/stargate/src/testutils.spec.ts b/packages/stargate/src/testutils.spec.ts index 3b528a30..ea7699ed 100644 --- a/packages/stargate/src/testutils.spec.ts +++ b/packages/stargate/src/testutils.spec.ts @@ -23,13 +23,17 @@ export function simapp44Enabled(): boolean { return !!process.env.SIMAPP44_ENABLED; } -export function simappEnabled(): boolean { - return simapp42Enabled() || simapp44Enabled(); +export function simapp46Enabled(): boolean { + return !!process.env.SIMAPP46_ENABLED; } -export function pendingWithoutSimapp44(): void { - if (!simapp44Enabled()) { - return pending("Set SIMAPP44_ENABLED to enable Simapp based tests"); +export function simappEnabled(): boolean { + return simapp42Enabled() || simapp44Enabled() || simapp46Enabled(); +} + +export function pendingWithoutSimapp44Or46(): void { + if (!simapp44Enabled() && !simapp46Enabled()) { + return pending("Set SIMAPP{44,46}_ENABLED to enable Simapp based tests"); } } diff --git a/packages/stargate/webpack.web.config.js b/packages/stargate/webpack.web.config.js index b2ed7ef7..6791d453 100644 --- a/packages/stargate/webpack.web.config.js +++ b/packages/stargate/webpack.web.config.js @@ -21,6 +21,8 @@ module.exports = [ SLOW_SIMAPP42_ENABLED: "", SIMAPP44_ENABLED: "", SLOW_SIMAPP44_ENABLED: "", + SIMAPP46_ENABLED: "", + SLOW_SIMAPP46_ENABLED: "", }), new webpack.ProvidePlugin({ Buffer: ["buffer", "Buffer"], From a41bcc92b99e00521e63ddacb282aefc638e81f6 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 7 Jul 2022 15:53:00 +0200 Subject: [PATCH 06/16] Revert to rc1 --- scripts/simapp46/env | 2 +- scripts/simapp46/generate_template.sh | 16 +- .../template/.simapp/config/config.toml | 327 +++++++++++------- 3 files changed, 207 insertions(+), 138 deletions(-) diff --git a/scripts/simapp46/env b/scripts/simapp46/env index 1bdc14a2..13293e4f 100644 --- a/scripts/simapp46/env +++ b/scripts/simapp46/env @@ -1,5 +1,5 @@ # Choose from https://hub.docker.com/r/interchainio/simapp/tags REPOSITORY="interchainio/simapp" -VERSION="v0.46.0-rc2" +VERSION="v0.46.0-rc1" CONTAINER_NAME="simapp" CONTAINER_NAME_SLOW="simapp-slow" diff --git a/scripts/simapp46/generate_template.sh b/scripts/simapp46/generate_template.sh index faa6908c..b5151f57 100755 --- a/scripts/simapp46/generate_template.sh +++ b/scripts/simapp46/generate_template.sh @@ -55,14 +55,14 @@ function inline_jq() { # Custom settings in config.toml "$gnused" -i \ - -e 's/^cors_allowed_origins =.*$/cors_allowed_origins = ["*"]/' \ - -e 's/^timeout_propose =.*$/timeout_propose = "300ms"/' \ - -e 's/^timeout_propose_delta =.*$/timeout_propose_delta = "100ms"/' \ - -e 's/^timeout_prevote =.*$/timeout_prevote = "300ms"/' \ - -e 's/^timeout_prevote_delta =.*$/timeout_prevote_delta = "100ms"/' \ - -e 's/^timeout_precommit =.*$/timeout_precommit = "300ms"/' \ - -e 's/^timeout_precommit_delta =.*$/timeout_precommit_delta = "100ms"/' \ - -e 's/^timeout_commit =.*$/timeout_commit = "1s"/' \ + -e 's/^cors-allowed-origins =.*$/cors-allowed-origins = ["*"]/' \ + -e 's/^timeout-propose =.*$/timeout-propose = "300ms"/' \ + -e 's/^timeout-propose-delta =.*$/timeout-propose-delta = "100ms"/' \ + -e 's/^timeout-prevote =.*$/timeout-prevote = "300ms"/' \ + -e 's/^timeout-prevote-delta =.*$/timeout-prevote-delta = "100ms"/' \ + -e 's/^timeout-precommit =.*$/timeout-precommit = "300ms"/' \ + -e 's/^timeout-precommit-delta =.*$/timeout-precommit-delta = "100ms"/' \ + -e 's/^timeout-commit =.*$/timeout-commit = "1s"/' \ "template/.simapp/config/config.toml" # Custom settings app.toml diff --git a/scripts/simapp46/template/.simapp/config/config.toml b/scripts/simapp46/template/.simapp/config/config.toml index f76fec17..3d93aee7 100644 --- a/scripts/simapp46/template/.simapp/config/config.toml +++ b/scripts/simapp46/template/.simapp/config/config.toml @@ -12,15 +12,22 @@ # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the Tendermint binary -proxy_app = "tcp://127.0.0.1:26658" +proxy-app = "tcp://127.0.0.1:26658" # A custom human readable name for this node 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 -# and verifying their commits -fast_sync = true +# Mode of Node: full | validator | seed +# * validator node +# - all reactors +# - with priv_validator_key.json, priv_validator_state.json +# * full node +# - all reactors +# - No priv_validator_key.json, priv_validator_state.json +# * seed node +# - only P2P, PEX Reactor +# - No priv_validator_key.json, priv_validator_state.json +mode = "validator" # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) @@ -41,41 +48,58 @@ fast_sync = true # * badgerdb (uses github.com/dgraph-io/badger) # - EXPERIMENTAL # - use badgerdb build tag (go build -tags badgerdb) -db_backend = "goleveldb" +db-backend = "goleveldb" # Database directory -db_dir = "data" +db-dir = "data" # Output level for logging, including package level options -log_level = "info" +log-level = "info" # Output format: 'plain' (colored text) or 'json' -log_format = "plain" +log-format = "plain" ##### additional base config options ##### # Path to the JSON file containing the initial validator set and other meta data -genesis_file = "config/genesis.json" - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -priv_validator_key_file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -priv_validator_state_file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -priv_validator_laddr = "" +genesis-file = "config/genesis.json" # Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node_key_file = "config/node_key.json" +node-key-file = "config/node_key.json" # Mechanism to connect to the ABCI application: socket | grpc abci = "socket" # If true, query the ABCI app on connecting to a new peer # so the app can decide if we should keep the connection or not -filter_peers = false +filter-peers = false + + +####################################################### +### Priv Validator Configuration ### +####################################################### +[priv-validator] + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +key-file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +state-file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +# when the listenAddr is prefixed with grpc instead of tcp it will use the gRPC Client +laddr = "" + +# Path to the client certificate generated while creating needed files for secure connection. +# If a remote validator address is provided but no certificate, the connection will be insecure +client-certificate-file = "" + +# Client key generated while creating certificates for secure connection +client-key-file = "" + +# Path to the Root Certificate Authority used to sign both client and server certificates +root-ca-file = "" ####################################################################### @@ -93,54 +117,56 @@ laddr = "tcp://127.0.0.1:26657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support # Use '["*"]' to allow any origin -cors_allowed_origins = ["*"] +cors-allowed-origins = ["*"] # A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] +cors-allowed-methods = ["HEAD", "GET", "POST", ] # A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] +cors-allowed-headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit -grpc_laddr = "" +# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. +grpc-laddr = "" # Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# Does not include RPC (HTTP&WebSocket) connections. See max-open-connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 -grpc_max_open_connections = 900 +# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. +grpc-max-open-connections = 900 -# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +# Activate unsafe RPC commands like /dial-seeds and /unsafe-flush-mempool unsafe = false # Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc_max_open_connections +# Does not include gRPC connections. See grpc-max-open-connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 -max_open_connections = 900 +max-open-connections = 900 # Maximum number of unique clientIDs that can /subscribe # If you're using /broadcast_tx_commit, set to the estimated maximum number # of broadcast_tx_commit calls per block. -max_subscription_clients = 100 +max-subscription-clients = 100 # Maximum number of unique queries a given client can /subscribe to # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to # the estimated # maximum number of broadcast_tx_commit calls per block. -max_subscriptions_per_client = 5 +max-subscriptions-per-client = 5 # Experimental parameter to specify the maximum number of events a node will # buffer, per subscription, before returning an error and closing the # subscription. Must be set to at least 100, but higher values will accommodate # higher event throughput rates (and will use more memory). -experimental_subscription_buffer_size = 200 +experimental-subscription-buffer-size = 200 # Experimental parameter to specify the maximum number of RPC responses that # can be buffered per WebSocket client. If clients cannot read from the @@ -148,11 +174,11 @@ experimental_subscription_buffer_size = 200 # parameter may reduce the chances of them being disconnected (but will cause # the node to use more memory). # -# Must be at least the same as "experimental_subscription_buffer_size", +# Must be at least the same as "experimental-subscription-buffer-size", # otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental_subscription_buffer_size" to +# ideally be somewhat higher than "experimental-subscription-buffer-size" to # accommodate non-subscription-related RPC responses. -experimental_websocket_write_buffer_size = 200 +experimental-websocket-write-buffer-size = 200 # If a WebSocket client cannot read fast enough, at present we may # silently drop events instead of generating an error or disconnecting the @@ -160,44 +186,50 @@ experimental_websocket_write_buffer_size = 200 # # Enabling this experimental parameter will cause the WebSocket connection to # be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behaviour. -experimental_close_on_slow_client = false +# predictability in subscription behavior. +experimental-close-on-slow-client = false # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. # See https://github.com/tendermint/tendermint/issues/3435 -timeout_broadcast_tx_commit = "10s" +timeout-broadcast-tx-commit = "10s" # Maximum size of request body, in bytes -max_body_bytes = 1000000 +max-body-bytes = 1000000 # Maximum size of request header, in bytes -max_header_bytes = 1048576 +max-header-bytes = 1048576 # The path to a file containing certificate that is used to create the HTTPS server. # Might be either absolute path or path related to Tendermint's config directory. # If the certificate is signed by a certificate authority, # the certFile should be the concatenation of the server's certificate, any intermediates, # and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. +# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. # Otherwise, HTTP server is run. -tls_cert_file = "" +tls-cert-file = "" # The path to a file containing matching private key that is used to create the HTTPS server. # Might be either absolute path or path related to Tendermint's config directory. # NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. # Otherwise, HTTP server is run. -tls_key_file = "" +tls-key-file = "" # pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof_laddr = "localhost:6060" +pprof-laddr = "localhost:6060" ####################################################### ### P2P Configuration Options ### ####################################################### [p2p] +# Enable the legacy p2p layer. +use-legacy = false + +# Select the p2p internal queue +queue-type = "priority" + # Address to listen for incoming connections laddr = "tcp://0.0.0.0:26656" @@ -206,66 +238,95 @@ laddr = "tcp://0.0.0.0:26656" # and will introspect on the listener or use UPnP # to figure out the address. ip and port are required # example: 159.89.10.97:26656 -external_address = "" +external-address = "" # Comma separated list of seed nodes to connect to +# We only use these if we can’t connect to peers in the addrbook +# NOTE: not used by the new PEX reactor. Please use BootstrapPeers instead. +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 seeds = "" +# Comma separated list of peers to be added to the peer store +# on startup. Either BootstrapPeers or PersistentPeers are +# needed for peer discovery +bootstrap-peers = "" + # Comma separated list of nodes to keep persistent connections to -persistent_peers = "" +persistent-peers = "" # UPNP port forwarding upnp = false # Path to address book -addr_book_file = "config/addrbook.json" +# TODO: Remove once p2p refactor is complete in favor of peer store. +addr-book-file = "config/addrbook.json" # Set true for strict address routability rules # Set false for private or local networks -addr_book_strict = true +addr-book-strict = true # Maximum number of inbound peers -max_num_inbound_peers = 40 +# +# TODO: Remove once p2p refactor is complete in favor of MaxConnections. +# ref: https://github.com/tendermint/tendermint/issues/5670 +max-num-inbound-peers = 40 # Maximum number of outbound peers to connect to, excluding persistent peers -max_num_outbound_peers = 10 +# +# TODO: Remove once p2p refactor is complete in favor of MaxConnections. +# ref: https://github.com/tendermint/tendermint/issues/5670 +max-num-outbound-peers = 10 + +# Maximum number of connections (inbound and outbound). +max-connections = 64 + +# Rate limits the number of incoming connection attempts per IP address. +max-incoming-connection-attempts = 100 # List of node IDs, to which a connection will be (re)established ignoring any existing limits -unconditional_peer_ids = "" +# TODO: Remove once p2p refactor is complete. +# ref: https://github.com/tendermint/tendermint/issues/5670 +unconditional-peer-ids = "" # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -persistent_peers_max_dial_period = "0s" +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +persistent-peers-max-dial-period = "0s" # Time to wait before flushing messages out on the connection -flush_throttle_timeout = "100ms" +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +flush-throttle-timeout = "100ms" # Maximum size of a message packet payload, in bytes -max_packet_msg_payload_size = 1024 +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +max-packet-msg-payload-size = 1400 # Rate at which packets can be sent, in bytes/second -send_rate = 5120000 +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +send-rate = 5120000 # Rate at which packets can be received, in bytes/second -recv_rate = 5120000 +# TODO: Remove once p2p refactor is complete +# ref: https:#github.com/tendermint/tendermint/issues/5670 +recv-rate = 5120000 # Set true to enable the peer-exchange reactor pex = true -# Seed mode, in which node constantly crawls the network and looks for -# peers. If another node asks it for addresses, it responds and disconnects. -# -# Does not work if the peer-exchange reactor is disabled. -seed_mode = false - # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "" +# Warning: IPs will be exposed at /net_info, for more information https://github.com/tendermint/tendermint/issues/3055 +private-peer-ids = "" # Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = false +allow-duplicate-ip = false # Peer connection configuration. -handshake_timeout = "20s" -dial_timeout = "3s" +handshake-timeout = "20s" +dial-timeout = "3s" ####################################################### ### Mempool Configuration Option ### @@ -273,27 +334,23 @@ dial_timeout = "3s" [mempool] # Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -# WARNING: There's a known memory leak with the prioritized mempool -# that the team are working on. Read more here: -# https://github.com/tendermint/tendermint/issues/8775 -version = "v0" +# 1) "v0" - The legacy non-prioritized mempool reactor. +# 2) "v1" (default) - The prioritized mempool reactor. +version = "v1" recheck = true broadcast = true -wal_dir = "" # Maximum number of transactions in the mempool size = 5000 # Limit the total size of all txs in the mempool. # This only accounts for raw transactions (e.g. given 1MB transactions and -# max_txs_bytes=5MB, mempool will only accept 5 transactions). -max_txs_bytes = 1073741824 +# max-txs-bytes=5MB, mempool will only accept 5 transactions). +max-txs-bytes = 1073741824 # Size of the cache (used to filter transactions we saw earlier) in transactions -cache_size = 10000 +cache-size = 10000 # Do not remove invalid transactions from the cache (default: false) # Set to true if it's not possible for any invalid transaction to become valid @@ -301,13 +358,13 @@ cache_size = 10000 keep-invalid-txs-in-cache = false # Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. -max_tx_bytes = 1048576 +# NOTE: the max size of a tx transmitted over the network is {max-tx-bytes}. +max-tx-bytes = 1048576 # Maximum size of a batch of transactions to send to a peer # Including space needed by encoding (one varint per transaction). # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max_batch_bytes = 0 +max-batch-bytes = 0 # ttl-duration, if non-zero, defines the maximum amount of time a transaction # can exist for in the mempool. @@ -336,40 +393,52 @@ ttl-num-blocks = 0 # starting from the height of the snapshot. enable = false -# RPC servers (comma-separated) for light client verification of the synced state machine and -# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding -# header hash obtained from a trusted source, and a period during which validators can be trusted. -# -# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 -# weeks) during which they can be financially punished (slashed) for misbehavior. -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" +# State sync uses light client verification to verify state. This can be done either through the +# P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer +# will be used. +use-p2p = false + +# If using RPC, at least two addresses need to be provided. They should be compatible with net.Dial, +# for example: "host.example.com:2125" +rpc-servers = "" + +# The hash and height of a trusted block. Must be within the trust-period. +trust-height = 0 +trust-hash = "" + +# The trust period should be set so that Tendermint can detect and gossip misbehavior before +# it is considered expired. For chains based on the Cosmos SDK, one day less than the unbonding +# period should suffice. +trust-period = "168h0m0s" # Time to spend discovering snapshots before initiating a restore. -discovery_time = "15s" +discovery-time = "15s" -# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). -# Will create a new, randomly named directory within, and remove it when done. -temp_dir = "" +# Temporary directory for state sync snapshot chunks, defaults to os.TempDir(). +# The synchronizer will create a new, randomly named directory within this directory +# and remove it when the sync is complete. +temp-dir = "" # The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 1 minute). -chunk_request_timeout = "10s" +# peer (default: 15 seconds). +chunk-request-timeout = "15s" -# The number of concurrent chunk fetchers to run (default: 1). -chunk_fetchers = "4" +# The number of concurrent chunk and block fetchers to run (default: 4). +fetchers = "4" ####################################################### -### Fast Sync Configuration Connections ### +### Block Sync Configuration Connections ### ####################################################### -[fastsync] +[blocksync] -# Fast Sync version to use: -# 1) "v0" (default) - the legacy fast sync implementation -# 2) "v1" - refactor of v0 version for better testability -# 2) "v2" - complete redesign of v0, optimized for testability & readability +# If this node is many blocks behind the tip of the chain, BlockSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +enable = true + +# Block Sync version to use: +# 1) "v0" (default) - the standard Block Sync implementation +# 2) "v2" - DEPRECATED, please use v0 version = "v0" ####################################################### @@ -377,48 +446,49 @@ version = "v0" ####################################################### [consensus] -wal_file = "data/cs.wal/wal" +wal-file = "data/cs.wal/wal" # How long we wait for a proposal block before prevoting nil -timeout_propose = "300ms" -# How much timeout_propose increases with each round -timeout_propose_delta = "100ms" +timeout-propose = "300ms" +# How much timeout-propose increases with each round +timeout-propose-delta = "100ms" # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout_prevote = "300ms" -# How much the timeout_prevote increases with each round -timeout_prevote_delta = "100ms" +timeout-prevote = "300ms" +# How much the timeout-prevote increases with each round +timeout-prevote-delta = "100ms" # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout_precommit = "300ms" -# How much the timeout_precommit increases with each round -timeout_precommit_delta = "100ms" +timeout-precommit = "300ms" +# How much the timeout-precommit increases with each round +timeout-precommit-delta = "100ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). -timeout_commit = "1s" +timeout-commit = "1s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double_sign_check_height} last blocks. +# if the same consensus key was used to sign {double-sign-check-height} last blocks. # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double_sign_check_height = 0 +double-sign-check-height = 0 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip_timeout_commit = false +skip-timeout-commit = false # EmptyBlocks mode and possible interval between empty blocks -create_empty_blocks = true -create_empty_blocks_interval = "0s" +create-empty-blocks = true +create-empty-blocks-interval = "0s" # Reactor sleep duration parameters -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" +peer-gossip-sleep-duration = "100ms" +peer-query-maj23-sleep-duration = "2s" ####################################################### ### Transaction Indexer Configuration Options ### ####################################################### -[tx_index] +[tx-index] -# What indexer to use for transactions +# The backend database list to back the indexer. +# If list contains "null" or "", meaning no indexer service will be used. # # The application will set which txs to index. In some cases a node operator will be able # to decide which txs to index based on configuration set in the application. @@ -426,10 +496,9 @@ peer_query_maj23_sleep_duration = "2s" # Options: # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). -# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" +indexer = ["kv"] # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? @@ -446,13 +515,13 @@ psql-conn = "" prometheus = false # Address to listen for Prometheus collector(s) connections -prometheus_listen_addr = ":26660" +prometheus-listen-addr = ":26660" # Maximum number of simultaneous connections. # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. -max_open_connections = 3 +max-open-connections = 3 # Instrumentation namespace namespace = "tendermint" From c5fed6bdd7a86d1e5b57a41813806bd6981df9fb Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 7 Jul 2022 16:04:29 +0200 Subject: [PATCH 07/16] Switch to Tendermint 0.35 client --- .../cosmwasm-stargate/src/cosmwasmclient.ts | 14 +++--- .../src/signingcosmwasmclient.ts | 6 +-- .../cosmwasm-stargate/src/testutils.spec.ts | 4 +- .../stargate/src/modules/auth/queries.spec.ts | 6 +-- .../src/modules/authz/queries.spec.ts | 6 +-- .../stargate/src/modules/bank/queries.spec.ts | 6 +-- .../src/modules/distribution/queries.spec.ts | 6 +-- .../stargate/src/modules/gov/queries.spec.ts | 6 +-- .../stargate/src/modules/ibc/queries.spec.ts | 6 +-- .../stargate/src/modules/mint/queries.spec.ts | 6 +-- .../src/modules/slashing/queries.spec.ts | 6 +-- .../src/modules/staking/queries.spec.ts | 6 +-- .../stargate/src/modules/tx/queries.spec.ts | 6 +-- .../src/queryclient/queryclient.spec.ts | 6 +-- .../stargate/src/queryclient/queryclient.ts | 46 +++++++++---------- .../stargate/src/signingstargateclient.ts | 6 +-- packages/stargate/src/stargateclient.ts | 14 +++--- 17 files changed, 78 insertions(+), 78 deletions(-) diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.ts index d263a978..4da721dc 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.ts @@ -23,7 +23,7 @@ import { TimeoutError, TxExtension, } from "@cosmjs/stargate"; -import { HttpEndpoint, Tendermint34Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint35Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { CodeInfoResponse, @@ -75,14 +75,14 @@ export interface ContractCodeHistoryEntry { /** Use for testing only */ export interface PrivateCosmWasmClient { - readonly tmClient: Tendermint34Client | undefined; + readonly tmClient: Tendermint35Client | undefined; readonly queryClient: | (QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension) | undefined; } export class CosmWasmClient { - private readonly tmClient: Tendermint34Client | undefined; + private readonly tmClient: Tendermint35Client | undefined; private readonly queryClient: | (QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension) | undefined; @@ -90,11 +90,11 @@ export class CosmWasmClient { private chainId: string | undefined; public static async connect(endpoint: string | HttpEndpoint): Promise { - const tmClient = await Tendermint34Client.connect(endpoint); + const tmClient = await Tendermint35Client.connect(endpoint); return new CosmWasmClient(tmClient); } - protected constructor(tmClient: Tendermint34Client | undefined) { + protected constructor(tmClient: Tendermint35Client | undefined) { if (tmClient) { this.tmClient = tmClient; this.queryClient = QueryClient.withExtensions( @@ -107,11 +107,11 @@ export class CosmWasmClient { } } - protected getTmClient(): Tendermint34Client | undefined { + protected getTmClient(): Tendermint35Client | undefined { return this.tmClient; } - protected forceGetTmClient(): Tendermint34Client { + protected forceGetTmClient(): Tendermint35Client { if (!this.tmClient) { throw new Error( "Tendermint client not available. You cannot use online functionality in offline mode.", diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts index 2065437c..205b5ca9 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts @@ -30,7 +30,7 @@ import { SignerData, StdFee, } from "@cosmjs/stargate"; -import { HttpEndpoint, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assert, assertDefined } from "@cosmjs/utils"; import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -182,7 +182,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { signer: OfflineSigner, options: SigningCosmWasmClientOptions = {}, ): Promise { - const tmClient = await Tendermint34Client.connect(endpoint); + const tmClient = await Tendermint35Client.connect(endpoint); return new SigningCosmWasmClient(tmClient, signer, options); } @@ -203,7 +203,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { } protected constructor( - tmClient: Tendermint34Client | undefined, + tmClient: Tendermint35Client | undefined, signer: OfflineSigner, options: SigningCosmWasmClientOptions, ) { diff --git a/packages/cosmwasm-stargate/src/testutils.spec.ts b/packages/cosmwasm-stargate/src/testutils.spec.ts index c4166443..ceb760b0 100644 --- a/packages/cosmwasm-stargate/src/testutils.spec.ts +++ b/packages/cosmwasm-stargate/src/testutils.spec.ts @@ -18,7 +18,7 @@ import { setupAuthExtension, setupBankExtension, } from "@cosmjs/stargate"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing"; import { AuthInfo, SignDoc, TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx"; @@ -169,7 +169,7 @@ export function fromOneElementArray(elements: ArrayLike): T { export async function makeWasmClient( endpoint: string, ): Promise { - const tmClient = await Tendermint34Client.connect(endpoint); + const tmClient = await Tendermint35Client.connect(endpoint); return QueryClient.withExtensions(tmClient, setupAuthExtension, setupBankExtension, setupWasmExtension); } diff --git a/packages/stargate/src/modules/auth/queries.spec.ts b/packages/stargate/src/modules/auth/queries.spec.ts index 6db9dd61..2c2b0e59 100644 --- a/packages/stargate/src/modules/auth/queries.spec.ts +++ b/packages/stargate/src/modules/auth/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { encodePubkey } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assert } from "@cosmjs/utils"; import { BaseAccount } from "cosmjs-types/cosmos/auth/v1beta1/auth"; import { Any } from "cosmjs-types/google/protobuf/any"; @@ -12,8 +12,8 @@ import { AuthExtension, setupAuthExtension } from "./queries"; async function makeClientWithAuth( rpcUrl: string, -): Promise<[QueryClient & AuthExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & AuthExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupAuthExtension), tmClient]; } diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index f79e2e59..00db8850 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -1,6 +1,6 @@ import { makeCosmoshubPath } from "@cosmjs/amino"; import { coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { GenericAuthorization } from "cosmjs-types/cosmos/authz/v1beta1/authz"; @@ -19,8 +19,8 @@ import { AuthzExtension, setupAuthzExtension } from "./queries"; async function makeClientWithAuthz( rpcUrl: string, -): Promise<[QueryClient & AuthzExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & AuthzExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupAuthzExtension), tmClient]; } diff --git a/packages/stargate/src/modules/bank/queries.spec.ts b/packages/stargate/src/modules/bank/queries.spec.ts index bfd4d1ad..41199aa0 100644 --- a/packages/stargate/src/modules/bank/queries.spec.ts +++ b/packages/stargate/src/modules/bank/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { @@ -12,8 +12,8 @@ import { BankExtension, setupBankExtension } from "./queries"; async function makeClientWithBank( rpcUrl: string, -): Promise<[QueryClient & BankExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & BankExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupBankExtension), tmClient]; } diff --git a/packages/stargate/src/modules/distribution/queries.spec.ts b/packages/stargate/src/modules/distribution/queries.spec.ts index a059d07a..d8ad6c41 100644 --- a/packages/stargate/src/modules/distribution/queries.spec.ts +++ b/packages/stargate/src/modules/distribution/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -20,8 +20,8 @@ import { DistributionExtension, setupDistributionExtension } from "./queries"; async function makeClientWithDistribution( rpcUrl: string, -): Promise<[QueryClient & DistributionExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & DistributionExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupDistributionExtension), tmClient]; } diff --git a/packages/stargate/src/modules/gov/queries.spec.ts b/packages/stargate/src/modules/gov/queries.spec.ts index d502a6da..c3259839 100644 --- a/packages/stargate/src/modules/gov/queries.spec.ts +++ b/packages/stargate/src/modules/gov/queries.spec.ts @@ -1,7 +1,7 @@ import { coin, coins, makeCosmoshubPath } from "@cosmjs/amino"; import { toAscii } from "@cosmjs/encoding"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { ProposalStatus, @@ -29,8 +29,8 @@ import { import { MsgDelegateEncodeObject, MsgSubmitProposalEncodeObject, MsgVoteEncodeObject } from "../"; import { GovExtension, setupGovExtension } from "./queries"; -async function makeClientWithGov(rpcUrl: string): Promise<[QueryClient & GovExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +async function makeClientWithGov(rpcUrl: string): Promise<[QueryClient & GovExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupGovExtension), tmClient]; } diff --git a/packages/stargate/src/modules/ibc/queries.spec.ts b/packages/stargate/src/modules/ibc/queries.spec.ts index 7455fe19..45be2fe5 100644 --- a/packages/stargate/src/modules/ibc/queries.spec.ts +++ b/packages/stargate/src/modules/ibc/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import Long from "long"; import { QueryClient } from "../../queryclient"; @@ -6,8 +6,8 @@ import { pendingWithoutSimapp42, simapp } from "../../testutils.spec"; import * as ibcTest from "./ibctestdata.spec"; import { IbcExtension, setupIbcExtension } from "./queries"; -async function makeClientWithIbc(rpcUrl: string): Promise<[QueryClient & IbcExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +async function makeClientWithIbc(rpcUrl: string): Promise<[QueryClient & IbcExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupIbcExtension), tmClient]; } diff --git a/packages/stargate/src/modules/mint/queries.spec.ts b/packages/stargate/src/modules/mint/queries.spec.ts index 0e028876..4f822ef0 100644 --- a/packages/stargate/src/modules/mint/queries.spec.ts +++ b/packages/stargate/src/modules/mint/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; @@ -6,8 +6,8 @@ import { MintExtension, setupMintExtension } from "./queries"; async function makeClientWithMint( rpcUrl: string, -): Promise<[QueryClient & MintExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & MintExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupMintExtension), tmClient]; } diff --git a/packages/stargate/src/modules/slashing/queries.spec.ts b/packages/stargate/src/modules/slashing/queries.spec.ts index ab4b2ff9..8c0bd879 100644 --- a/packages/stargate/src/modules/slashing/queries.spec.ts +++ b/packages/stargate/src/modules/slashing/queries.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; @@ -7,8 +7,8 @@ import { setupSlashingExtension, SlashingExtension } from "./queries"; async function makeClientWithSlashing( rpcUrl: string, -): Promise<[QueryClient & SlashingExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & SlashingExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupSlashingExtension), tmClient]; } diff --git a/packages/stargate/src/modules/staking/queries.spec.ts b/packages/stargate/src/modules/staking/queries.spec.ts index b8ce620b..23776a78 100644 --- a/packages/stargate/src/modules/staking/queries.spec.ts +++ b/packages/stargate/src/modules/staking/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -20,8 +20,8 @@ import { setupStakingExtension, StakingExtension } from "./queries"; async function makeClientWithStaking( rpcUrl: string, -): Promise<[QueryClient & StakingExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +): Promise<[QueryClient & StakingExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupStakingExtension), tmClient]; } diff --git a/packages/stargate/src/modules/tx/queries.spec.ts b/packages/stargate/src/modules/tx/queries.spec.ts index ad16e077..b526744a 100644 --- a/packages/stargate/src/modules/tx/queries.spec.ts +++ b/packages/stargate/src/modules/tx/queries.spec.ts @@ -1,5 +1,5 @@ import { coin, coins, DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; import Long from "long"; @@ -18,8 +18,8 @@ import { } from "../../testutils.spec"; import { setupTxExtension, TxExtension } from "./queries"; -async function makeClientWithTx(rpcUrl: string): Promise<[QueryClient & TxExtension, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +async function makeClientWithTx(rpcUrl: string): Promise<[QueryClient & TxExtension, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupTxExtension), tmClient]; } diff --git a/packages/stargate/src/queryclient/queryclient.spec.ts b/packages/stargate/src/queryclient/queryclient.spec.ts index db3f830a..c36424e1 100644 --- a/packages/stargate/src/queryclient/queryclient.spec.ts +++ b/packages/stargate/src/queryclient/queryclient.spec.ts @@ -1,14 +1,14 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { toAscii } from "@cosmjs/encoding"; -import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { Metadata } from "cosmjs-types/cosmos/bank/v1beta1/bank"; import { QueryAllBalancesRequest, QueryAllBalancesResponse } from "cosmjs-types/cosmos/bank/v1beta1/query"; import { pendingWithoutSimapp, simapp, unused } from "../testutils.spec"; import { QueryClient } from "./queryclient"; -async function makeClient(rpcUrl: string): Promise<[QueryClient, Tendermint34Client]> { - const tmClient = await Tendermint34Client.connect(rpcUrl); +async function makeClient(rpcUrl: string): Promise<[QueryClient, Tendermint35Client]> { + const tmClient = await Tendermint35Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient), tmClient]; } diff --git a/packages/stargate/src/queryclient/queryclient.ts b/packages/stargate/src/queryclient/queryclient.ts index 5965cfa6..cc131479 100644 --- a/packages/stargate/src/queryclient/queryclient.ts +++ b/packages/stargate/src/queryclient/queryclient.ts @@ -2,7 +2,7 @@ import { iavlSpec, ics23, tendermintSpec, verifyExistence, verifyNonExistence } from "@confio/ics23"; import { toAscii, toHex } from "@cosmjs/encoding"; import { firstEvent } from "@cosmjs/stream"; -import { tendermint34, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { tendermint34, Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { arrayContentEquals, assert, assertDefined, isNonNullObject, sleep } from "@cosmjs/utils"; import { ProofOps } from "cosmjs-types/tendermint/crypto/proof"; import { Stream } from "xstream"; @@ -28,24 +28,24 @@ export interface ProvenQuery { export class QueryClient { /** Constructs a QueryClient with 0 extensions */ - public static withExtensions(tmClient: Tendermint34Client): QueryClient; + public static withExtensions(tmClient: Tendermint35Client): QueryClient; /** Constructs a QueryClient with 1 extension */ public static withExtensions( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, ): QueryClient & A; /** Constructs a QueryClient with 2 extensions */ public static withExtensions( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, ): QueryClient & A & B; /** Constructs a QueryClient with 3 extensions */ public static withExtensions( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -53,7 +53,7 @@ export class QueryClient { /** Constructs a QueryClient with 4 extensions */ public static withExtensions( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -68,7 +68,7 @@ export class QueryClient { D extends object, E extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -85,7 +85,7 @@ export class QueryClient { E extends object, F extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -104,7 +104,7 @@ export class QueryClient { F extends object, G extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -125,7 +125,7 @@ export class QueryClient { G extends object, H extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -148,7 +148,7 @@ export class QueryClient { H extends object, I extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -173,7 +173,7 @@ export class QueryClient { I extends object, J extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -200,7 +200,7 @@ export class QueryClient { J extends object, K extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -229,7 +229,7 @@ export class QueryClient { K extends object, L extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -260,7 +260,7 @@ export class QueryClient { L extends object, M extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -293,7 +293,7 @@ export class QueryClient { M extends object, N extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -328,7 +328,7 @@ export class QueryClient { N extends object, O extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -365,7 +365,7 @@ export class QueryClient { O extends object, P extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -404,7 +404,7 @@ export class QueryClient { P extends object, Q extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -445,7 +445,7 @@ export class QueryClient { Q extends object, R extends object, >( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -467,7 +467,7 @@ export class QueryClient { ): QueryClient & A & B & C & D & E & F & G & H & I & J & K & L & M & N & O & P & Q & R; public static withExtensions( - tmClient: Tendermint34Client, + tmClient: Tendermint35Client, ...extensionSetups: Array> ): any { const client = new QueryClient(tmClient); @@ -489,9 +489,9 @@ export class QueryClient { return client; } - private readonly tmClient: Tendermint34Client; + private readonly tmClient: Tendermint35Client; - public constructor(tmClient: Tendermint34Client) { + public constructor(tmClient: Tendermint35Client) { this.tmClient = tmClient; } diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 9dec3293..54a72423 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -12,7 +12,7 @@ import { Registry, TxBodyEncodeObject, } from "@cosmjs/proto-signing"; -import { HttpEndpoint, Tendermint34Client } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint35Client } from "@cosmjs/tendermint-rpc"; import { assert, assertDefined } from "@cosmjs/utils"; import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; @@ -120,7 +120,7 @@ export class SigningStargateClient extends StargateClient { signer: OfflineSigner, options: SigningStargateClientOptions = {}, ): Promise { - const tmClient = await Tendermint34Client.connect(endpoint); + const tmClient = await Tendermint35Client.connect(endpoint); return new SigningStargateClient(tmClient, signer, options); } @@ -141,7 +141,7 @@ export class SigningStargateClient extends StargateClient { } protected constructor( - tmClient: Tendermint34Client | undefined, + tmClient: Tendermint35Client | undefined, signer: OfflineSigner, options: SigningStargateClientOptions, ) { diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index c9fda562..7c70e9cd 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -2,7 +2,7 @@ import { addCoins } from "@cosmjs/amino"; import { toHex } from "@cosmjs/encoding"; import { Uint53 } from "@cosmjs/math"; -import { HttpEndpoint, Tendermint34Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint35Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { MsgData } from "cosmjs-types/cosmos/base/abci/v1beta1/abci"; import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; @@ -136,7 +136,7 @@ export function assertIsDeliverTxFailure(result: DeliverTxResponse): void { /** Use for testing only */ export interface PrivateStargateClient { - readonly tmClient: Tendermint34Client | undefined; + readonly tmClient: Tendermint35Client | undefined; } export interface StargateClientOptions { @@ -144,7 +144,7 @@ export interface StargateClientOptions { } export class StargateClient { - private readonly tmClient: Tendermint34Client | undefined; + private readonly tmClient: Tendermint35Client | undefined; private readonly queryClient: | (QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension) | undefined; @@ -155,11 +155,11 @@ export class StargateClient { endpoint: string | HttpEndpoint, options: StargateClientOptions = {}, ): Promise { - const tmClient = await Tendermint34Client.connect(endpoint); + const tmClient = await Tendermint35Client.connect(endpoint); return new StargateClient(tmClient, options); } - protected constructor(tmClient: Tendermint34Client | undefined, options: StargateClientOptions) { + protected constructor(tmClient: Tendermint35Client | undefined, options: StargateClientOptions) { if (tmClient) { this.tmClient = tmClient; this.queryClient = QueryClient.withExtensions( @@ -174,11 +174,11 @@ export class StargateClient { this.accountParser = accountParser; } - protected getTmClient(): Tendermint34Client | undefined { + protected getTmClient(): Tendermint35Client | undefined { return this.tmClient; } - protected forceGetTmClient(): Tendermint34Client { + protected forceGetTmClient(): Tendermint35Client { if (!this.tmClient) { throw new Error( "Tendermint client not available. You cannot use online functionality in offline mode.", From 181c7af9277be32976dee638a978a819edde059c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 7 Jul 2022 16:04:47 +0200 Subject: [PATCH 08/16] Adapt gas values to Cosmos SDK 0.46 --- .../src/signingcosmwasmclient.spec.ts | 8 ++++---- .../stargate/src/signingstargateclient.spec.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts index 8f9884d0..9e66a9f5 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts @@ -688,7 +688,7 @@ describe("SigningCosmWasmClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const result = await client.signAndBroadcast(alice.address0, [msgAny], fee, memo); @@ -745,7 +745,7 @@ describe("SigningCosmWasmClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const result = await client.signAndBroadcast(alice.address0, [msgAny], fee, memo); @@ -1039,7 +1039,7 @@ describe("SigningCosmWasmClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const signed = await client.sign(alice.address0, [msgAny], fee, memo); @@ -1072,7 +1072,7 @@ describe("SigningCosmWasmClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const signed = await client.sign(alice.address0, [msgAny], fee, memo); diff --git a/packages/stargate/src/signingstargateclient.spec.ts b/packages/stargate/src/signingstargateclient.spec.ts index 08b33095..28f84249 100644 --- a/packages/stargate/src/signingstargateclient.spec.ts +++ b/packages/stargate/src/signingstargateclient.spec.ts @@ -155,7 +155,7 @@ describe("SigningStargateClient", () => { const memo = "Cross-chain fun"; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; // both timeouts set @@ -204,7 +204,7 @@ describe("SigningStargateClient", () => { const memo = "Cross-chain fun"; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; // both timeouts set @@ -265,14 +265,14 @@ describe("SigningStargateClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const result = await client.signAndBroadcast(faucet.address0, [msgAny], fee, memo); assertIsDeliverTxSuccess(result); expect(result.code).toEqual(0); - expect(result.gasWanted).toEqual(180_000); - expect(result.gasUsed).toBeLessThanOrEqual(180_000); + expect(result.gasWanted).toEqual(222_000); + expect(result.gasUsed).toBeLessThanOrEqual(222_000); expect(result.gasUsed).toBeGreaterThan(100_000); }); @@ -347,7 +347,7 @@ describe("SigningStargateClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const result = await client.signAndBroadcast(faucet.address0, [msgAny], fee, memo); @@ -599,7 +599,7 @@ describe("SigningStargateClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const signed = await client.sign(faucet.address0, [msgAny], fee, memo); @@ -629,7 +629,7 @@ describe("SigningStargateClient", () => { }; const fee = { amount: coins(2000, "ucosm"), - gas: "180000", // 180k + gas: "222000", // 222k }; const memo = "Use your power wisely"; const signed = await client.sign(faucet.address0, [msgAny], fee, memo); From 7e03295044e9b56d751cd4048a7f1cd8d5a5c104 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 2 Aug 2022 15:25:08 +0200 Subject: [PATCH 09/16] Bump simapp to v0.46.0 --- scripts/simapp46/env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/simapp46/env b/scripts/simapp46/env index 13293e4f..933f4799 100644 --- a/scripts/simapp46/env +++ b/scripts/simapp46/env @@ -1,5 +1,5 @@ # Choose from https://hub.docker.com/r/interchainio/simapp/tags REPOSITORY="interchainio/simapp" -VERSION="v0.46.0-rc1" +VERSION="v0.46.0" CONTAINER_NAME="simapp" CONTAINER_NAME_SLOW="simapp-slow" From a89e0e7fba885b8027982f39774557a491c0d8cf Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 2 Aug 2022 15:59:07 +0200 Subject: [PATCH 10/16] Remove template/.simapp/data/ ignores No data other than priv_validator_state.json is stored in those folders. For the template_slow we also don't have such an ignore rule. --- scripts/simapp42/.gitignore | 1 - scripts/simapp44/.gitignore | 1 - scripts/simapp46/.gitignore | 1 - .../simapp46/template/.simapp/data/priv_validator_state.json | 5 +++++ 4 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 scripts/simapp42/.gitignore delete mode 100644 scripts/simapp44/.gitignore delete mode 100644 scripts/simapp46/.gitignore create mode 100644 scripts/simapp46/template/.simapp/data/priv_validator_state.json diff --git a/scripts/simapp42/.gitignore b/scripts/simapp42/.gitignore deleted file mode 100644 index 920c4e6e..00000000 --- a/scripts/simapp42/.gitignore +++ /dev/null @@ -1 +0,0 @@ -template/.simapp/data/ diff --git a/scripts/simapp44/.gitignore b/scripts/simapp44/.gitignore deleted file mode 100644 index 920c4e6e..00000000 --- a/scripts/simapp44/.gitignore +++ /dev/null @@ -1 +0,0 @@ -template/.simapp/data/ diff --git a/scripts/simapp46/.gitignore b/scripts/simapp46/.gitignore deleted file mode 100644 index 920c4e6e..00000000 --- a/scripts/simapp46/.gitignore +++ /dev/null @@ -1 +0,0 @@ -template/.simapp/data/ diff --git a/scripts/simapp46/template/.simapp/data/priv_validator_state.json b/scripts/simapp46/template/.simapp/data/priv_validator_state.json new file mode 100644 index 00000000..4dfbafad --- /dev/null +++ b/scripts/simapp46/template/.simapp/data/priv_validator_state.json @@ -0,0 +1,5 @@ +{ + "height": "0", + "round": 0, + "step": 0 +} From 287de1df79437111a7d9cecb25f651812b146a31 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 2 Aug 2022 18:26:51 +0200 Subject: [PATCH 11/16] Revert "Switch to Tendermint 0.35 client" This reverts commit bedb7e76a6c8ea7e17979ae3fd88464e50295b2f. --- .../cosmwasm-stargate/src/cosmwasmclient.ts | 14 +++--- .../src/signingcosmwasmclient.ts | 6 +-- .../cosmwasm-stargate/src/testutils.spec.ts | 4 +- .../stargate/src/modules/auth/queries.spec.ts | 6 +-- .../src/modules/authz/queries.spec.ts | 6 +-- .../stargate/src/modules/bank/queries.spec.ts | 6 +-- .../src/modules/distribution/queries.spec.ts | 6 +-- .../stargate/src/modules/gov/queries.spec.ts | 6 +-- .../stargate/src/modules/ibc/queries.spec.ts | 6 +-- .../stargate/src/modules/mint/queries.spec.ts | 6 +-- .../src/modules/slashing/queries.spec.ts | 6 +-- .../src/modules/staking/queries.spec.ts | 6 +-- .../stargate/src/modules/tx/queries.spec.ts | 6 +-- .../src/queryclient/queryclient.spec.ts | 6 +-- .../stargate/src/queryclient/queryclient.ts | 46 +++++++++---------- .../stargate/src/signingstargateclient.ts | 6 +-- packages/stargate/src/stargateclient.ts | 14 +++--- 17 files changed, 78 insertions(+), 78 deletions(-) diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.ts index 4da721dc..d263a978 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.ts @@ -23,7 +23,7 @@ import { TimeoutError, TxExtension, } from "@cosmjs/stargate"; -import { HttpEndpoint, Tendermint35Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint34Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { CodeInfoResponse, @@ -75,14 +75,14 @@ export interface ContractCodeHistoryEntry { /** Use for testing only */ export interface PrivateCosmWasmClient { - readonly tmClient: Tendermint35Client | undefined; + readonly tmClient: Tendermint34Client | undefined; readonly queryClient: | (QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension) | undefined; } export class CosmWasmClient { - private readonly tmClient: Tendermint35Client | undefined; + private readonly tmClient: Tendermint34Client | undefined; private readonly queryClient: | (QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension) | undefined; @@ -90,11 +90,11 @@ export class CosmWasmClient { private chainId: string | undefined; public static async connect(endpoint: string | HttpEndpoint): Promise { - const tmClient = await Tendermint35Client.connect(endpoint); + const tmClient = await Tendermint34Client.connect(endpoint); return new CosmWasmClient(tmClient); } - protected constructor(tmClient: Tendermint35Client | undefined) { + protected constructor(tmClient: Tendermint34Client | undefined) { if (tmClient) { this.tmClient = tmClient; this.queryClient = QueryClient.withExtensions( @@ -107,11 +107,11 @@ export class CosmWasmClient { } } - protected getTmClient(): Tendermint35Client | undefined { + protected getTmClient(): Tendermint34Client | undefined { return this.tmClient; } - protected forceGetTmClient(): Tendermint35Client { + protected forceGetTmClient(): Tendermint34Client { if (!this.tmClient) { throw new Error( "Tendermint client not available. You cannot use online functionality in offline mode.", diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts index 205b5ca9..2065437c 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts @@ -30,7 +30,7 @@ import { SignerData, StdFee, } from "@cosmjs/stargate"; -import { HttpEndpoint, Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assert, assertDefined } from "@cosmjs/utils"; import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -182,7 +182,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { signer: OfflineSigner, options: SigningCosmWasmClientOptions = {}, ): Promise { - const tmClient = await Tendermint35Client.connect(endpoint); + const tmClient = await Tendermint34Client.connect(endpoint); return new SigningCosmWasmClient(tmClient, signer, options); } @@ -203,7 +203,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { } protected constructor( - tmClient: Tendermint35Client | undefined, + tmClient: Tendermint34Client | undefined, signer: OfflineSigner, options: SigningCosmWasmClientOptions, ) { diff --git a/packages/cosmwasm-stargate/src/testutils.spec.ts b/packages/cosmwasm-stargate/src/testutils.spec.ts index ceb760b0..c4166443 100644 --- a/packages/cosmwasm-stargate/src/testutils.spec.ts +++ b/packages/cosmwasm-stargate/src/testutils.spec.ts @@ -18,7 +18,7 @@ import { setupAuthExtension, setupBankExtension, } from "@cosmjs/stargate"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing"; import { AuthInfo, SignDoc, TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx"; @@ -169,7 +169,7 @@ export function fromOneElementArray(elements: ArrayLike): T { export async function makeWasmClient( endpoint: string, ): Promise { - const tmClient = await Tendermint35Client.connect(endpoint); + const tmClient = await Tendermint34Client.connect(endpoint); return QueryClient.withExtensions(tmClient, setupAuthExtension, setupBankExtension, setupWasmExtension); } diff --git a/packages/stargate/src/modules/auth/queries.spec.ts b/packages/stargate/src/modules/auth/queries.spec.ts index 2c2b0e59..6db9dd61 100644 --- a/packages/stargate/src/modules/auth/queries.spec.ts +++ b/packages/stargate/src/modules/auth/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { encodePubkey } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assert } from "@cosmjs/utils"; import { BaseAccount } from "cosmjs-types/cosmos/auth/v1beta1/auth"; import { Any } from "cosmjs-types/google/protobuf/any"; @@ -12,8 +12,8 @@ import { AuthExtension, setupAuthExtension } from "./queries"; async function makeClientWithAuth( rpcUrl: string, -): Promise<[QueryClient & AuthExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & AuthExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupAuthExtension), tmClient]; } diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index 00db8850..f79e2e59 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -1,6 +1,6 @@ import { makeCosmoshubPath } from "@cosmjs/amino"; import { coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { GenericAuthorization } from "cosmjs-types/cosmos/authz/v1beta1/authz"; @@ -19,8 +19,8 @@ import { AuthzExtension, setupAuthzExtension } from "./queries"; async function makeClientWithAuthz( rpcUrl: string, -): Promise<[QueryClient & AuthzExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & AuthzExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupAuthzExtension), tmClient]; } diff --git a/packages/stargate/src/modules/bank/queries.spec.ts b/packages/stargate/src/modules/bank/queries.spec.ts index 41199aa0..bfd4d1ad 100644 --- a/packages/stargate/src/modules/bank/queries.spec.ts +++ b/packages/stargate/src/modules/bank/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { @@ -12,8 +12,8 @@ import { BankExtension, setupBankExtension } from "./queries"; async function makeClientWithBank( rpcUrl: string, -): Promise<[QueryClient & BankExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & BankExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupBankExtension), tmClient]; } diff --git a/packages/stargate/src/modules/distribution/queries.spec.ts b/packages/stargate/src/modules/distribution/queries.spec.ts index d8ad6c41..a059d07a 100644 --- a/packages/stargate/src/modules/distribution/queries.spec.ts +++ b/packages/stargate/src/modules/distribution/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -20,8 +20,8 @@ import { DistributionExtension, setupDistributionExtension } from "./queries"; async function makeClientWithDistribution( rpcUrl: string, -): Promise<[QueryClient & DistributionExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & DistributionExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupDistributionExtension), tmClient]; } diff --git a/packages/stargate/src/modules/gov/queries.spec.ts b/packages/stargate/src/modules/gov/queries.spec.ts index c3259839..d502a6da 100644 --- a/packages/stargate/src/modules/gov/queries.spec.ts +++ b/packages/stargate/src/modules/gov/queries.spec.ts @@ -1,7 +1,7 @@ import { coin, coins, makeCosmoshubPath } from "@cosmjs/amino"; import { toAscii } from "@cosmjs/encoding"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { ProposalStatus, @@ -29,8 +29,8 @@ import { import { MsgDelegateEncodeObject, MsgSubmitProposalEncodeObject, MsgVoteEncodeObject } from "../"; import { GovExtension, setupGovExtension } from "./queries"; -async function makeClientWithGov(rpcUrl: string): Promise<[QueryClient & GovExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +async function makeClientWithGov(rpcUrl: string): Promise<[QueryClient & GovExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupGovExtension), tmClient]; } diff --git a/packages/stargate/src/modules/ibc/queries.spec.ts b/packages/stargate/src/modules/ibc/queries.spec.ts index 45be2fe5..7455fe19 100644 --- a/packages/stargate/src/modules/ibc/queries.spec.ts +++ b/packages/stargate/src/modules/ibc/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import Long from "long"; import { QueryClient } from "../../queryclient"; @@ -6,8 +6,8 @@ import { pendingWithoutSimapp42, simapp } from "../../testutils.spec"; import * as ibcTest from "./ibctestdata.spec"; import { IbcExtension, setupIbcExtension } from "./queries"; -async function makeClientWithIbc(rpcUrl: string): Promise<[QueryClient & IbcExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +async function makeClientWithIbc(rpcUrl: string): Promise<[QueryClient & IbcExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupIbcExtension), tmClient]; } diff --git a/packages/stargate/src/modules/mint/queries.spec.ts b/packages/stargate/src/modules/mint/queries.spec.ts index 4f822ef0..0e028876 100644 --- a/packages/stargate/src/modules/mint/queries.spec.ts +++ b/packages/stargate/src/modules/mint/queries.spec.ts @@ -1,4 +1,4 @@ -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; @@ -6,8 +6,8 @@ import { MintExtension, setupMintExtension } from "./queries"; async function makeClientWithMint( rpcUrl: string, -): Promise<[QueryClient & MintExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & MintExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupMintExtension), tmClient]; } diff --git a/packages/stargate/src/modules/slashing/queries.spec.ts b/packages/stargate/src/modules/slashing/queries.spec.ts index 8c0bd879..ab4b2ff9 100644 --- a/packages/stargate/src/modules/slashing/queries.spec.ts +++ b/packages/stargate/src/modules/slashing/queries.spec.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { QueryClient } from "../../queryclient"; import { pendingWithoutSimapp, simapp } from "../../testutils.spec"; @@ -7,8 +7,8 @@ import { setupSlashingExtension, SlashingExtension } from "./queries"; async function makeClientWithSlashing( rpcUrl: string, -): Promise<[QueryClient & SlashingExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & SlashingExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupSlashingExtension), tmClient]; } diff --git a/packages/stargate/src/modules/staking/queries.spec.ts b/packages/stargate/src/modules/staking/queries.spec.ts index 23776a78..b8ce620b 100644 --- a/packages/stargate/src/modules/staking/queries.spec.ts +++ b/packages/stargate/src/modules/staking/queries.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { coin, coins, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { sleep } from "@cosmjs/utils"; import { MsgDelegate, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; @@ -20,8 +20,8 @@ import { setupStakingExtension, StakingExtension } from "./queries"; async function makeClientWithStaking( rpcUrl: string, -): Promise<[QueryClient & StakingExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +): Promise<[QueryClient & StakingExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupStakingExtension), tmClient]; } diff --git a/packages/stargate/src/modules/tx/queries.spec.ts b/packages/stargate/src/modules/tx/queries.spec.ts index b526744a..ad16e077 100644 --- a/packages/stargate/src/modules/tx/queries.spec.ts +++ b/packages/stargate/src/modules/tx/queries.spec.ts @@ -1,5 +1,5 @@ import { coin, coins, DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assertDefined, sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; import Long from "long"; @@ -18,8 +18,8 @@ import { } from "../../testutils.spec"; import { setupTxExtension, TxExtension } from "./queries"; -async function makeClientWithTx(rpcUrl: string): Promise<[QueryClient & TxExtension, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +async function makeClientWithTx(rpcUrl: string): Promise<[QueryClient & TxExtension, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient, setupTxExtension), tmClient]; } diff --git a/packages/stargate/src/queryclient/queryclient.spec.ts b/packages/stargate/src/queryclient/queryclient.spec.ts index c36424e1..db3f830a 100644 --- a/packages/stargate/src/queryclient/queryclient.spec.ts +++ b/packages/stargate/src/queryclient/queryclient.spec.ts @@ -1,14 +1,14 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { toAscii } from "@cosmjs/encoding"; -import { Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { Metadata } from "cosmjs-types/cosmos/bank/v1beta1/bank"; import { QueryAllBalancesRequest, QueryAllBalancesResponse } from "cosmjs-types/cosmos/bank/v1beta1/query"; import { pendingWithoutSimapp, simapp, unused } from "../testutils.spec"; import { QueryClient } from "./queryclient"; -async function makeClient(rpcUrl: string): Promise<[QueryClient, Tendermint35Client]> { - const tmClient = await Tendermint35Client.connect(rpcUrl); +async function makeClient(rpcUrl: string): Promise<[QueryClient, Tendermint34Client]> { + const tmClient = await Tendermint34Client.connect(rpcUrl); return [QueryClient.withExtensions(tmClient), tmClient]; } diff --git a/packages/stargate/src/queryclient/queryclient.ts b/packages/stargate/src/queryclient/queryclient.ts index cc131479..5965cfa6 100644 --- a/packages/stargate/src/queryclient/queryclient.ts +++ b/packages/stargate/src/queryclient/queryclient.ts @@ -2,7 +2,7 @@ import { iavlSpec, ics23, tendermintSpec, verifyExistence, verifyNonExistence } from "@confio/ics23"; import { toAscii, toHex } from "@cosmjs/encoding"; import { firstEvent } from "@cosmjs/stream"; -import { tendermint34, Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { tendermint34, Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { arrayContentEquals, assert, assertDefined, isNonNullObject, sleep } from "@cosmjs/utils"; import { ProofOps } from "cosmjs-types/tendermint/crypto/proof"; import { Stream } from "xstream"; @@ -28,24 +28,24 @@ export interface ProvenQuery { export class QueryClient { /** Constructs a QueryClient with 0 extensions */ - public static withExtensions(tmClient: Tendermint35Client): QueryClient; + public static withExtensions(tmClient: Tendermint34Client): QueryClient; /** Constructs a QueryClient with 1 extension */ public static withExtensions( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, ): QueryClient & A; /** Constructs a QueryClient with 2 extensions */ public static withExtensions( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, ): QueryClient & A & B; /** Constructs a QueryClient with 3 extensions */ public static withExtensions( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -53,7 +53,7 @@ export class QueryClient { /** Constructs a QueryClient with 4 extensions */ public static withExtensions( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -68,7 +68,7 @@ export class QueryClient { D extends object, E extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -85,7 +85,7 @@ export class QueryClient { E extends object, F extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -104,7 +104,7 @@ export class QueryClient { F extends object, G extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -125,7 +125,7 @@ export class QueryClient { G extends object, H extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -148,7 +148,7 @@ export class QueryClient { H extends object, I extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -173,7 +173,7 @@ export class QueryClient { I extends object, J extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -200,7 +200,7 @@ export class QueryClient { J extends object, K extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -229,7 +229,7 @@ export class QueryClient { K extends object, L extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -260,7 +260,7 @@ export class QueryClient { L extends object, M extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -293,7 +293,7 @@ export class QueryClient { M extends object, N extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -328,7 +328,7 @@ export class QueryClient { N extends object, O extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -365,7 +365,7 @@ export class QueryClient { O extends object, P extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -404,7 +404,7 @@ export class QueryClient { P extends object, Q extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -445,7 +445,7 @@ export class QueryClient { Q extends object, R extends object, >( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, setupExtensionA: QueryExtensionSetup, setupExtensionB: QueryExtensionSetup, setupExtensionC: QueryExtensionSetup, @@ -467,7 +467,7 @@ export class QueryClient { ): QueryClient & A & B & C & D & E & F & G & H & I & J & K & L & M & N & O & P & Q & R; public static withExtensions( - tmClient: Tendermint35Client, + tmClient: Tendermint34Client, ...extensionSetups: Array> ): any { const client = new QueryClient(tmClient); @@ -489,9 +489,9 @@ export class QueryClient { return client; } - private readonly tmClient: Tendermint35Client; + private readonly tmClient: Tendermint34Client; - public constructor(tmClient: Tendermint35Client) { + public constructor(tmClient: Tendermint34Client) { this.tmClient = tmClient; } diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 54a72423..9dec3293 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -12,7 +12,7 @@ import { Registry, TxBodyEncodeObject, } from "@cosmjs/proto-signing"; -import { HttpEndpoint, Tendermint35Client } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { assert, assertDefined } from "@cosmjs/utils"; import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; @@ -120,7 +120,7 @@ export class SigningStargateClient extends StargateClient { signer: OfflineSigner, options: SigningStargateClientOptions = {}, ): Promise { - const tmClient = await Tendermint35Client.connect(endpoint); + const tmClient = await Tendermint34Client.connect(endpoint); return new SigningStargateClient(tmClient, signer, options); } @@ -141,7 +141,7 @@ export class SigningStargateClient extends StargateClient { } protected constructor( - tmClient: Tendermint35Client | undefined, + tmClient: Tendermint34Client | undefined, signer: OfflineSigner, options: SigningStargateClientOptions, ) { diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index 7c70e9cd..c9fda562 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -2,7 +2,7 @@ import { addCoins } from "@cosmjs/amino"; import { toHex } from "@cosmjs/encoding"; import { Uint53 } from "@cosmjs/math"; -import { HttpEndpoint, Tendermint35Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; +import { HttpEndpoint, Tendermint34Client, toRfc3339WithNanoseconds } from "@cosmjs/tendermint-rpc"; import { assert, sleep } from "@cosmjs/utils"; import { MsgData } from "cosmjs-types/cosmos/base/abci/v1beta1/abci"; import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; @@ -136,7 +136,7 @@ export function assertIsDeliverTxFailure(result: DeliverTxResponse): void { /** Use for testing only */ export interface PrivateStargateClient { - readonly tmClient: Tendermint35Client | undefined; + readonly tmClient: Tendermint34Client | undefined; } export interface StargateClientOptions { @@ -144,7 +144,7 @@ export interface StargateClientOptions { } export class StargateClient { - private readonly tmClient: Tendermint35Client | undefined; + private readonly tmClient: Tendermint34Client | undefined; private readonly queryClient: | (QueryClient & AuthExtension & BankExtension & StakingExtension & TxExtension) | undefined; @@ -155,11 +155,11 @@ export class StargateClient { endpoint: string | HttpEndpoint, options: StargateClientOptions = {}, ): Promise { - const tmClient = await Tendermint35Client.connect(endpoint); + const tmClient = await Tendermint34Client.connect(endpoint); return new StargateClient(tmClient, options); } - protected constructor(tmClient: Tendermint35Client | undefined, options: StargateClientOptions) { + protected constructor(tmClient: Tendermint34Client | undefined, options: StargateClientOptions) { if (tmClient) { this.tmClient = tmClient; this.queryClient = QueryClient.withExtensions( @@ -174,11 +174,11 @@ export class StargateClient { this.accountParser = accountParser; } - protected getTmClient(): Tendermint35Client | undefined { + protected getTmClient(): Tendermint34Client | undefined { return this.tmClient; } - protected forceGetTmClient(): Tendermint35Client { + protected forceGetTmClient(): Tendermint34Client { if (!this.tmClient) { throw new Error( "Tendermint client not available. You cannot use online functionality in offline mode.", From 780b61509e3650085e505a063cba6a5aa73f78bd Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 2 Aug 2022 18:51:33 +0200 Subject: [PATCH 12/16] Fix queryVerified tests --- .../src/queryclient/queryclient.spec.ts | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/packages/stargate/src/queryclient/queryclient.spec.ts b/packages/stargate/src/queryclient/queryclient.spec.ts index db3f830a..f915bde5 100644 --- a/packages/stargate/src/queryclient/queryclient.spec.ts +++ b/packages/stargate/src/queryclient/queryclient.spec.ts @@ -4,7 +4,7 @@ import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { Metadata } from "cosmjs-types/cosmos/bank/v1beta1/bank"; import { QueryAllBalancesRequest, QueryAllBalancesResponse } from "cosmjs-types/cosmos/bank/v1beta1/query"; -import { pendingWithoutSimapp, simapp, unused } from "../testutils.spec"; +import { pendingWithoutSimapp, simapp, simapp42Enabled, simapp44Enabled, unused } from "../testutils.spec"; import { QueryClient } from "./queryclient"; async function makeClient(rpcUrl: string): Promise<[QueryClient, Tendermint34Client]> { @@ -27,11 +27,16 @@ describe("QueryClient", () => { // "keys before 0.45 had denom two times in the key" // https://github.com/cosmos/cosmos-sdk/blob/10ad61a4dd/x/bank/migrations/v045/store_test.go#L91 - const key = Uint8Array.from([ - ...denomMetadataPrefix, - ...toAscii(simapp.denomFee), - ...toAscii(simapp.denomFee), - ]); + let key: Uint8Array; + if (simapp42Enabled() || simapp44Enabled()) { + key = Uint8Array.from([ + ...denomMetadataPrefix, + ...toAscii(simapp.denomFee), + ...toAscii(simapp.denomFee), + ]); + } else { + key = Uint8Array.from([...denomMetadataPrefix, ...toAscii(simapp.denomFee)]); + } const data = await client.queryVerified("bank", key); const response = Metadata.decode(data); @@ -47,11 +52,17 @@ describe("QueryClient", () => { // "keys before 0.45 had denom two times in the key" // https://github.com/cosmos/cosmos-sdk/blob/10ad61a4dd/x/bank/migrations/v045/store_test.go#L91 - const key = Uint8Array.from([ - ...denomMetadataPrefix, - ...toAscii(simapp.denomFee), - ...toAscii(simapp.denomFee), - ]); + let key: Uint8Array; + if (simapp42Enabled() || simapp44Enabled()) { + key = Uint8Array.from([ + ...denomMetadataPrefix, + ...toAscii(simapp.denomFee), + ...toAscii(simapp.denomFee), + ]); + } else { + key = Uint8Array.from([...denomMetadataPrefix, ...toAscii(simapp.denomFee)]); + } + const data = await client.queryVerified("bank", key); const response = Metadata.decode(data); From bc53005832e01aeb2efacb91fe3f218011d82dcf Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 3 Aug 2022 11:36:26 +0200 Subject: [PATCH 13/16] Adapt test to latest vote option behaviour --- packages/stargate/src/modules/gov/queries.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/stargate/src/modules/gov/queries.spec.ts b/packages/stargate/src/modules/gov/queries.spec.ts index d502a6da..dc61ee27 100644 --- a/packages/stargate/src/modules/gov/queries.spec.ts +++ b/packages/stargate/src/modules/gov/queries.spec.ts @@ -23,6 +23,7 @@ import { pendingWithoutSimapp, simapp, simapp42Enabled, + simapp44Enabled, simappEnabled, validator, } from "../../testutils.spec"; @@ -348,7 +349,9 @@ describe("GovExtension", () => { Vote.fromPartial({ proposalId: longify(proposalId), voter: voter2Address, - option: VoteOption.VOTE_OPTION_NO_WITH_VETO, + option: simapp44Enabled() + ? VoteOption.VOTE_OPTION_NO_WITH_VETO + : VoteOption.VOTE_OPTION_UNSPECIFIED, options: [ WeightedVoteOption.fromPartial({ option: VoteOption.VOTE_OPTION_NO_WITH_VETO, @@ -359,7 +362,7 @@ describe("GovExtension", () => { Vote.fromPartial({ proposalId: longify(proposalId), voter: voter1Address, - option: VoteOption.VOTE_OPTION_YES, + option: simapp44Enabled() ? VoteOption.VOTE_OPTION_YES : VoteOption.VOTE_OPTION_UNSPECIFIED, options: [ WeightedVoteOption.fromPartial({ option: VoteOption.VOTE_OPTION_YES, From 2f3033b5cb7d09394b9f5a195b043574c0c5aafb Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 3 Aug 2022 11:41:00 +0200 Subject: [PATCH 14/16] Use confio/simapp:v0.46.0-archfix --- scripts/simapp46/env | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/simapp46/env b/scripts/simapp46/env index 933f4799..20d83da8 100644 --- a/scripts/simapp46/env +++ b/scripts/simapp46/env @@ -1,5 +1,9 @@ +# Temporary workaround due to https://github.com/cosmos/cosmos-sdk/issues/12798 +REPOSITORY="confio/simapp" +VERSION="v0.46.0-archfix" + # Choose from https://hub.docker.com/r/interchainio/simapp/tags -REPOSITORY="interchainio/simapp" -VERSION="v0.46.0" +# REPOSITORY="interchainio/simapp" +# VERSION="v0.46.0" CONTAINER_NAME="simapp" CONTAINER_NAME_SLOW="simapp-slow" From cad43527759225d04e5d8758dfaffd7fe2eb7a12 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 3 Aug 2022 15:35:28 +0200 Subject: [PATCH 15/16] Fix some more tests for 0.46 --- .../src/signingcosmwasmclient.spec.ts | 2 +- packages/ledger-amino/src/ledgersigner.spec.ts | 2 +- packages/stargate/src/modules/authz/queries.spec.ts | 3 ++- packages/stargate/src/modules/gov/queries.spec.ts | 2 +- packages/stargate/src/modules/tx/queries.spec.ts | 11 ++++++++--- packages/stargate/src/signingstargateclient.spec.ts | 2 +- packages/stargate/src/stargateclient.spec.ts | 8 +++++++- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts index 9e66a9f5..fe71f68e 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts @@ -92,7 +92,7 @@ describe("SigningCosmWasmClient", () => { const memo = "Go go go"; const gasUsed = await client.simulate(alice.address0, [executeContractMsg], memo); expect(gasUsed).toBeGreaterThanOrEqual(101_000); - expect(gasUsed).toBeLessThanOrEqual(150_000); + expect(gasUsed).toBeLessThanOrEqual(200_000); client.disconnect(); }); }); diff --git a/packages/ledger-amino/src/ledgersigner.spec.ts b/packages/ledger-amino/src/ledgersigner.spec.ts index d9bf56a8..65c1c2ed 100644 --- a/packages/ledger-amino/src/ledgersigner.spec.ts +++ b/packages/ledger-amino/src/ledgersigner.spec.ts @@ -47,7 +47,7 @@ async function createTransport(): Promise { describe("LedgerSigner", () => { const defaultChainId = "testing"; - const defaultFee = calculateFee(80_000, "0.025ucosm"); + const defaultFee = calculateFee(100_000, "0.025ucosm"); const defaultMemo = "Some memo"; const defaultSequence = "0"; const defaultAccountNumber = "42"; diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index f79e2e59..db516ef1 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -14,6 +14,7 @@ import { pendingWithoutSimapp44Or46, simapp, simapp44Enabled, + simapp46Enabled, } from "../../testutils.spec"; import { AuthzExtension, setupAuthzExtension } from "./queries"; @@ -35,7 +36,7 @@ describe("AuthzExtension", () => { const grantedMsg = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; beforeAll(async () => { - if (simapp44Enabled()) { + if (simapp44Enabled() || simapp46Enabled()) { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic, { // Use address 1 and 2 instead of 0 to avoid conflicts with other delegation tests // This must match `voterAddress` above. diff --git a/packages/stargate/src/modules/gov/queries.spec.ts b/packages/stargate/src/modules/gov/queries.spec.ts index dc61ee27..93ff788b 100644 --- a/packages/stargate/src/modules/gov/queries.spec.ts +++ b/packages/stargate/src/modules/gov/queries.spec.ts @@ -397,7 +397,7 @@ describe("GovExtension", () => { Vote.fromPartial({ voter: voter1Address, proposalId: longify(proposalId), - option: VoteOption.VOTE_OPTION_YES, + option: simapp44Enabled() ? VoteOption.VOTE_OPTION_YES : VoteOption.VOTE_OPTION_UNSPECIFIED, options: [ WeightedVoteOption.fromPartial({ option: VoteOption.VOTE_OPTION_YES, diff --git a/packages/stargate/src/modules/tx/queries.spec.ts b/packages/stargate/src/modules/tx/queries.spec.ts index ad16e077..a14a5c74 100644 --- a/packages/stargate/src/modules/tx/queries.spec.ts +++ b/packages/stargate/src/modules/tx/queries.spec.ts @@ -4,7 +4,7 @@ import { assertDefined, sleep } from "@cosmjs/utils"; import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx"; import Long from "long"; -import { longify, QueryClient } from "../../queryclient"; +import { QueryClient } from "../../queryclient"; import { defaultRegistryTypes, SigningStargateClient } from "../../signingstargateclient"; import { assertIsDeliverTxSuccess, StargateClient } from "../../stargateclient"; import { @@ -13,6 +13,8 @@ import { makeRandomAddress, pendingWithoutSimapp, simapp, + simapp42Enabled, + simapp44Enabled, simappEnabled, validator, } from "../../testutils.spec"; @@ -94,8 +96,11 @@ describe("TxExtension", () => { const { sequence } = await sequenceClient.getSequence(faucet.address0); const response = await client.tx.simulate([msgAny], "foo", faucet.pubkey0, sequence); expect(response.gasInfo?.gasUsed.toNumber()).toBeGreaterThanOrEqual(101_000); - expect(response.gasInfo?.gasUsed.toNumber()).toBeLessThanOrEqual(150_000); - expect(response.gasInfo?.gasWanted).toEqual(longify(Long.UZERO)); + expect(response.gasInfo?.gasUsed.toNumber()).toBeLessThanOrEqual(200_000); + expect(response.gasInfo?.gasWanted).toEqual( + // Some dummy value. Value does not matter for regular users. + simapp42Enabled() || simapp44Enabled() ? Long.UZERO : Long.MAX_UNSIGNED_VALUE, + ); tmClient.disconnect(); }); diff --git a/packages/stargate/src/signingstargateclient.spec.ts b/packages/stargate/src/signingstargateclient.spec.ts index 28f84249..352bf6b6 100644 --- a/packages/stargate/src/signingstargateclient.spec.ts +++ b/packages/stargate/src/signingstargateclient.spec.ts @@ -63,7 +63,7 @@ describe("SigningStargateClient", () => { const memo = "Use your power wisely"; const gasUsed = await client.simulate(faucet.address0, [msgAny], memo); expect(gasUsed).toBeGreaterThanOrEqual(101_000); - expect(gasUsed).toBeLessThanOrEqual(150_000); + expect(gasUsed).toBeLessThanOrEqual(200_000); client.disconnect(); }); diff --git a/packages/stargate/src/stargateclient.spec.ts b/packages/stargate/src/stargateclient.spec.ts index 1d50a57d..c0306d21 100644 --- a/packages/stargate/src/stargateclient.spec.ts +++ b/packages/stargate/src/stargateclient.spec.ts @@ -28,6 +28,8 @@ import { pendingWithoutSimapp, pendingWithoutSlowSimapp, simapp, + simapp42Enabled, + simapp44Enabled, slowSimapp, tendermintIdMatcher, unused, @@ -431,7 +433,11 @@ describe("StargateClient", () => { }); const txRawBytes = Uint8Array.from(TxRaw.encode(txRaw).finish()); - await expectAsync(client.broadcastTx(txRawBytes)).toBeRejectedWithError(/invalid recipient address/i); + await expectAsync(client.broadcastTx(txRawBytes)).toBeRejectedWithError( + simapp42Enabled() || simapp44Enabled() + ? /invalid recipient address/i + : /Broadcasting transaction failed with code 7/i, + ); client.disconnect(); }); From d987f4d0776b532f01394230dbda82805794d3ad Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 3 Aug 2022 16:29:59 +0200 Subject: [PATCH 16/16] Update simapp/simapp_slow templates --- scripts/simapp42/generate_template_slow.sh | 2 +- scripts/simapp44/generate_template_slow.sh | 2 +- scripts/simapp46/generate_template.sh | 16 +- scripts/simapp46/generate_template_slow.sh | 2 +- .../template/.simapp/config/client.toml | 17 + .../template/.simapp/config/config.toml | 324 +++++++---------- .../template/.simapp/config/genesis.json | 33 +- .../.simapp/data/priv_validator_state.json | 2 +- .../template_slow/.simapp/config/app.toml | 88 ++++- .../template_slow/.simapp/config/client.toml | 17 + .../template_slow/.simapp/config/config.toml | 64 +++- .../template_slow/.simapp/config/genesis.json | 329 +++--------------- 12 files changed, 382 insertions(+), 514 deletions(-) create mode 100644 scripts/simapp46/template/.simapp/config/client.toml create mode 100644 scripts/simapp46/template_slow/.simapp/config/client.toml diff --git a/scripts/simapp42/generate_template_slow.sh b/scripts/simapp42/generate_template_slow.sh index 992e6382..38eb7ed4 100755 --- a/scripts/simapp42/generate_template_slow.sh +++ b/scripts/simapp42/generate_template_slow.sh @@ -6,7 +6,7 @@ gnused="$(command -v gsed || echo sed)" SCRIPT_DIR="$(realpath "$(dirname "$0")")" -# Create template for slow simapp +# Create template for slow simapp based on the regular simapp template ( cd "$SCRIPT_DIR" rm -rf template_slow diff --git a/scripts/simapp44/generate_template_slow.sh b/scripts/simapp44/generate_template_slow.sh index 992e6382..38eb7ed4 100755 --- a/scripts/simapp44/generate_template_slow.sh +++ b/scripts/simapp44/generate_template_slow.sh @@ -6,7 +6,7 @@ gnused="$(command -v gsed || echo sed)" SCRIPT_DIR="$(realpath "$(dirname "$0")")" -# Create template for slow simapp +# Create template for slow simapp based on the regular simapp template ( cd "$SCRIPT_DIR" rm -rf template_slow diff --git a/scripts/simapp46/generate_template.sh b/scripts/simapp46/generate_template.sh index b5151f57..faa6908c 100755 --- a/scripts/simapp46/generate_template.sh +++ b/scripts/simapp46/generate_template.sh @@ -55,14 +55,14 @@ function inline_jq() { # Custom settings in config.toml "$gnused" -i \ - -e 's/^cors-allowed-origins =.*$/cors-allowed-origins = ["*"]/' \ - -e 's/^timeout-propose =.*$/timeout-propose = "300ms"/' \ - -e 's/^timeout-propose-delta =.*$/timeout-propose-delta = "100ms"/' \ - -e 's/^timeout-prevote =.*$/timeout-prevote = "300ms"/' \ - -e 's/^timeout-prevote-delta =.*$/timeout-prevote-delta = "100ms"/' \ - -e 's/^timeout-precommit =.*$/timeout-precommit = "300ms"/' \ - -e 's/^timeout-precommit-delta =.*$/timeout-precommit-delta = "100ms"/' \ - -e 's/^timeout-commit =.*$/timeout-commit = "1s"/' \ + -e 's/^cors_allowed_origins =.*$/cors_allowed_origins = ["*"]/' \ + -e 's/^timeout_propose =.*$/timeout_propose = "300ms"/' \ + -e 's/^timeout_propose_delta =.*$/timeout_propose_delta = "100ms"/' \ + -e 's/^timeout_prevote =.*$/timeout_prevote = "300ms"/' \ + -e 's/^timeout_prevote_delta =.*$/timeout_prevote_delta = "100ms"/' \ + -e 's/^timeout_precommit =.*$/timeout_precommit = "300ms"/' \ + -e 's/^timeout_precommit_delta =.*$/timeout_precommit_delta = "100ms"/' \ + -e 's/^timeout_commit =.*$/timeout_commit = "1s"/' \ "template/.simapp/config/config.toml" # Custom settings app.toml diff --git a/scripts/simapp46/generate_template_slow.sh b/scripts/simapp46/generate_template_slow.sh index 992e6382..38eb7ed4 100755 --- a/scripts/simapp46/generate_template_slow.sh +++ b/scripts/simapp46/generate_template_slow.sh @@ -6,7 +6,7 @@ gnused="$(command -v gsed || echo sed)" SCRIPT_DIR="$(realpath "$(dirname "$0")")" -# Create template for slow simapp +# Create template for slow simapp based on the regular simapp template ( cd "$SCRIPT_DIR" rm -rf template_slow diff --git a/scripts/simapp46/template/.simapp/config/client.toml b/scripts/simapp46/template/.simapp/config/client.toml new file mode 100644 index 00000000..8a7bad12 --- /dev/null +++ b/scripts/simapp46/template/.simapp/config/client.toml @@ -0,0 +1,17 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Client Configuration ### +############################################################################### + +# The network chain ID +chain-id = "simd-testing" +# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) +keyring-backend = "os" +# CLI output format (text|json) +output = "text" +# : to Tendermint RPC interface for this chain +node = "tcp://localhost:26657" +# Transaction broadcasting mode (sync|async|block) +broadcast-mode = "sync" diff --git a/scripts/simapp46/template/.simapp/config/config.toml b/scripts/simapp46/template/.simapp/config/config.toml index 3d93aee7..1907cf40 100644 --- a/scripts/simapp46/template/.simapp/config/config.toml +++ b/scripts/simapp46/template/.simapp/config/config.toml @@ -12,22 +12,15 @@ # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the Tendermint binary -proxy-app = "tcp://127.0.0.1:26658" +proxy_app = "tcp://127.0.0.1:26658" # A custom human readable name for this node moniker = "simd-moniker" -# Mode of Node: full | validator | seed -# * validator node -# - all reactors -# - with priv_validator_key.json, priv_validator_state.json -# * full node -# - all reactors -# - No priv_validator_key.json, priv_validator_state.json -# * seed node -# - only P2P, PEX Reactor -# - No priv_validator_key.json, priv_validator_state.json -mode = "validator" +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) @@ -48,58 +41,41 @@ mode = "validator" # * badgerdb (uses github.com/dgraph-io/badger) # - EXPERIMENTAL # - use badgerdb build tag (go build -tags badgerdb) -db-backend = "goleveldb" +db_backend = "goleveldb" # Database directory -db-dir = "data" +db_dir = "data" # Output level for logging, including package level options -log-level = "info" +log_level = "info" # Output format: 'plain' (colored text) or 'json' -log-format = "plain" +log_format = "plain" ##### additional base config options ##### # Path to the JSON file containing the initial validator set and other meta data -genesis-file = "config/genesis.json" +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" # Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node-key-file = "config/node_key.json" +node_key_file = "config/node_key.json" # Mechanism to connect to the ABCI application: socket | grpc abci = "socket" # If true, query the ABCI app on connecting to a new peer # so the app can decide if we should keep the connection or not -filter-peers = false - - -####################################################### -### Priv Validator Configuration ### -####################################################### -[priv-validator] - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -key-file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -state-file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -# when the listenAddr is prefixed with grpc instead of tcp it will use the gRPC Client -laddr = "" - -# Path to the client certificate generated while creating needed files for secure connection. -# If a remote validator address is provided but no certificate, the connection will be insecure -client-certificate-file = "" - -# Client key generated while creating certificates for secure connection -client-key-file = "" - -# Path to the Root Certificate Authority used to sign both client and server certificates -root-ca-file = "" +filter_peers = false ####################################################################### @@ -117,56 +93,54 @@ laddr = "tcp://127.0.0.1:26657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support # Use '["*"]' to allow any origin -cors-allowed-origins = ["*"] +cors_allowed_origins = ["*"] # A list of methods the client is allowed to use with cross-domain requests -cors-allowed-methods = ["HEAD", "GET", "POST", ] +cors_allowed_methods = ["HEAD", "GET", "POST", ] # A list of non simple headers the client is allowed to use with cross-domain requests -cors-allowed-headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit -# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. -grpc-laddr = "" +grpc_laddr = "" # Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max-open-connections +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 -# Deprecated gRPC in the RPC layer of Tendermint will be deprecated in 0.36. -grpc-max-open-connections = 900 +grpc_max_open_connections = 900 -# Activate unsafe RPC commands like /dial-seeds and /unsafe-flush-mempool +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool unsafe = false # Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc-max-open-connections +# Does not include gRPC connections. See grpc_max_open_connections # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} # 1024 - 40 - 10 - 50 = 924 = ~900 -max-open-connections = 900 +max_open_connections = 900 # Maximum number of unique clientIDs that can /subscribe # If you're using /broadcast_tx_commit, set to the estimated maximum number # of broadcast_tx_commit calls per block. -max-subscription-clients = 100 +max_subscription_clients = 100 # Maximum number of unique queries a given client can /subscribe to # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to # the estimated # maximum number of broadcast_tx_commit calls per block. -max-subscriptions-per-client = 5 +max_subscriptions_per_client = 5 # Experimental parameter to specify the maximum number of events a node will # buffer, per subscription, before returning an error and closing the # subscription. Must be set to at least 100, but higher values will accommodate # higher event throughput rates (and will use more memory). -experimental-subscription-buffer-size = 200 +experimental_subscription_buffer_size = 200 # Experimental parameter to specify the maximum number of RPC responses that # can be buffered per WebSocket client. If clients cannot read from the @@ -174,11 +148,11 @@ experimental-subscription-buffer-size = 200 # parameter may reduce the chances of them being disconnected (but will cause # the node to use more memory). # -# Must be at least the same as "experimental-subscription-buffer-size", +# Must be at least the same as "experimental_subscription_buffer_size", # otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental-subscription-buffer-size" to +# ideally be somewhat higher than "experimental_subscription_buffer_size" to # accommodate non-subscription-related RPC responses. -experimental-websocket-write-buffer-size = 200 +experimental_websocket_write_buffer_size = 200 # If a WebSocket client cannot read fast enough, at present we may # silently drop events instead of generating an error or disconnecting the @@ -186,50 +160,44 @@ experimental-websocket-write-buffer-size = 200 # # Enabling this experimental parameter will cause the WebSocket connection to # be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behavior. -experimental-close-on-slow-client = false +# predictability in subscription behaviour. +experimental_close_on_slow_client = false # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. # See https://github.com/tendermint/tendermint/issues/3435 -timeout-broadcast-tx-commit = "10s" +timeout_broadcast_tx_commit = "10s" # Maximum size of request body, in bytes -max-body-bytes = 1000000 +max_body_bytes = 1000000 # Maximum size of request header, in bytes -max-header-bytes = 1048576 +max_header_bytes = 1048576 # The path to a file containing certificate that is used to create the HTTPS server. # Might be either absolute path or path related to Tendermint's config directory. # If the certificate is signed by a certificate authority, # the certFile should be the concatenation of the server's certificate, any intermediates, # and the CA's certificate. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. # Otherwise, HTTP server is run. -tls-cert-file = "" +tls_cert_file = "" # The path to a file containing matching private key that is used to create the HTTPS server. # Might be either absolute path or path related to Tendermint's config directory. # NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. # Otherwise, HTTP server is run. -tls-key-file = "" +tls_key_file = "" # pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof-laddr = "localhost:6060" +pprof_laddr = "localhost:6060" ####################################################### ### P2P Configuration Options ### ####################################################### [p2p] -# Enable the legacy p2p layer. -use-legacy = false - -# Select the p2p internal queue -queue-type = "priority" - # Address to listen for incoming connections laddr = "tcp://0.0.0.0:26656" @@ -238,95 +206,66 @@ laddr = "tcp://0.0.0.0:26656" # and will introspect on the listener or use UPnP # to figure out the address. ip and port are required # example: 159.89.10.97:26656 -external-address = "" +external_address = "" # Comma separated list of seed nodes to connect to -# We only use these if we can’t connect to peers in the addrbook -# NOTE: not used by the new PEX reactor. Please use BootstrapPeers instead. -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 seeds = "" -# Comma separated list of peers to be added to the peer store -# on startup. Either BootstrapPeers or PersistentPeers are -# needed for peer discovery -bootstrap-peers = "" - # Comma separated list of nodes to keep persistent connections to -persistent-peers = "" +persistent_peers = "" # UPNP port forwarding upnp = false # Path to address book -# TODO: Remove once p2p refactor is complete in favor of peer store. -addr-book-file = "config/addrbook.json" +addr_book_file = "config/addrbook.json" # Set true for strict address routability rules # Set false for private or local networks -addr-book-strict = true +addr_book_strict = true # Maximum number of inbound peers -# -# TODO: Remove once p2p refactor is complete in favor of MaxConnections. -# ref: https://github.com/tendermint/tendermint/issues/5670 -max-num-inbound-peers = 40 +max_num_inbound_peers = 40 # Maximum number of outbound peers to connect to, excluding persistent peers -# -# TODO: Remove once p2p refactor is complete in favor of MaxConnections. -# ref: https://github.com/tendermint/tendermint/issues/5670 -max-num-outbound-peers = 10 - -# Maximum number of connections (inbound and outbound). -max-connections = 64 - -# Rate limits the number of incoming connection attempts per IP address. -max-incoming-connection-attempts = 100 +max_num_outbound_peers = 10 # List of node IDs, to which a connection will be (re)established ignoring any existing limits -# TODO: Remove once p2p refactor is complete. -# ref: https://github.com/tendermint/tendermint/issues/5670 -unconditional-peer-ids = "" +unconditional_peer_ids = "" # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -persistent-peers-max-dial-period = "0s" +persistent_peers_max_dial_period = "0s" # Time to wait before flushing messages out on the connection -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -flush-throttle-timeout = "100ms" +flush_throttle_timeout = "100ms" # Maximum size of a message packet payload, in bytes -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -max-packet-msg-payload-size = 1400 +max_packet_msg_payload_size = 1024 # Rate at which packets can be sent, in bytes/second -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -send-rate = 5120000 +send_rate = 5120000 # Rate at which packets can be received, in bytes/second -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -recv-rate = 5120000 +recv_rate = 5120000 # Set true to enable the peer-exchange reactor pex = true +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -# Warning: IPs will be exposed at /net_info, for more information https://github.com/tendermint/tendermint/issues/3055 -private-peer-ids = "" +private_peer_ids = "" # Toggle to disable guard against peers connecting from the same ip. -allow-duplicate-ip = false +allow_duplicate_ip = false # Peer connection configuration. -handshake-timeout = "20s" -dial-timeout = "3s" +handshake_timeout = "20s" +dial_timeout = "3s" ####################################################### ### Mempool Configuration Option ### @@ -334,23 +273,24 @@ dial-timeout = "3s" [mempool] # Mempool version to use: -# 1) "v0" - The legacy non-prioritized mempool reactor. -# 2) "v1" (default) - The prioritized mempool reactor. -version = "v1" +# 1) "v0" - (default) FIFO mempool. +# 2) "v1" - prioritized mempool. +version = "v0" recheck = true broadcast = true +wal_dir = "" # Maximum number of transactions in the mempool size = 5000 # Limit the total size of all txs in the mempool. # This only accounts for raw transactions (e.g. given 1MB transactions and -# max-txs-bytes=5MB, mempool will only accept 5 transactions). -max-txs-bytes = 1073741824 +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 # Size of the cache (used to filter transactions we saw earlier) in transactions -cache-size = 10000 +cache_size = 10000 # Do not remove invalid transactions from the cache (default: false) # Set to true if it's not possible for any invalid transaction to become valid @@ -358,13 +298,13 @@ cache-size = 10000 keep-invalid-txs-in-cache = false # Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max-tx-bytes}. -max-tx-bytes = 1048576 +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. +max_tx_bytes = 1048576 # Maximum size of a batch of transactions to send to a peer # Including space needed by encoding (one varint per transaction). # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max-batch-bytes = 0 +max_batch_bytes = 0 # ttl-duration, if non-zero, defines the maximum amount of time a transaction # can exist for in the mempool. @@ -393,52 +333,40 @@ ttl-num-blocks = 0 # starting from the height of the snapshot. enable = false -# State sync uses light client verification to verify state. This can be done either through the -# P2P layer or RPC layer. Set this to true to use the P2P layer. If false (default), RPC layer -# will be used. -use-p2p = false - -# If using RPC, at least two addresses need to be provided. They should be compatible with net.Dial, -# for example: "host.example.com:2125" -rpc-servers = "" - -# The hash and height of a trusted block. Must be within the trust-period. -trust-height = 0 -trust-hash = "" - -# The trust period should be set so that Tendermint can detect and gossip misbehavior before -# it is considered expired. For chains based on the Cosmos SDK, one day less than the unbonding -# period should suffice. -trust-period = "168h0m0s" +# RPC servers (comma-separated) for light client verification of the synced state machine and +# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding +# header hash obtained from a trusted source, and a period during which validators can be trusted. +# +# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 +# weeks) during which they can be financially punished (slashed) for misbehavior. +rpc_servers = "" +trust_height = 0 +trust_hash = "" +trust_period = "168h0m0s" # Time to spend discovering snapshots before initiating a restore. -discovery-time = "15s" +discovery_time = "15s" -# Temporary directory for state sync snapshot chunks, defaults to os.TempDir(). -# The synchronizer will create a new, randomly named directory within this directory -# and remove it when the sync is complete. -temp-dir = "" +# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). +# Will create a new, randomly named directory within, and remove it when done. +temp_dir = "" # The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 15 seconds). -chunk-request-timeout = "15s" +# peer (default: 1 minute). +chunk_request_timeout = "10s" -# The number of concurrent chunk and block fetchers to run (default: 4). -fetchers = "4" +# The number of concurrent chunk fetchers to run (default: 1). +chunk_fetchers = "4" ####################################################### -### Block Sync Configuration Connections ### +### Fast Sync Configuration Connections ### ####################################################### -[blocksync] +[fastsync] -# If this node is many blocks behind the tip of the chain, BlockSync -# allows them to catchup quickly by downloading blocks in parallel -# and verifying their commits -enable = true - -# Block Sync version to use: -# 1) "v0" (default) - the standard Block Sync implementation -# 2) "v2" - DEPRECATED, please use v0 +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +# 2) "v2" - complete redesign of v0, optimized for testability & readability version = "v0" ####################################################### @@ -446,49 +374,48 @@ version = "v0" ####################################################### [consensus] -wal-file = "data/cs.wal/wal" +wal_file = "data/cs.wal/wal" # How long we wait for a proposal block before prevoting nil -timeout-propose = "300ms" -# How much timeout-propose increases with each round -timeout-propose-delta = "100ms" +timeout_propose = "300ms" +# How much timeout_propose increases with each round +timeout_propose_delta = "100ms" # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout-prevote = "300ms" -# How much the timeout-prevote increases with each round -timeout-prevote-delta = "100ms" +timeout_prevote = "300ms" +# How much the timeout_prevote increases with each round +timeout_prevote_delta = "100ms" # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout-precommit = "300ms" -# How much the timeout-precommit increases with each round -timeout-precommit-delta = "100ms" +timeout_precommit = "300ms" +# How much the timeout_precommit increases with each round +timeout_precommit_delta = "100ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). -timeout-commit = "1s" +timeout_commit = "1s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double-sign-check-height} last blocks. +# if the same consensus key was used to sign {double_sign_check_height} last blocks. # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double-sign-check-height = 0 +double_sign_check_height = 0 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip-timeout-commit = false +skip_timeout_commit = false # EmptyBlocks mode and possible interval between empty blocks -create-empty-blocks = true -create-empty-blocks-interval = "0s" +create_empty_blocks = true +create_empty_blocks_interval = "0s" # Reactor sleep duration parameters -peer-gossip-sleep-duration = "100ms" -peer-query-maj23-sleep-duration = "2s" +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" ####################################################### ### Transaction Indexer Configuration Options ### ####################################################### -[tx-index] +[tx_index] -# The backend database list to back the indexer. -# If list contains "null" or "", meaning no indexer service will be used. +# What indexer to use for transactions # # The application will set which txs to index. In some cases a node operator will be able # to decide which txs to index based on configuration set in the application. @@ -496,9 +423,10 @@ peer-query-maj23-sleep-duration = "2s" # Options: # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = ["kv"] +indexer = "kv" # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? @@ -515,13 +443,13 @@ psql-conn = "" prometheus = false # Address to listen for Prometheus collector(s) connections -prometheus-listen-addr = ":26660" +prometheus_listen_addr = ":26660" # Maximum number of simultaneous connections. # If you want to accept a larger number than the default, make sure # you increase your OS limits. # 0 - unlimited. -max-open-connections = 3 +max_open_connections = 3 # Instrumentation namespace namespace = "tendermint" diff --git a/scripts/simapp46/template/.simapp/config/genesis.json b/scripts/simapp46/template/.simapp/config/genesis.json index 8ed04fdb..5a1d3cf5 100644 --- a/scripts/simapp46/template/.simapp/config/genesis.json +++ b/scripts/simapp46/template/.simapp/config/genesis.json @@ -159,6 +159,9 @@ "tx_size_cost_per_byte": "10" } }, + "authz": { + "authorization": [] + }, "bank": { "balances": [ { @@ -501,6 +504,9 @@ "evidence": { "evidence": [] }, + "feegrant": { + "allowances": [] + }, "genutil": { "gen_txs": [ { @@ -524,7 +530,8 @@ }, "sequence": "0" } - ] + ], + "tip": null }, "body": { "extension_options": [], @@ -589,6 +596,16 @@ "voting_period": "172800s" } }, + "group": { + "group_members": [], + "group_policies": [], + "group_policy_seq": "0", + "group_seq": "0", + "groups": [], + "proposal_seq": "0", + "proposals": [], + "votes": [] + }, "mint": { "minter": { "annual_provisions": "0.000000000000000000", @@ -603,6 +620,10 @@ "mint_denom": "ustake" } }, + "nft": { + "classes": [], + "entries": [] + }, "params": null, "slashing": { "missed_blocks": [], @@ -632,14 +653,6 @@ "unbonding_delegations": [], "validators": [] }, - "transfer": { - "denom_traces": [], - "params": { - "receive_enabled": true, - "send_enabled": true - }, - "port_id": "transfer" - }, "upgrade": {}, "vesting": {} }, @@ -662,6 +675,6 @@ }, "version": {} }, - "genesis_time": "2021-07-27T15:14:14.2361126Z", + "genesis_time": "2022-08-03T15:03:38.08791355Z", "initial_height": "1" } diff --git a/scripts/simapp46/template/.simapp/data/priv_validator_state.json b/scripts/simapp46/template/.simapp/data/priv_validator_state.json index 4dfbafad..48f3b67e 100644 --- a/scripts/simapp46/template/.simapp/data/priv_validator_state.json +++ b/scripts/simapp46/template/.simapp/data/priv_validator_state.json @@ -2,4 +2,4 @@ "height": "0", "round": 0, "step": 0 -} +} \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/config/app.toml b/scripts/simapp46/template_slow/.simapp/config/app.toml index 4855c250..24b42635 100644 --- a/scripts/simapp46/template_slow/.simapp/config/app.toml +++ b/scripts/simapp46/template_slow/.simapp/config/app.toml @@ -8,17 +8,16 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "" +minimum-gas-prices = "0stake" -# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +# default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals -# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' +# everything: 2 latest states will be kept; pruning at 10 block intervals. +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' pruning = "default" # These are applied if and only if the pruning strategy is custom. pruning-keep-recent = "0" -pruning-keep-every = "0" pruning-interval = "0" # HaltHeight contains a non-zero block height at which a node will gracefully @@ -60,6 +59,16 @@ inter-block-cache = true # ["message.sender", "message.recipient"] index-events = [] +# IavlCacheSize set the size of the iavl tree cache. +# Default cache size is 50mb. +iavl-cache-size = 781250 + +# AppDBBackend defines the database backend type to use for the application and snapshots DBs. +# An empty string indicates that a fallback will be used. +# First fallback is the deprecated compile-time types.DBBackend value. +# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml. +app-db-backend = "" + ############################################################################### ### Telemetry Configuration ### ############################################################################### @@ -124,6 +133,42 @@ rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). enabled-unsafe-cors = true +############################################################################### +### Rosetta Configuration ### +############################################################################### + +[rosetta] + +# Enable defines if the Rosetta API server should be enabled. +enable = true + +# Address defines the Rosetta API server to listen on. +address = ":8080" + +# Network defines the name of the blockchain that will be returned by Rosetta. +blockchain = "app" + +# Network defines the name of the network that will be returned by Rosetta. +network = "network" + +# Retries defines the number of retries when connecting to the node before failing. +retries = 3 + +# Offline defines if Rosetta server should run in offline mode. +offline = false + +# EnableDefaultSuggestedFee defines if the server should suggest fee by default. +# If 'construction/medata' is called without gas limit and gas price, +# suggested fee based on gas-to-suggest and denom-to-suggest will be given. +enable-fee-suggestion = false + +# GasToSuggest defines gas limit when calculating the fee +gas-to-suggest = 200000 + +# DenomToSuggest defines the defult denom for fee suggestion. +# Price must be in minimum-gas-prices. +denom-to-suggest = "uatom" + ############################################################################### ### gRPC Configuration ### ############################################################################### @@ -136,6 +181,30 @@ enable = true # Address defines the gRPC server address to bind to. address = "0.0.0.0:9090" +# MaxRecvMsgSize defines the max message size in bytes the server can receive. +# The default value is 10MB. +max-recv-msg-size = "10485760" + +# MaxSendMsgSize defines the max message size in bytes the server can send. +# The default value is math.MaxInt32. +max-send-msg-size = "2147483647" + +############################################################################### +### gRPC Web Configuration ### +############################################################################### + +[grpc-web] + +# GRPCWebEnable defines if the gRPC-web should be enabled. +# NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. +enable = true + +# Address defines the gRPC-web server address to bind to. +address = "0.0.0.0:9091" + +# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). +enable-unsafe-cors = false + ############################################################################### ### State Sync Configuration ### ############################################################################### @@ -145,8 +214,15 @@ address = "0.0.0.0:9090" [state-sync] # snapshot-interval specifies the block interval at which local state sync snapshots are -# taken (0 to disable). Must be a multiple of pruning-keep-every. +# taken (0 to disable). snapshot-interval = 0 # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). snapshot-keep-recent = 2 + +[wasm] +# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries +query_gas_limit = 300000 +# This is the number of wasm vm instances we keep cached in memory for speed-up +# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally +lru_size = 0 \ No newline at end of file diff --git a/scripts/simapp46/template_slow/.simapp/config/client.toml b/scripts/simapp46/template_slow/.simapp/config/client.toml new file mode 100644 index 00000000..8a7bad12 --- /dev/null +++ b/scripts/simapp46/template_slow/.simapp/config/client.toml @@ -0,0 +1,17 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Client Configuration ### +############################################################################### + +# The network chain ID +chain-id = "simd-testing" +# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) +keyring-backend = "os" +# CLI output format (text|json) +output = "text" +# : to Tendermint RPC interface for this chain +node = "tcp://localhost:26657" +# Transaction broadcasting mode (sync|async|block) +broadcast-mode = "sync" diff --git a/scripts/simapp46/template_slow/.simapp/config/config.toml b/scripts/simapp46/template_slow/.simapp/config/config.toml index f00db58f..562111ec 100644 --- a/scripts/simapp46/template_slow/.simapp/config/config.toml +++ b/scripts/simapp46/template_slow/.simapp/config/config.toml @@ -136,6 +136,33 @@ max_subscription_clients = 100 # the estimated # maximum number of broadcast_tx_commit calls per block. max_subscriptions_per_client = 5 +# Experimental parameter to specify the maximum number of events a node will +# buffer, per subscription, before returning an error and closing the +# subscription. Must be set to at least 100, but higher values will accommodate +# higher event throughput rates (and will use more memory). +experimental_subscription_buffer_size = 200 + +# Experimental parameter to specify the maximum number of RPC responses that +# can be buffered per WebSocket client. If clients cannot read from the +# WebSocket endpoint fast enough, they will be disconnected, so increasing this +# parameter may reduce the chances of them being disconnected (but will cause +# the node to use more memory). +# +# Must be at least the same as "experimental_subscription_buffer_size", +# otherwise connections could be dropped unnecessarily. This value should +# ideally be somewhat higher than "experimental_subscription_buffer_size" to +# accommodate non-subscription-related RPC responses. +experimental_websocket_write_buffer_size = 200 + +# If a WebSocket client cannot read fast enough, at present we may +# silently drop events instead of generating an error or disconnecting the +# client. +# +# Enabling this experimental parameter will cause the WebSocket connection to +# be closed instead if it cannot read fast enough, allowing for greater +# predictability in subscription behaviour. +experimental_close_on_slow_client = false + # How long to wait for a tx to be committed during /broadcast_tx_commit. # WARNING: Using a value larger than 10s will result in increasing the # global HTTP write timeout, which applies to all connections and endpoints. @@ -177,7 +204,8 @@ laddr = "tcp://0.0.0.0:26656" # Address to advertise to peers for them to dial # If empty, will use the same port as the laddr, # and will introspect on the listener or use UPnP -# to figure out the address. +# to figure out the address. ip and port are required +# example: 159.89.10.97:26656 external_address = "" # Comma separated list of seed nodes to connect to @@ -244,6 +272,11 @@ dial_timeout = "3s" ####################################################### [mempool] +# Mempool version to use: +# 1) "v0" - (default) FIFO mempool. +# 2) "v1" - prioritized mempool. +version = "v0" + recheck = true broadcast = true wal_dir = "" @@ -273,6 +306,22 @@ max_tx_bytes = 1048576 # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = 0 +# ttl-duration, if non-zero, defines the maximum amount of time a transaction +# can exist for in the mempool. +# +# Note, if ttl-num-blocks is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if it's +# insertion time into the mempool is beyond ttl-duration. +ttl-duration = "0s" + +# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction +# can exist for in the mempool. +# +# Note, if ttl-duration is also defined, a transaction will be removed if it +# has existed in the mempool at least ttl-num-blocks number of blocks or if +# it's insertion time into the mempool is beyond ttl-duration. +ttl-num-blocks = 0 + ####################################################### ### State Sync Configuration Options ### ####################################################### @@ -302,6 +351,13 @@ discovery_time = "15s" # Will create a new, randomly named directory within, and remove it when done. temp_dir = "" +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 1 minute). +chunk_request_timeout = "10s" + +# The number of concurrent chunk fetchers to run (default: 1). +chunk_fetchers = "4" + ####################################################### ### Fast Sync Configuration Connections ### ####################################################### @@ -368,8 +424,14 @@ peer_query_maj23_sleep_duration = "2s" # 1) "null" # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +# 3) "psql" - the indexer services backed by PostgreSQL. +# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. indexer = "kv" +# The PostgreSQL connection configuration, the connection format: +# postgresql://:@:/? +psql-conn = "" + ####################################################### ### Instrumentation Configuration Options ### ####################################################### diff --git a/scripts/simapp46/template_slow/.simapp/config/genesis.json b/scripts/simapp46/template_slow/.simapp/config/genesis.json index e9c0fb4f..5a1d3cf5 100644 --- a/scripts/simapp46/template_slow/.simapp/config/genesis.json +++ b/scripts/simapp46/template_slow/.simapp/config/genesis.json @@ -159,6 +159,9 @@ "tx_size_cost_per_byte": "10" } }, + "authz": { + "authorization": [] + }, "bank": { "balances": [ { @@ -435,7 +438,25 @@ ] } ], - "denom_metadata": [], + "denom_metadata": [ + { + "description": "The fee token of this test chain", + "denom_units": [ + { + "denom": "ucosm", + "exponent": 0, + "aliases": [] + }, + { + "denom": "COSM", + "exponent": 6, + "aliases": [] + } + ], + "base": "ucosm", + "display": "COSM" + } + ], "params": { "default_send_enabled": true, "send_enabled": [] @@ -483,6 +504,9 @@ "evidence": { "evidence": [] }, + "feegrant": { + "allowances": [] + }, "genutil": { "gen_txs": [ { @@ -506,7 +530,8 @@ }, "sequence": "0" } - ] + ], + "tip": null }, "body": { "extension_options": [], @@ -571,282 +596,15 @@ "voting_period": "172800s" } }, - "ibc": { - "channel_genesis": { - "ack_sequences": [ - { - "channel_id": "channel-0", - "port_id": "transfer", - "sequence": "1" - } - ], - "acknowledgements": [], - "channels": [ - { - "channel_id": "channel-0", - "connection_hops": [ - "connection-0" - ], - "counterparty": { - "channel_id": "channel-0", - "port_id": "transfer" - }, - "ordering": "ORDER_UNORDERED", - "port_id": "transfer", - "state": "STATE_OPEN", - "version": "ics20-1" - } - ], - "commitments": [ - { - "channel_id": "channel-0", - "data": "hYz5Dx6o09DcSEWZR6xlJYwLgYUnLithsXMGtujic4I=", - "port_id": "transfer", - "sequence": "1" - } - ], - "next_channel_sequence": "0", - "receipts": [], - "recv_sequences": [ - { - "channel_id": "channel-0", - "port_id": "transfer", - "sequence": "1" - } - ], - "send_sequences": [ - { - "channel_id": "channel-0", - "port_id": "transfer", - "sequence": "2" - } - ] - }, - "client_genesis": { - "clients": [ - { - "client_id": "07-tendermint-0", - "client_state": { - "@type": "/ibc.lightclients.tendermint.v1.ClientState", - "allow_update_after_expiry": false, - "allow_update_after_misbehaviour": false, - "chain_id": "ibc-1", - "frozen_height": { - "revision_height": "0", - "revision_number": "0" - }, - "latest_height": { - "revision_height": "274", - "revision_number": "1" - }, - "max_clock_drift": "600s", - "proof_specs": [ - { - "inner_spec": { - "child_order": [ - 0, - 1 - ], - "child_size": 33, - "empty_child": null, - "hash": "SHA256", - "max_prefix_length": 12, - "min_prefix_length": 4 - }, - "leaf_spec": { - "hash": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256" - }, - "max_depth": 0, - "min_depth": 0 - }, - { - "inner_spec": { - "child_order": [ - 0, - 1 - ], - "child_size": 32, - "empty_child": null, - "hash": "SHA256", - "max_prefix_length": 1, - "min_prefix_length": 1 - }, - "leaf_spec": { - "hash": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256" - }, - "max_depth": 0, - "min_depth": 0 - } - ], - "trust_level": { - "denominator": "3", - "numerator": "1" - }, - "trusting_period": "1209600s", - "unbonding_period": "1814400s", - "upgrade_path": [ - "upgrade", - "upgradedIBCState" - ] - } - } - ], - "clients_consensus": [ - { - "client_id": "07-tendermint-0", - "consensus_states": [ - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", - "root": { - "hash": "7PmRnufr0ItJMAtq3GOJEtupU93W9fh9utvgKL+2DX0=" - }, - "timestamp": "2021-01-11T11:02:53.837998Z" - }, - "height": { - "revision_height": "258", - "revision_number": "1" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", - "root": { - "hash": "l4c9z7RZNTXk+tNM1BClb0MLnR5sWHdoofjPNyb2u7s=" - }, - "timestamp": "2021-01-11T11:02:56.184633Z" - }, - "height": { - "revision_height": "260", - "revision_number": "1" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", - "root": { - "hash": "4Z4hxSmijgVvMR//if6aJFhYIBW6w9rYYtEqs+eIUcg=" - }, - "timestamp": "2021-01-11T11:03:02.268862Z" - }, - "height": { - "revision_height": "265", - "revision_number": "1" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", - "root": { - "hash": "xFOoMvBw80wWTHqqrNpWb/Hv8+zKsTsbam8MFA9Gor4=" - }, - "timestamp": "2021-01-11T11:03:07.123191Z" - }, - "height": { - "revision_height": "269", - "revision_number": "1" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", - "root": { - "hash": "0s6RbgtxLkZ51lJJCq1iZuhvSqn/DsAQs9jEMhShv3A=" - }, - "timestamp": "2021-01-11T11:03:13.075754Z" - }, - "height": { - "revision_height": "274", - "revision_number": "1" - } - } - ] - } - ], - "clients_metadata": [ - { - "client_id": "07-tendermint-0", - "client_metadata": [ - { - "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjU4L3Byb2Nlc3NlZFRpbWU=", - "value": "FlkomBj7tMA=" - }, - { - "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjYwL3Byb2Nlc3NlZFRpbWU=", - "value": "FlkomLBGmiA=" - }, - { - "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY1L3Byb2Nlc3NlZFRpbWU=", - "value": "FlkomhjrK/g=" - }, - { - "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY5L3Byb2Nlc3NlZFRpbWU=", - "value": "Flkomzng9Qg=" - }, - { - "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjc0L3Byb2Nlc3NlZFRpbWU=", - "value": "FlkonJ5n5Gg=" - } - ] - } - ], - "create_localhost": false, - "next_client_sequence": "0", - "params": { - "allowed_clients": [ - "06-solomachine", - "07-tendermint" - ] - } - }, - "connection_genesis": { - "client_connection_paths": [ - { - "client_id": "07-tendermint-0", - "paths": [ - "connection-0" - ] - } - ], - "connections": [ - { - "client_id": "07-tendermint-0", - "counterparty": { - "client_id": "07-tendermint-0", - "connection_id": "connection-0", - "prefix": { - "key_prefix": "aWJj" - } - }, - "delay_period": "0", - "id": "connection-0", - "state": "STATE_OPEN", - "versions": [ - { - "features": [ - "ORDER_ORDERED", - "ORDER_UNORDERED" - ], - "identifier": "1" - } - ] - } - ], - "next_connection_sequence": "0" - } + "group": { + "group_members": [], + "group_policies": [], + "group_policy_seq": "0", + "group_seq": "0", + "groups": [], + "proposal_seq": "0", + "proposals": [], + "votes": [] }, "mint": { "minter": { @@ -862,6 +620,10 @@ "mint_denom": "ustake" } }, + "nft": { + "classes": [], + "entries": [] + }, "params": null, "slashing": { "missed_blocks": [], @@ -884,20 +646,13 @@ "historical_entries": 10000, "max_entries": 7, "max_validators": 100, + "min_commission_rate": "0.000000000000000000", "unbonding_time": "1814400s" }, "redelegations": [], "unbonding_delegations": [], "validators": [] }, - "transfer": { - "denom_traces": [], - "params": { - "receive_enabled": true, - "send_enabled": true - }, - "port_id": "transfer" - }, "upgrade": {}, "vesting": {} }, @@ -920,6 +675,6 @@ }, "version": {} }, - "genesis_time": "2021-07-27T15:14:14.2361126Z", + "genesis_time": "2022-08-03T15:03:38.08791355Z", "initial_height": "1" }