-
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
Implement query for client connections #169
Conversation
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.
Ok, this might be a very high level feedback, but running the command gives me an empty value. (I'm running simd in docker on the side.)
cargo run --bin relayer -- -c relayer/relay/tests/config/fixtures/simple_config.toml query client connections ibc-test ethbridge --height 3 -p false
query client connections error Empty response value
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.
Overall looks good, minor notes and requests here and there.
At the testing code, somehow I expected that the command itself will be tested. We should implement some kind of integration testing for these.
Not in this PR, though, that would be unfair to the scope here.
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 just noticed that you implemented the TryFromRaw in the obsolete query.rs
. Please clean up the unused code and move things around like you can see in the connection and channel code.
Using the simapp version in this branch, the command I've used to get the client connections is:
the chain_id used is chain_A and client_id clientidone. |
Ah cool, thanks! I was a bit lost there. Can you update the comment in the code to reflect that? |
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.
If we supply a height that is too advanced, the reported error is a bit misleading saying something along the lines of proof is unexpectedly empty; ensure height has not been pruned:
. See below:
Running `target/debug/relayer -c ./relayer/relay/tests/config/fixtures/relayer_conf_example.toml query client connections chain_A clientidone -h 1000`
Options QueryClientConnectionsOptions { client_id: ClientId("clientidone"), height: 1000, proof: true }
query client connections error RPC error: proof is unexpectedly empty; ensure height has not been pruned: invalid request
Actually noticed this on another issue and provided comments. I think someone mentioned that has to do with pruning I believe but can't find that thread. |
Hint: the file |
I'm not sure this is about pruning. Pruning would interfere with a query if the supplied height
But there might a bug in the validation/handling. |
…red code to fix merge conflicts #169
This is fixed in 1ca727d |
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.
Last drift, I promise.
Thanks for fixing Co-authored-by: Greg Szabo <16846635+greg-szabo@users.noreply.github.com>
Thanks for fixing Co-authored-by: Greg Szabo <16846635+greg-szabo@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #169 +/- ##
========================================
+ Coverage 13.6% 15.7% +2.1%
========================================
Files 69 59 -10
Lines 3752 3823 +71
Branches 1374 1480 +106
========================================
+ Hits 513 604 +91
+ Misses 2618 2475 -143
- Partials 621 744 +123
Continue to review full report at Codecov.
|
* Implemented logic to query client connections informalsystems#151 * Implemented a way to parse the client connections query response as a vector of string informalsystems#151 * Added test for client connections query params informalsystems#151 * Refactored TryFromRaw for Vec<String> as suggested on review informalsystems#169 * Fixed comments and fixed command line example to test the query client connections informalsystems#169 * Removing unused references informalsystems#169
Closes: #151
Description
Implemented query for client connections. Response is parsed as array of strings (which is the ABCI query result).
For contributor use:
docs/
) and code commentsFiles changed
in the Github PR explorer