Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added gm fix conforming to keys add breaking changes #2263

Merged
merged 4 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/gm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Gaiad Manager Change Log

## v0.1.2

### BUGFIXES

- Fixed `gm hermes keys` which was broken following a breaking change in Hermes CLI ([#2262]).

### IMPROVEMENTS

- Adjusted the `max_gas` and `gas_price.price` parameters used for `gm hermes config`.

[#2262]: https://github.com/informalsystems/ibc-rs/issues/2262


## v0.1.1

### BUGFIXES
Expand Down
14 changes: 7 additions & 7 deletions scripts/gm/bin/lib-gm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "${DEBUG:-}" = "2" ]; then
fi

version() {
VERSION="v0.1.1"
VERSION="v0.1.2"
if is_json_output; then
echo '{"status": "success", "message": "'"${VERSION}"'"}'
else
Expand Down Expand Up @@ -995,8 +995,8 @@ rpc_timeout = '15s'
account_prefix = '${ACCOUNT_PREFIX}'
key_name = 'wallet'
store_prefix = 'ibc'
gas_price = { price = 0.001, denom = '${DENOM}' }
max_gas = 1000000
gas_price = { price = 0.01, denom = '${DENOM}' }
max_gas = 10000000
Comment on lines -998 to +999
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: this change is unrelated to bug #2262.

It's just a parameter change so Hermes can submit bigger transactions by default (allows bigger gas usage).

clock_drift = '5s'
trusting_period = '14days'
trust_threshold = { numerator = '1', denominator = '3' }
Expand All @@ -1023,13 +1023,13 @@ hermes_keys() {
while [ "$EXTRA_WALLETS_COUNTER" -gt 0 ];
do
if [ -z "$GLOBAL_HERMES_CONFIG" ] && [ -z "$HDPATH" ]; then
"$HERMES_BINARY" keys add "$ID" --name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
"$HERMES_BINARY" keys add "$ID" --key-name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
elif [ -n "$GLOBAL_HERMES_CONFIG" ] && [ -z "$HDPATH" ]; then
"$HERMES_BINARY" -c "$GLOBAL_HERMES_CONFIG" keys add "$ID" --name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
"$HERMES_BINARY" -c "$GLOBAL_HERMES_CONFIG" keys add "$ID" --key-name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
elif [ -z "$GLOBAL_HERMES_CONFIG" ] && [ -n "$HDPATH" ]; then
"$HERMES_BINARY" keys add "$ID" --hd-path "$HDPATH" --name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
"$HERMES_BINARY" keys add "$ID" --hd-path "$HDPATH" --key-name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
elif [ -n "$GLOBAL_HERMES_CONFIG" ] && [ -n "$HDPATH" ]; then
"$HERMES_BINARY" -c "$GLOBAL_HERMES_CONFIG" keys add "$ID" --hd-path "$HDPATH" --name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
"$HERMES_BINARY" -c "$GLOBAL_HERMES_CONFIG" keys add "$ID" --hd-path "$HDPATH" --key-name "wallet${EXTRA_WALLETS_COUNTER}" -f "${NETWORK_HOME_DIR}/wallet${EXTRA_WALLETS_COUNTER}_seed.json"
fi
EXTRA_WALLETS_COUNTER="$((EXTRA_WALLETS_COUNTER - 1))"
done
Expand Down
6 changes: 3 additions & 3 deletions scripts/init-hermes
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ cargo build -q --locked
# add the key seeds to the keyring of each chain
echo "Importing keys..."
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_0_ID" -f "$GAIA_DATA/$CHAIN_0_ID/user_seed.json"
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_0_ID" -f "$GAIA_DATA/$CHAIN_0_ID/user2_seed.json" -n user2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you for fixing Luca!

cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_0_ID" -f "$GAIA_DATA/$CHAIN_0_ID/user2_seed.json" -k user2
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_1_ID" -f "$GAIA_DATA/$CHAIN_1_ID/user_seed.json"
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_1_ID" -f "$GAIA_DATA/$CHAIN_1_ID/user2_seed.json" -n user2
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_1_ID" -f "$GAIA_DATA/$CHAIN_1_ID/user2_seed.json" -k user2

if [ -n "$CHAIN_2_ID" ]; then
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_2_ID" -f "$GAIA_DATA/$CHAIN_2_ID/user_seed.json"
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_2_ID" -f "$GAIA_DATA/$CHAIN_2_ID/user2_seed.json" -n user2
cargo run -q --bin hermes -- -c "$CONFIG_FILE" keys add "$CHAIN_2_ID" -f "$GAIA_DATA/$CHAIN_2_ID/user2_seed.json" -k user2
fi

echo "Done!"