From d9ce34bb961d5750366dbc970fd116a638424d07 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Fri, 21 May 2021 10:17:46 +0200 Subject: [PATCH] Release Hermes v0.3.2 (#970) * Update changelog * Bump version to 0.3.2 * Update guide for `keys` command * Show key name in JSON output * Update `tx raw ft-transfer` help message in guide --- CHANGELOG.md | 14 ++++-- Cargo.lock | 61 ++++++++++++++------------- guide/README.md | 2 +- guide/src/SUMMARY.md | 2 +- guide/src/commands/global.md | 2 +- guide/src/commands/keys/index.md | 60 +++++++++++++++++++++++--- guide/src/commands/raw/packet.md | 11 ++--- guide/src/index.md | 2 +- guide/src/installation.md | 14 +++--- modules/Cargo.toml | 2 +- relayer-cli/Cargo.toml | 6 +-- relayer-cli/src/commands/keys/list.rs | 4 +- relayer/Cargo.toml | 6 +-- 13 files changed, 124 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 485cb987a9..9f77564eb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## Unreleased +## v0.3.2 +*May 21st, 2021* + +This is minor release which brings substantial performance improvements +to the relayer (relaying 1000 packets now takes 2-5min instead of 1h+), +better UX for the `ft-transfer` command, and automatic deployment of +Docker images to Docker Hub. ### FEATURES @@ -11,13 +17,13 @@ - Add support for multiple keys to the keyring ([#963]) - [release] - - Released the official [Hermes image](https://hub.docker.com/r/informalsystems/hermes) on Docker Hub ([#894]) + - Released the official [Hermes image][hermes-docker] on Docker Hub ([#894]) - Automatically deploy Docker Hub image during release ([#967]) ### IMPROVEMENTS - [ibc-relayer] - - Bulk events from all transactions included in a block ([#957]) + - Batch together all events from all transactions included in a block ([#957]) ### BUG FIXES @@ -34,6 +40,8 @@ [#963]: https://github.com/informalsystems/ibc-rs/issues/963 [#967]: https://github.com/informalsystems/ibc-rs/issues/967 +[hermes-docker]: https://hub.docker.com/r/informalsystems/hermes + ## v0.3.1 *May 14h, 2021* diff --git a/Cargo.lock b/Cargo.lock index bc2acb0ed7..1eec927482 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,9 +412,9 @@ checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] name = "cpufeatures" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "281f563b2c3a0e535ab12d81d3c5859045795256ad269afa7c19542585b68f93" +checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8" dependencies = [ "libc", ] @@ -562,9 +562,9 @@ dependencies = [ [[package]] name = "der" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83dc83d0b59f92103d8e661e60526338ad3aeb0c15fa4a29a14b6a9b1ac8a43c" +checksum = "7d2f495a1c0ce1d217ba7276a249dd1e767b8df58fc448cdda58e232cd09ec72" dependencies = [ "const-oid", "typenum", @@ -572,9 +572,9 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.13" +version = "0.99.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6" +checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" dependencies = [ "convert_case", "proc-macro2", @@ -684,9 +684,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee681bf25de1aad7cd02ccc7525d7b4bfab7be2493dbe3ee18d93f86eb3dcf3e" +checksum = "c13e9b0c3c4170dcc2a12783746c4205d98e18957f57854251eea3f9750fe005" dependencies = [ "bitvec 0.20.4", "ff", @@ -891,13 +891,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.10.0+wasi-snapshot-preview1", ] [[package]] @@ -1191,7 +1191,7 @@ dependencies = [ [[package]] name = "ibc" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anomaly", "bytes", @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "ibc-relayer" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anomaly", "async-stream", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "ibc-relayer-cli" -version = "0.3.1" +version = "0.3.2" dependencies = [ "abscissa_core", "anomaly", @@ -1834,9 +1834,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" dependencies = [ "unicode-xid", ] @@ -1955,7 +1955,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.3", ] [[package]] @@ -1991,7 +1991,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.3", "redox_syscall", ] @@ -2687,11 +2687,12 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] @@ -2730,9 +2731,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f0c8e7c0addab50b663055baf787d0af7f413a46e6e7fb9559a4e4db7137a5" +checksum = "bd3076b5c8cc18138b8f8814895c11eb4de37114a5d127bafdc5e55798ceef37" dependencies = [ "autocfg", "bytes", @@ -2750,9 +2751,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" +checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37" dependencies = [ "proc-macro2", "quote", @@ -2782,9 +2783,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e177a5d8c3bf36de9ebe6d58537d8879e964332f93fb3339e43f618c81361af0" +checksum = "f8864d706fdb3cc0843a49647ac892720dac98a6eeb818b77190592cf4994066" dependencies = [ "futures-core", "pin-project-lite", @@ -2793,9 +2794,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940a12c99365c31ea8dd9ba04ec1be183ffe4920102bb7122c2f515437601e8e" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" dependencies = [ "bytes", "futures-core", @@ -3131,9 +3132,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" diff --git a/guide/README.md b/guide/README.md index b52e495b10..b033a86e7d 100644 --- a/guide/README.md +++ b/guide/README.md @@ -11,7 +11,7 @@ mdBook is a utility to create modern online books from Markdown files. This guide should be permanently deployed at its latest stable version at [hermes.informal.systems](https://hermes.informal.systems). -Current version: `0.3.1`. +Current version: `0.3.2`. The version of this guide is aligned with the [versioning of the ibc crates](../README.md). diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 8d4361e613..996a166d02 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -1,6 +1,6 @@ # Summary -# Hermes (v0.3.1) +# Hermes (v0.3.2) --- - [Introduction](./index.md) diff --git a/guide/src/commands/global.md b/guide/src/commands/global.md index ea7fca50d3..52d4d2f663 100644 --- a/guide/src/commands/global.md +++ b/guide/src/commands/global.md @@ -3,7 +3,7 @@ Hermes accepts global options which affect all commands. ```shell -hermes 0.3.1 +hermes 0.3.2 Informal Systems Implementation of `hermes`, an IBC Relayer developed in Rust. diff --git a/guide/src/commands/keys/index.md b/guide/src/commands/keys/index.md index c4efb5a5e9..779737d109 100644 --- a/guide/src/commands/keys/index.md +++ b/guide/src/commands/keys/index.md @@ -73,12 +73,13 @@ POSITIONAL ARGUMENTS: FLAGS: -f, --file FILE the path to the key file (conflicts with --mnemonic) + -n, --name NAME name of the key (defaults to the `key_name` defined in the config) ``` To add a private key file to a chain: ```shell -hermes -c config keys add [CHAIN_ID] -f [PRIVATE_KEY_FILE] +hermes -c config.toml keys add [CHAIN_ID] -f [PRIVATE_KEY_FILE] ``` If the command is successful a message similar to the one below will be displayed: @@ -87,6 +88,14 @@ If the command is successful a message similar to the one below will be displaye Success: Added key testkey ([ADDRESS]) on [CHAIN ID] chain ``` +> **Key name:** +> By default, the key will be named after the `key_name` property specified in the configuration file. +> To use a different key name, specify the `--name` option when invoking `keys add`. +> +> ``` +> hermes -c config.toml keys add [CHAINID] -f [PRIVATE_KEY_FILE] -n [KEY_NAME] +> ``` + #### Restore a private key to a chain from a mnemonic ```shell @@ -100,14 +109,15 @@ POSITIONAL ARGUMENTS: chain_id identifier of the chain FLAGS: - -n, --name NAME key name -m, --mnemonic MNEMONIC mnemonic to restore the key from + -t, --coin-type COIN-TYPE coin type of the key to restore, default: 118 (Atom) + -n, --name NAME name of the key (defaults to the `key_name` defined in the config) ``` To restore a key from its mnemonic: ```shell -hermes -c config keys restore [CHAIN_ID] -m "[MNEMONIC]" +hermes -c config.toml keys restore [CHAIN_ID] -m "[MNEMONIC]" ``` If the command is successful a message similar to the one below will be displayed: @@ -116,6 +126,14 @@ If the command is successful a message similar to the one below will be displaye Success: Restore key testkey ([ADDRESS]) on [CHAIN ID] chain ``` +> **Key name:** +> By default, the key will be named after the `key_name` property specified in the configuration file. +> To use a different key name, specify the `--name` option when invoking `keys restore`. +> +> ``` +> hermes -c config.toml keys restore [CHAINID] -m "[MNEMONIC]" -n [KEY_NAME] +> ``` + ### List keys In order to list the private keys added to chains use the `keys list` command @@ -136,11 +154,43 @@ POSITIONAL ARGUMENTS: To list the private key file that was added to a chain: ```shell -hermes -c config keys list [CHAIN_ID] +hermes -c config.toml keys list [CHAIN_ID] +``` + +If the command is successful a message similar to the one below will be displayed: + +``` +Success: +- user2 (cosmos1attn9fxrcvjz483w3tu4cfz77ldmlyujly3q3k) +- testkey (cosmos1dw88vdekeeuta5u50p6n5lt5v5c6y2we0pu8nz) +``` + +**JSON:** + +```shell +hermes --json -c config.toml keys list [CHAIN_ID] | jq ``` If the command is successful a message similar to the one below will be displayed: ```json -[CHAIN_ID] -> [KEY_NAME] ([ADDRESS]) +{ + "result": { + "testkey": { + "account": "cosmos1dw88vdekeeuta5u50p6n5lt5v5c6y2we0pu8nz", + "address": [ 107, 142, 118, 55, 54, 206, 120, 190, 211, 148, 120, 117, 58, 125, 116, 101, 49, 162, 41, 217 ], + "coin_type": 118, + "private_key": "(snip)", + "public_key": "xpub6Gc7ZUt2q1BiQYjhUextPv5bZLwosHigZYqEquPD6FkAGmHDrLiBgE5Xnh8XGZp79rAXtZn1Dt3DNQHxxgCgVQqfRMfVsRiXn6mwULBnYq7" + }, + "user2": { + "account": "cosmos1attn9fxrcvjz483w3tu4cfz77ldmlyujly3q3k", + "address": [ 234, 215, 50, 164, 195, 195, 36, 42, 158, 46, 138, 249, 92, 36, 94, 247, 219, 191, 147, 146 ], + "coin_type": 118, + "private_key": "(snip)", + "public_key": "xpub6FmDbeGTWVjSvHrqHfrpnMTZxpPX1V7XFiq5nMuvgwX9jumt1yUuwNAUQo8Nn36unbFShg6iSjkfMBgeY49wik7rF91N2SHvarpX62ByWMf" + } + }, + "status": "success" +} ``` diff --git a/guide/src/commands/raw/packet.md b/guide/src/commands/raw/packet.md index dce9322ecb..6c52df501a 100644 --- a/guide/src/commands/raw/packet.md +++ b/guide/src/commands/raw/packet.md @@ -24,11 +24,12 @@ POSITIONAL ARGUMENTS: amount amount of coins (samoleans, by default) to send (e.g. `100000`) FLAGS: - -o, --timeout-height-offset TIMEOUT-HEIGHT-OFFSET - -t, --timeout-seconds TIMEOUT-SECONDS - -r, --receiver RECEIVER receiving account address on the destination chain - -d, --denom DENOM denomination of the coins to send (default: samoleans) - -n, --number-msgs NUMBER-MSGS + -o, --timeout-height-offset TIMEOUT-HEIGHT-OFFSET timeout in number of blocks since current + -t, --timeout-seconds TIMEOUT-SECONDS timeout in seconds since current + -r, --receiver RECEIVER receiving account address on the destination chain + -d, --denom DENOM denomination of the coins to send (default: samoleans) + -n, --number-msgs NUMBER-MSGS number of messages to send + -k, --key KEY use the given signing key (default: `key_name` config) ``` __Example__ diff --git a/guide/src/index.md b/guide/src/index.md index e7278f9330..e769f7270b 100644 --- a/guide/src/index.md +++ b/guide/src/index.md @@ -1,4 +1,4 @@ -# Hermes Guide (v0.3.1) +# Hermes Guide (v0.3.2) This guide can help you setup, configure, and operate Hermes to transfer packets between two IBC enabled chains. diff --git a/guide/src/installation.md b/guide/src/installation.md index ccd547436c..22bdd5e8a7 100644 --- a/guide/src/installation.md +++ b/guide/src/installation.md @@ -14,8 +14,8 @@ There are two main approaches for obtaining Hermes: Simply head to the GitHub [Releases][releases] page and download the latest version of Hermes binary matching your platform: -- MacOS: `hermes-v0.3.1-x86_64-apple-darwin.tar.gz` (or .zip), -- Linux: `hermes-v0.3.1-x86_64-unknown-linux-gnu.tar.gz` (or .zip). +- MacOS: `hermes-v0.3.2-x86_64-apple-darwin.tar.gz` (or .zip), +- Linux: `hermes-v0.3.2-x86_64-unknown-linux-gnu.tar.gz` (or .zip). The step-by-step instruction below should carry you through the whole process: @@ -47,7 +47,7 @@ hermes version ``` ``` -hermes 0.3.1 +hermes 0.3.2 ``` ## Install via Cargo @@ -81,7 +81,7 @@ hermes version ``` ``` -hermes 0.3.1 +hermes 0.3.2 ``` ## Build from source @@ -103,10 +103,10 @@ cd ibc-rs Go to the [ibc-rs releases](https://github.com/informalsystems/ibc-rs/releases) page to see what is the most recent release. -Then checkout the release, for example if the most recent release is `v0.3.1` then execute the command: +Then checkout the release, for example if the most recent release is `v0.3.2` then execute the command: ```shell -git checkout v0.3.1 +git checkout v0.3.2 ``` ### Building with `cargo build` @@ -141,7 +141,7 @@ If you run the `hermes` without any additional parameters you should see the usa ``` ``` -hermes 0.3.1 +hermes 0.3.2 Informal Systems USAGE: diff --git a/modules/Cargo.toml b/modules/Cargo.toml index 90c6ab5dcc..6bb93ac604 100644 --- a/modules/Cargo.toml +++ b/modules/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc" -version = "0.3.1" +version = "0.3.2" edition = "2018" license = "Apache-2.0" readme = "README.md" diff --git a/relayer-cli/Cargo.toml b/relayer-cli/Cargo.toml index 7f4b401c34..fa4ca716e2 100644 --- a/relayer-cli/Cargo.toml +++ b/relayer-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-cli" -version = "0.3.1" +version = "0.3.2" edition = "2018" license = "Apache-2.0" readme = "README.md" @@ -20,8 +20,8 @@ name = "hermes" profiling = ["ibc-relayer/profiling"] [dependencies] -ibc = { version = "0.3.1", path = "../modules" } -ibc-relayer = { version = "0.3.1", path = "../relayer" } +ibc = { version = "0.3.2", path = "../modules" } +ibc-relayer = { version = "0.3.2", path = "../relayer" } ibc-proto = { version = "0.8.0", path = "../proto" } anomaly = "0.2.0" diff --git a/relayer-cli/src/commands/keys/list.rs b/relayer-cli/src/commands/keys/list.rs index 2246358bd5..7b272d9572 100644 --- a/relayer-cli/src/commands/keys/list.rs +++ b/relayer-cli/src/commands/keys/list.rs @@ -1,3 +1,5 @@ +use std::collections::HashMap; + use abscissa_core::{Command, Options, Runnable}; use anomaly::BoxError; @@ -39,7 +41,7 @@ impl Runnable for KeysListCmd { match list_keys(opts.chain_config) { Ok(keys) if json() => { - let keys = keys.into_iter().map(|(_, k)| k).collect::>(); + let keys = keys.into_iter().collect::>(); Output::success(keys).exit() } Ok(keys) => { diff --git a/relayer/Cargo.toml b/relayer/Cargo.toml index 34e49759f0..e3e65f425a 100644 --- a/relayer/Cargo.toml +++ b/relayer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer" -version = "0.3.1" +version = "0.3.2" edition = "2018" license = "Apache-2.0" readme = "README.md" @@ -16,7 +16,7 @@ description = """ profiling = [] [dependencies] -ibc = { version = "0.3.1", path = "../modules" } +ibc = { version = "0.3.2", path = "../modules" } ibc-proto = { version = "0.8.0", path = "../proto" } subtle-encoding = "0.5" @@ -69,7 +69,7 @@ version = "=0.19.0" [dev-dependencies] serial_test = "0.5.0" -ibc = { version = "0.3.1", path = "../modules", features = ["mocks"] } +ibc = { version = "0.3.2", path = "../modules", features = ["mocks"] } # Needed for generating (synthetic) light blocks. tendermint-testgen = { version = "=0.19.0" }