-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Experiment] repro: comet query client #74
[Experiment] repro: comet query client #74
Conversation
ee5a992
to
e02dd8f
Compare
30b7a3c
to
31099ec
Compare
e02dd8f
to
c84f055
Compare
c84f055
to
5d1fd7a
Compare
5d1fd7a
to
332f527
Compare
@bryanchriswhite Can you link to this PR |
@@ -0,0 +1,96 @@ | |||
package comet_query |
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.
@bryanchriswhite You asked me to TAL at this in this comment but it's not something I've ever used or looked into so I honestly don't think there's any value I can provide.
Was there something specific you wanted me to look into or just be aware of this PR?
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.
That comment was a follow-up to #64 (comment), where you had asked about "why don't we use their client?" and #64 (comment) with a similar question about if we switch to theirs do we still need our interfaces. The main reason I wanted you to see this was to add clarity to my responses there.
@bryanchriswhite Can you link to this PR (#74) in the comments next to our implementation?
There already is a code comment next to the interface, which is why I was apologizing in that github comment. The base branch moved since opening #74 and made the PR unreadable. The code comment is a couple lines below where you had placed the github comment, it reads:
// NOTE: a branch which attempts this is available at:
// https://github.com/pokt-network/poktroll/pull/74
Do you have a strong opinion about having it closer to the implementation instead?
@bryanchriswhite Thoughts on closing this PR? We have it available as a reference (be it closed or not) moving forward. |
@Olshansk no preference from me; whatever's most convenient for project management. |
Summary
Human Summary
This branch is an attempt to replace our "custom" comet RPC client for event subscriptions (using the gorilla websocket package). As noted above the
QueryClient
interface definition in pkg/client/interface.go, such a thing seems to exist in the cometbft repo; however, my attempts at getting it to work, for our use case at least have been unsuccessful. I think there's likely something basic that I'm misunderstanding or an assumption that I don't realize I'm making. 🤔AI Summary
Summary generated by Reviewpad on 26 Oct 23 18:51 UTC
This pull request implements a new HTTP RPC client for the
comet_query
package. It introduces a newcometQueryClient
struct that handles querying events from a remote CometBFT node. The client can subscribe to specific events and receive event data in the form of bytes. The implementation includes functions for starting the client, subscribing to events, and producing events. Additionally, a test is added to verify the functionality of theEventsBytes
method.Issue
Relates to:
Improve maintainability (owning less code).
Type of change
Select one or more:
Testing
make go_test
Sanity Checklist