backport: implement the ADR 075 /events method (#7965)#9497
Conversation
This method implements the eventlog extension interface to expose ABCI metadata to the log for query processing. Only the types that have ABCI events need to implement this. - Add an event log to the environment - Add a sketch of the handler method - Add an /events RPCFunc to the route map - Implement query logic - Subscribe to pubsub if confingured, handle termination
5f235bd to
7a40bd5
Compare
| return q.matchesEvents(ExpandEvents(events)), nil | ||
| } | ||
|
|
||
| func (q *Query) MatchesEvents(events []types.Event) (bool, error) { |
There was a problem hiding this comment.
@sergio-mena MatchesEvents is added to avoid bigger diff when apply origin Matches, let me know if need changes.
There was a problem hiding this comment.
I also find this OK.
I have a question though: is adding MatchesEvents a temporary way to reduce diff size? Or will it stay when all PRs needed are backported to his branch?
|
@mmsqe are all UTs passing on your machine? |
Do you mean pass when run |
Yes, sorry should have been clearer |
Tests are green, ci also says so. |
|
|
||
| // Verify that the event data types satisfy their shared interface. | ||
| var ( | ||
| _ TMEventData = EventDataCompleteProposal{} |
There was a problem hiding this comment.
maybe we can add TODO here to avoid miss when backport these feature branches later
There was a problem hiding this comment.
I could help to backport these 2 PRs later, not sure if we give them a priority.
There was a problem hiding this comment.
Fair enough. If you could help with it (backporting them in this branch), it would be awesome
…dermint#9497) * rpc: implement the ADR 075 /events method (tendermint#7965) This method implements the eventlog extension interface to expose ABCI metadata to the log for query processing. Only the types that have ABCI events need to implement this. - Add an event log to the environment - Add a sketch of the handler method - Add an /events RPCFunc to the route map - Implement query logic - Subscribe to pubsub if confingured, handle termination * add MatchesEvents test * add TODO due to backport sequence Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
…dermint#9497) * rpc: implement the ADR 075 /events method (tendermint#7965) This method implements the eventlog extension interface to expose ABCI metadata to the log for query processing. Only the types that have ABCI events need to implement this. - Add an event log to the environment - Add a sketch of the handler method - Add an /events RPCFunc to the route map - Implement query logic - Subscribe to pubsub if confingured, handle termination * add MatchesEvents test * add TODO due to backport sequence Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
For the full description, see #7965
PR checklist
CHANGELOG_PENDING.mdupdated, or no changelog entry neededdocs/) and code comments, or nodocumentation updates needed