Skip to content

Conversation

boojamya
Copy link
Contributor

@boojamya boojamya commented Nov 23, 2023

The main goal of this PR was to fix the ShouldRelayChannel method in the case where there was no path filter rule in the relayer config.

We discovered an issue when tracking cosmos_relayer_observed_packets metric. When no filter was applied to a path, we were observing packets that were irrelevant to the path(s) the relayer was configured for.

To fix this we now check if the channelKey is in the channelStateCache in the pathEndRunTime

  • this is the reason to move ShouldRelayChannel from path_end to path_end_runtime

The unit tests were refactored.

Closes #1341

@boojamya boojamya marked this pull request as ready for review December 5, 2023 19:49
@boojamya boojamya added the T: Metrics TYPE: Metrics label Dec 5, 2023
Copy link
Contributor

@jtieri jtieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had one nit but otherwise i think this looks sufficient, tests look accurate and the intended patch seems to make sense to me.

gonna approve this now so it's not blocked on me

@boojamya boojamya merged commit cfe8b93 into main Dec 14, 2023
@boojamya boojamya deleted the dan/fix-observed-tx branch December 14, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Metrics TYPE: Metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update cosmos_relayer_observed_packets metric to only observe packets that apply to filter rules
2 participants