-
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
Implemented GRPC client to query account sequence #361
Conversation
Just noticed there a lot of file changes but a lot of them are proto files that were updated and after including tonic seems it also formatted the files. |
Codecov Report
@@ Coverage Diff @@
## master informalsystems/hermes#361 +/- ##
=========================================
+ Coverage 13.6% 34.4% +20.7%
=========================================
Files 69 144 +75
Lines 3752 9085 +5333
Branches 1374 3066 +1692
=========================================
+ Hits 513 3131 +2618
- Misses 2618 5713 +3095
+ Partials 621 241 -380
Continue to review full report at Codecov.
|
There might be an additional change required which is the cosmos address from the key_seed.json. Right now it has a hard coded address. I will look into this tomorrow. |
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.
LGTM but will defer to @ancazamfir for the final approbation. Great stuff @andynog!
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.
Looks good! Thanks Andy!!
Please update the changelog and pin the protos to sdk v0.40.0-rc0
(commit 15324920548c2629e51d837bcefc1cbc40797c5d)
@ancazamfir, I've merged #365 and there were a lot of merging conflicts that I've resolved to the best of my knowledge. Since there were not only changes related to the proto compiler but also for the tx commands maybe from other commits to master, I had to resolve these conflicts. The only weird thing is that if I run a Could you please test the txs with this branch and see if still makes sense for you ? Here's what I've tested
and I get
|
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.
Looks great! Thanks Andy!
* Added logic to generate GRPC client from cosmos.auth proto (#337) * Adding logic to use GRPC client (#337) * Grpc client connection retrieves account sequence (#337) * Removed the account sequence flag from the tx raw commands (#337) * Removed instructions to query and specify account sequence from tx raw command (#337) * Logic to fetch GRPC endpoint address from config (#337) * Fixing tests (#361) * Logic to use the address from the key seed (#337) * Added boilerplate code for a keys add command to the relayer (#363) * Removing key flag from tx cmds * Adding logic to get key specified in the config * Logic to get the key specified in the config (#363) * Removed the -k flag from the tx raw commands (#363) * More logic to add key command (#363) * key add command for memory store working (#363) * Added logic to persist key seed in 'home' folder (#363) * Changes implemented (#363): - Added a new test keyring backend to support adding keys to file system (under home folder) - Refactored logic to add key to be part of the keystore and not the command - Switched the keybase on a chain to use the test keyring - Key seed file is saved in the test keystore default folder (/home/andy/.rrly) * Logic to use the key_name parameter from the config to add key. Removed name parameter from keys add cmd (#363) * Changed the logic to get the key from the test keyring file store (#363) * Implemented changes: (#363) - Clean up remaining key_seed flag for tx cmds - Refactored keybase to include chain config - Refactoring keyring methods to use chain config - Logic to use configured key to sign tx * Updated the README instructions (#363) * Disable the 'keys restore' command for now (#363) * Added 'keys list' command to show key added on a chain (#363) * Added entry for issue #363 (PR #408) * Refactored the bound variables to use the full name per comment suggestion (#408) * Move key retrieval, memo and timeout height inside send_tx Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
* Added logic to generate GRPC client from cosmos.auth proto (#337) * Adding logic to use GRPC client (#337) * Grpc client connection retrieves account sequence (#337) * Removed the account sequence flag from the tx raw commands (#337) * Removed instructions to query and specify account sequence from tx raw command (#337) * Logic to fetch GRPC endpoint address from config (#337) * Fixing tests (#361) * Logic to use the address from the key seed (#337) * Added boilerplate code for a keys add command to the relayer (#363) * Removing key flag from tx cmds * Adding logic to get key specified in the config * Logic to get the key specified in the config (#363) * Removed the -k flag from the tx raw commands (#363) * More logic to add key command (#363) * key add command for memory store working (#363) * Added logic to persist key seed in 'home' folder (#363) * Changes implemented (#363): - Added a new test keyring backend to support adding keys to file system (under home folder) - Refactored logic to add key to be part of the keystore and not the command - Switched the keybase on a chain to use the test keyring - Key seed file is saved in the test keystore default folder (/home/andy/.rrly) * Logic to use the key_name parameter from the config to add key. Removed name parameter from keys add cmd (#363) * Changed the logic to get the key from the test keyring file store (#363) * Implemented changes: (#363) - Clean up remaining key_seed flag for tx cmds - Refactored keybase to include chain config - Refactoring keyring methods to use chain config - Logic to use configured key to sign tx * Updated the README instructions (#363) * Disable the 'keys restore' command for now (#363) * Added 'keys list' command to show key added on a chain (#363) * Added entry for issue #363 (PR #408) * Refactored the bound variables to use the full name per comment suggestion (#408) * Move key retrieval, memo and timeout height inside send_tx * Add the client creation, connection and channel handshake * remove sleeps * More error handling, cleanup * Macro for channel CLIs * Macro for connection CLIs * Where src/dst make no sense rename to a/b, also fix a few bugs after last commits * cleanup * cargo fmt * Use Romain's skip-verif until backwards verification is done * fix CLI bugs Co-authored-by: Andy Nogueira <me@andynogueira.dev>
* Added logic to generate GRPC client from cosmos.auth proto (#337) * Adding logic to use GRPC client (#337) * Grpc client connection retrieves account sequence (#337) * Removed the account sequence flag from the tx raw commands (#337) * Removed instructions to query and specify account sequence from tx raw command (#337) * Logic to fetch GRPC endpoint address from config (#337) * Fixing tests (informalsystems#361) * Logic to use the address from the key seed (#337) * Update readme * Fix the tx output strings * Fix update client Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
* Added logic to generate GRPC client from cosmos.auth proto (#337) * Adding logic to use GRPC client (#337) * Grpc client connection retrieves account sequence (#337) * Removed the account sequence flag from the tx raw commands (#337) * Removed instructions to query and specify account sequence from tx raw command (#337) * Logic to fetch GRPC endpoint address from config (#337) * Fixing tests (informalsystems#361) * Logic to use the address from the key seed (#337) * Added boilerplate code for a keys add command to the relayer (informalsystems#363) * Removing key flag from tx cmds * Adding logic to get key specified in the config * Logic to get the key specified in the config (informalsystems#363) * Removed the -k flag from the tx raw commands (informalsystems#363) * More logic to add key command (informalsystems#363) * key add command for memory store working (informalsystems#363) * Added logic to persist key seed in 'home' folder (informalsystems#363) * Changes implemented (informalsystems#363): - Added a new test keyring backend to support adding keys to file system (under home folder) - Refactored logic to add key to be part of the keystore and not the command - Switched the keybase on a chain to use the test keyring - Key seed file is saved in the test keystore default folder (/home/andy/.rrly) * Logic to use the key_name parameter from the config to add key. Removed name parameter from keys add cmd (informalsystems#363) * Changed the logic to get the key from the test keyring file store (informalsystems#363) * Implemented changes: (informalsystems#363) - Clean up remaining key_seed flag for tx cmds - Refactored keybase to include chain config - Refactoring keyring methods to use chain config - Logic to use configured key to sign tx * Updated the README instructions (informalsystems#363) * Disable the 'keys restore' command for now (informalsystems#363) * Added 'keys list' command to show key added on a chain (informalsystems#363) * Added entry for issue informalsystems#363 (PR informalsystems#408) * Refactored the bound variables to use the full name per comment suggestion (informalsystems#408) * Move key retrieval, memo and timeout height inside send_tx Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
* Added logic to generate GRPC client from cosmos.auth proto (#337) * Adding logic to use GRPC client (#337) * Grpc client connection retrieves account sequence (#337) * Removed the account sequence flag from the tx raw commands (#337) * Removed instructions to query and specify account sequence from tx raw command (#337) * Logic to fetch GRPC endpoint address from config (#337) * Fixing tests (informalsystems#361) * Logic to use the address from the key seed (#337) * Added boilerplate code for a keys add command to the relayer (informalsystems#363) * Removing key flag from tx cmds * Adding logic to get key specified in the config * Logic to get the key specified in the config (informalsystems#363) * Removed the -k flag from the tx raw commands (informalsystems#363) * More logic to add key command (informalsystems#363) * key add command for memory store working (informalsystems#363) * Added logic to persist key seed in 'home' folder (informalsystems#363) * Changes implemented (informalsystems#363): - Added a new test keyring backend to support adding keys to file system (under home folder) - Refactored logic to add key to be part of the keystore and not the command - Switched the keybase on a chain to use the test keyring - Key seed file is saved in the test keystore default folder (/home/andy/.rrly) * Logic to use the key_name parameter from the config to add key. Removed name parameter from keys add cmd (informalsystems#363) * Changed the logic to get the key from the test keyring file store (informalsystems#363) * Implemented changes: (informalsystems#363) - Clean up remaining key_seed flag for tx cmds - Refactored keybase to include chain config - Refactoring keyring methods to use chain config - Logic to use configured key to sign tx * Updated the README instructions (informalsystems#363) * Disable the 'keys restore' command for now (informalsystems#363) * Added 'keys list' command to show key added on a chain (informalsystems#363) * Added entry for issue informalsystems#363 (PR informalsystems#408) * Refactored the bound variables to use the full name per comment suggestion (informalsystems#408) * Move key retrieval, memo and timeout height inside send_tx * Add the client creation, connection and channel handshake * remove sleeps * More error handling, cleanup * Macro for channel CLIs * Macro for connection CLIs * Where src/dst make no sense rename to a/b, also fix a few bugs after last commits * cleanup * cargo fmt * Use Romain's skip-verif until backwards verification is done * fix CLI bugs Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Closes: cosmos/ibc-proto-rs#18
Description
This PR has the logic to start using the GRPC service from a Cosmos chain to retrieve account information. The account has the sequence number that is needed to submit a transaction. With this implementation there is no need anymore to manually query the account sequence in order to submit a transaction. Changes implemented:
tx raw
commandFor contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.