Skip to content
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

Update light client if close to expiration #861

Closed
wants to merge 3 commits into from
Closed

Conversation

boojamya
Copy link
Contributor

@boojamya boojamya commented Jul 21, 2022

The goal of this PR is to ensure light clients don’t expire on low trafficked paths where MsgUpdateClient isn’t being sent regularly.

The assembleAndSendMessages function gets called on every block that has available signals to process. This is where we put a check to see if the light client is close to being expired.
We update the light client if it has less than 1/3 of its trusting period left.

We get the trusting period of the client when we create a new cosmos_chain_processor and cache this info so it is not need to make this call every block.
I believe all of the client state info, including the trusting period, will be updated in the relayers cache every time it handles relevant transaction messages

Question:

  • Is this OK to build into the overall relayer functionality? Will this effect non-cosmos based chains implementation of the relayer?

Todo:

  • It would be nice to wire up a test in IBCtest to ensure this works properly.

Props to @agouin for taking the time to run through this with me.

Closes: #853

@boojamya boojamya changed the title update client if close to expiring Update light client if close to expiration Jul 21, 2022
@boojamya boojamya marked this pull request as ready for review July 21, 2022 17:30
@boojamya boojamya marked this pull request as draft July 27, 2022 23:20
@boojamya
Copy link
Contributor Author

Stale. Closing in favor of: #1008

@boojamya boojamya closed this Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to ensure clients stay alive
1 participant