diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a61454dad..3a93728558 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ for raising multiple issues that helped us improve the reliability of Hermes. - [gaiad-manager] - Import hermes keys properly even if wallet HD derivation path is set ([#975]) - Apply default values to missing configuration parameters ([#993]) + - `gm hermes config` now creates hermes 0.4.0 compatible configuration ([#1039]) ### BREAKING CHANGES @@ -50,6 +51,7 @@ for raising multiple issues that helped us improve the reliability of Hermes. [#1003]: https://github.com/informalsystems/ibc-rs/issues/1003 [#1022]: https://github.com/informalsystems/ibc-rs/issues/1022 [gaiad-manager]: https://github.com/informalsystems/ibc-rs/blob/master/scripts/gm/README.md +[#1039]: https://github.com/informalsystems/ibc-rs/issues/1039 ## v0.3.2 *May 21st, 2021* diff --git a/scripts/gm/CHANGELOG.md b/scripts/gm/CHANGELOG.md index 1cf8e3d308..5970d1f0e2 100644 --- a/scripts/gm/CHANGELOG.md +++ b/scripts/gm/CHANGELOG.md @@ -1,5 +1,10 @@ # Gaiad Manager Change Log +## v0.0.4 + +### FEATURES +- Updated hermes configuration with the hermes 0.4.0 configuration parameters. + ## v0.0.3 ### BUGFIXES diff --git a/scripts/gm/README.md b/scripts/gm/README.md index 0ba133e88b..2719c4b690 100644 --- a/scripts/gm/README.md +++ b/scripts/gm/README.md @@ -114,8 +114,11 @@ the `gm.toml` file for node configuration. By default, newly created node config setting up the hermes configuration and are only used in the `hermes` sub-command. * `binary` - Path to the `hermes` binary to use. * `config` - The hermes configuration file path. -* `strategy` - The hermes configuration strategy paremeter. -* `log_level` - The hermes configuration log_level paremeter. +* `strategy` - The hermes configuration strategy parameter. +* `log_level` - The hermes configuration log_level parameter. +* `telemetry_enabled` - The hermes configuration telemetry.enabled parameter. +* `telemetry_host` - The hermes configuration telemetry.host parameter. +* `telemetry_port` - The hermes configuration telemetry.port parameter. **Tribal knowledge**: (things they don't tell you) * the user is welcome to create additional nodes outside the scope of `gm` on the local machine but `gm` will only diff --git a/scripts/gm/bin/lib-gm b/scripts/gm/bin/lib-gm index ae5bb70fd0..d7251e0b7f 100644 --- a/scripts/gm/bin/lib-gm +++ b/scripts/gm/bin/lib-gm @@ -5,7 +5,7 @@ if [ "${DEBUG:-}" == "2" ]; then fi version() { - echo "v0.0.3" + echo "v0.0.4" } config_defaults() { @@ -21,6 +21,9 @@ config_defaults() { GLOBAL_HERMES_CONFIG="${HOME}/.hermes/config.toml" GLOBAL_HERMES_STRATEGY="packets" GLOBAL_HERMES_LOG_LEVEL="info" + GLOBAL_HERMES_TELEMETRY_ENABLED="true" + GLOBAL_HERMES_TELEMETRY_HOST="127.0.0.1" + GLOBAL_HERMES_TELEMETRY_PORT="3001" } install() { @@ -185,6 +188,9 @@ load_config() { GLOBAL_HERMES_CONFIG="$(eval echo "$(stoml -sq "$CONFIG_FILE" global.hermes.config || echo "$GLOBAL_HERMES_CONFIG")")" GLOBAL_HERMES_STRATEGY="$(stoml -sq "$CONFIG_FILE" global.hermes.strategy || echo "$GLOBAL_HERMES_STRATEGY")" GLOBAL_HERMES_LOG_LEVEL="$(stoml -sq "$CONFIG_FILE" global.hermes.log_level || echo "$GLOBAL_HERMES_LOG_LEVEL")" + GLOBAL_HERMES_TELEMETRY_ENABLED="$(stoml -sq "$CONFIG_FILE" global.hermes.telemetry_enabled || echo "$GLOBAL_HERMES_TELEMETRY_ENABLED")" + GLOBAL_HERMES_TELEMETRY_HOST="$(stoml -sq "$CONFIG_FILE" global.hermes.telemetry_host || echo "$GLOBAL_HERMES_TELEMETRY_HOST")" + GLOBAL_HERMES_TELEMETRY_PORT="$(stoml -sq "$CONFIG_FILE" global.hermes.telemetry_port || echo "$GLOBAL_HERMES_TELEMETRY_PORT")" export GLOBAL_GAIAD_BINARY export GLOBAL_HOME_DIR export GLOBAL_AUTO_MAINTAIN_CONFIG @@ -195,6 +201,9 @@ load_config() { export GLOBAL_HERMES_CONFIG export GLOBAL_HERMES_STRATEGY export GLOBAL_HERMES_LOG_LEVEL + export GLOBAL_HERMES_TELEMETRY_ENABLED + export GLOBAL_HERMES_TELEMETRY_HOST + export GLOBAL_HERMES_TELEMETRY_PORT if [ "$FRESH_CONFIG" = "yes" ]; then write_default_config VALIDATORS="" @@ -273,6 +282,9 @@ binary="$GLOBAL_HERMES_BINARY" config="$GLOBAL_HERMES_CONFIG" strategy="$GLOBAL_HERMES_STRATEGY" log_level="$GLOBAL_HERMES_LOG_LEVEL" +telemetry_enabled="$GLOBAL_HERMES_TELEMETRY_ENABLED" +telemetry_host="$GLOBAL_HERMES_TELEMETRY_HOST" +telemetry_port="$GLOBAL_HERMES_TELEMETRY_PORT" EOF set -e @@ -706,6 +718,11 @@ hermes_config() { strategy = '${GLOBAL_HERMES_STRATEGY}' log_level = '${GLOBAL_HERMES_LOG_LEVEL}' +[telemetry] +enabled = ${GLOBAL_HERMES_TELEMETRY_ENABLED} +host = '${GLOBAL_HERMES_TELEMETRY_HOST}' +port = ${GLOBAL_HERMES_TELEMETRY_PORT} + EOF for i in $ALL_NODES do @@ -726,6 +743,10 @@ account_prefix='cosmos' key_name='wallet' store_prefix='ibc' fee_denom='stake' +fee_amount=1000 +gas=300000 +clock_drift='5s' +trusting_period='14days' [chains.trust_threshold] numerator = '1' diff --git a/scripts/gm/gm.toml b/scripts/gm/gm.toml index 637f2f895f..5221ff7644 100644 --- a/scripts/gm/gm.toml +++ b/scripts/gm/gm.toml @@ -41,6 +41,15 @@ strategy="packets" # Hermes configuration log_level parameter. log_level="info" +# Hermes configuration telemetry.enabled parameter. +telemetry_enabled=true + +# Hermes configuration telemetry.host parameter. +telemetry_host='127.0.0.1' + +# Hermes configuration telemetry.port parameter. +telemetry_port=3001 + ## ## Sub-section (node) definitions and parameter redefinitons below. ##