relayer
relayer copied to clipboard
`findMatchingClient` call fails when attempting to create a new light client
When attempting to create a new light client the relayer attempts to find an existing light client with a matching consensus state to ensure that redundant light clients are not being created on chain. This call fails every time so the relayer will never find a matching client even if one does exist.
The query for fetching all client states appears to fail with two cases
- The query acts as a DoS vector on certain chains (notably on the Cosmos Hub) and will timeout because the node falls behind the chain tip, presumably because it is trying to fetch too much state.
- The query succeeds but due to lack of support for paginated queries we end up with a response that only contains a subset of the existing light clients.
https://github.com/cosmos/relayer/blob/1d973901c1123d82bea5d9c1c03c456d0e963f50/relayer/client.go#L468-L508
With pagination in place in many places, is this still an issue? cc @agouin @Reecepbcups