-
Notifications
You must be signed in to change notification settings - Fork 610
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
client: upgraded consensus state #82
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.
Looks great! Thanks @fedekunze. Left some minor requests
proto/ibc/core/client/v1/query.proto
Outdated
// client id and plan height field have been deprecated. Use gRPC header for setting the height instead. | ||
reserved 1, 2; | ||
reserved "client_id", "plan_height"; |
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 can just remove these. I don't think we have done a release with this proto definition (since it was added when removing IBC from x/upgrade)
@@ -240,3 +234,40 @@ func (q Keeper) UpgradedClientState(c context.Context, req *types.QueryUpgradedC | |||
UpgradedClientState: any, | |||
}, nil | |||
} | |||
|
|||
// UpgradedConsensusState implements the Query/UpgradedConsensusState gRPC method |
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.
Could you add some comments on this function indicating that the context height should be set for the expected plan height (otherwise this will always return a consensus state not found)
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.
Also this will only return a valid consensus state on the last block of the chain and not for any other height
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.
Also this will only return a valid consensus state on the last block of the chain and not for any other height
you can set the height on the grpc req metadata
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 this still needs godoc?
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 @fedekunze , have some nits below
@@ -240,3 +234,40 @@ func (q Keeper) UpgradedClientState(c context.Context, req *types.QueryUpgradedC | |||
UpgradedClientState: any, | |||
}, nil | |||
} | |||
|
|||
// UpgradedConsensusState implements the Query/UpgradedConsensusState gRPC method |
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.
Also this will only return a valid consensus state on the last block of the chain and not for any other height
Codecov Report
@@ Coverage Diff @@
## main #82 +/- ##
==========================================
+ Coverage 65.19% 65.22% +0.03%
==========================================
Files 127 127
Lines 8392 8405 +13
==========================================
+ Hits 5471 5482 +11
+ Misses 2558 2557 -1
- Partials 363 366 +3
|
Transaction aggregation. Resolves cosmos#69.
closes #5