-
Notifications
You must be signed in to change notification settings - Fork 329
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
Hermes CLI for upgrading client #723
Conversation
Also cleaned-up the documentation, which looked very sloppy. https://docs.rs/ibc/0.1.1/ibc/ics02_client/msgs/index.html
@@ -63,9 +63,7 @@ mkdir -p "$GAIA_DATA" && cd "$GAIA_DATA" && cd ../ | |||
ONE_CHAIN="$(dirname "$0")/one-chain" | |||
|
|||
CHAIN_0_RPC_PORT=26657 | |||
CHAIN_0_RPC_ADDR="localhost:$CHAIN_0_RPC_PORT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not used.
@@ -133,5 +133,7 @@ $BINARY --home $CHAIN_DIR/$CHAIN_ID start --pruning=nothing --grpc.address="0.0. | |||
# Show validator's and user's balance | |||
sleep 3 | |||
RPC_ADDR="tcp://localhost:$RPC_PORT" | |||
echo "Balances for validator '$VALIDATOR' @ '$RPC_ADDR'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it more explicit as it wasn't clear from output which was user <> validator.
Codecov Report
@@ Coverage Diff @@
## master #723 +/- ##
=========================================
+ Coverage 13.6% 44.8% +31.1%
=========================================
Files 69 166 +97
Lines 3752 11318 +7566
Branches 1374 0 -1374
=========================================
+ Hits 513 5078 +4565
- Misses 2618 6240 +3622
+ Partials 621 0 -621
Continue to review full report at Codecov.
|
Co-authored-by: Romain Ruetschi <romain@informal.systems>
@ancazamfir @cezarad can you please have a look over this? |
FYI, I added a new command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks Adi, we are almost done with this! I have a couple of comments on the CLI and UX.
required, | ||
help = "identifier of the client to be upgraded on destination chain" | ||
)] | ||
dst_client_id: ClientId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make dst_client_id
optional and if not entered to upgrade all clients of src_chain_id
present on dst_chain_id
. The way it is, with a lot of clients, the user needs to query all clients and issue the upgrade for each client.
Also, we should have a hermes client upgrade..
command in place of or in addition to this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to do this in this PR or a follow-up one? If the latter, then we should open an issue to track this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up PR, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, pushed a couple commits for nitpicks and left a comment about a TODO, but otherwise it's all good!
* Added domain type def. Also cleaned-up the documentation, which looked very sloppy. https://docs.rs/ibc/0.1.1/ibc/ics02_client/msgs/index.html * Added partial handler & command * Added upgrade proto files. Added Cargo.lock for proto-compiler * Prep for query_upgraded_client_state * Method & support for querying ugpraded client state * Support for querying the upgraded consensus state * Minor dev scripts enhancements & bugs * Added guide. Uses patched Go relayer * Proto conversion for upgrade msg. Refactored upgrade() impl * Fix missing signer bug * Update msg bf. upgrade. Event parsing * Changelog. Revised guide * Aesthetic nits based on file review * Clarifications in the test instructions * Documented Go relayer version in testing instructions * Possible fix for informalsystems#734 * changelog & method documentation * Apply suggestions from code review Co-authored-by: Romain Ruetschi <romain@informal.systems> * Added more derived trait bounds on module events * Adapt to newer Ics02 structure. * Added Protobuf impl for MsgUpgradeAnyClient * FMT * Added upgrade-chain CLI and updated instructions * Remove a clone and turn zero_custom_fields into a static method * Whitespace and nitpick * Remove obsolete TODO Co-authored-by: Romain Ruetschi <romain@informal.systems> Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Closes: #357
Closes: #734
Description
hermes tx raw upgrade-client ibc-1 ibc-0 07-tendermint-1
Additional notes:
proto/src/prost/cosmos.upgrade.v1beta1.rs
Cargo.lock
file (note: this file account for over 1K new lines of code, so the PR is not as big as it seems)locked
flag so that the binary is identical every time we re-generate these files;pub log: std::string::String,
vspub log: ::prost::alloc::string::String,
)For contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.