-
Notifications
You must be signed in to change notification settings - Fork 635
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
feat: rpc query service for returning the UpgradeSequence stored in state for a specific port/channel pair #3360
feat: rpc query service for returning the UpgradeSequence stored in state for a specific port/channel pair #3360
Conversation
…/1618-chan-upgrade-init
…datebasic, pull in subset ordering suggestions and adding tests
// QueryUpgradeSequenceResponse is the response type for the QueryUpgradeSequence RPC method | ||
message QueryUpgradeSequenceResponse { | ||
uint64 upgrade_sequence = 1; | ||
bytes proof = 2; |
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 we need the proof in the response proto? i see it in the NextSequenceReceive
query but it seems to always be set to nil
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.
an unrelated question: do we need the cli commands for this query as well?
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 we need the proof in the response proto? i see it in the NextSequenceReceive query but it seems to always be set to nil
I believe the reason is that there is not support in SDK/Comet to generate proofs for a given key/value . @colin-axner opened this issue in the SDK a while back.
an unrelated question: do we need the cli commands for this query as well?
I think we have CLIs for all gRPC, soI would say that we also add it for consistency? What others think?
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.
IIRC some of the channel CLIs use a --prove
flag and based off that flag an ABCI query can be done directly to tendermint rpc.
Unsure if there's any consistency to which ones contain the --prove
flag and which do not. Haven't checked in depth. You may as well go ahead and add it!
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 believe the reason is that there is not support in SDK/Comet to generate proofs for a given key/value . @colin-axner opened cosmos/cosmos-sdk#7036 in the SDK a while back.
yes, I remember this issue from the relayers having to always query the tendermint rpc instead of being able to query proofs from the grpc endpoint. I guess the question is if we want to plan for a (possible?) future of a proof returned via grpc by still putting in the proof field in the response body, even if now it will always return nil, or just remove that proof field.
EDIT i see the cli util implemented which handles the --prove
flag, i'll do it that way then.
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.
Nice work, @charleenfei!
// QueryUpgradeSequenceResponse is the response type for the QueryUpgradeSequence RPC method | ||
message QueryUpgradeSequenceResponse { | ||
uint64 upgrade_sequence = 1; | ||
bytes proof = 2; |
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 we need the proof in the response proto? i see it in the NextSequenceReceive query but it seems to always be set to nil
I believe the reason is that there is not support in SDK/Comet to generate proofs for a given key/value . @colin-axner opened this issue in the SDK a while back.
an unrelated question: do we need the cli commands for this query as well?
I think we have CLIs for all gRPC, soI would say that we also add it for consistency? What others think?
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 to me! May as well add a CLI in this PR too?
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.
Nice job looks super clean! 🥇
Description
closes: #1902
Commit Message / Changelog Entry
see the guidelines for commit messages. (view raw markdown for examples)
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.