fix: filter gravity batches queried from paloma #299
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds some filtering when querying messages from Paloma, which by default will not be filtered by chain ID.
I don't know why this wasn't part of the original change that added the gravity stuff, I imagine it was simply overlooked. I tried to add some test coverage as well, but I find the current solution to be more than lacking. We define the protobuf stuff in Paloma, then we also generate the mocks there. There's no automation or
go:generate
for this, and most packages don't even include mocks for the protobuf parts.So, even going ahead manually creating the mocks in Paloma, pushing the changes, updating the references in Pigeon and writing a test against it, there is 0 guarantee that a future dev (or me) will make changes to the proto definitions and simply not update the mocks.
If anything, the mocks should be created in Pigeon itself. It's something we should look at in the future. It also feeds into the protobuf definitions, which should probably rest in their own repository if we opt out of the monorepo approach.