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

Make light client refresh window configurable #3397

Closed
5 tasks
Tracked by #3437
nik-suri opened this issue Jun 5, 2023 · 2 comments · Fixed by #3402
Closed
5 tasks
Tracked by #3437

Make light client refresh window configurable #3397

nik-suri opened this issue Jun 5, 2023 · 2 comments · Fixed by #3402
Assignees
Labels
I: configuration Internal: related to Hermes configuration O: new-feature Objective: cause to add a new feature or support
Milestone

Comments

@nik-suri
Copy link

nik-suri commented Jun 5, 2023

Summary

Currently Hermes has the light client refresh rate hardcoded in - it'll automatically refresh the light client every 2/3rd of the trusting period and this rate is not configurable. The only way to get more frequent refreshes is to lower the trusting period, which is not the ideal path. We would ideally like to configure multiple refresh attempts within the trusting period, instead of waiting until 2/3rd of trusting period has elapsed.

Problem Definition

This would be a useful feature to add further protection against an IBC light client going stale. For example, we currently have a light client with a trusting period of 2 days. In the worst case, there could be 0 packets sent, the relayer could go down right before the light client refresh is scheduled to happen, and we may not realize the relayer is down until the full trusting period has elapsed. If we could configure the relayer to make more frequent updates to the light client, we'd be very well protected against this scenario.

Proposal

Perhaps we could implement this feature through a flag in each chain config. This way, each chain could configure a custom light client refresh rate.

For example, light_client_refresh_rate = 1/5 would schedule a light client update to happen once 1/5 of the trusting period elapses.

Acceptance Criteria

A feature is implemented that enables the user to configure custom light client refresh rates for each chain in the hermes config.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac
Copy link
Member

romac commented Jun 6, 2023

Can you try out this branch and see if it works for you? #3402

The new per-chain setting is client_refresh_rate and it takes for value a fraction of the trusting period, eg. '1/10' for refreshing the client 10 times per trusting period.

@seanchen1991 seanchen1991 moved this from 🩹 Triage to 🏗 In progress in Hermes Jun 6, 2023
@seanchen1991 seanchen1991 added O: new-feature Objective: cause to add a new feature or support I: configuration Internal: related to Hermes configuration labels Jun 6, 2023
@seanchen1991 seanchen1991 added this to the v1.6 milestone Jun 6, 2023
@romac
Copy link
Member

romac commented Jun 14, 2023

@nik-suri Can you try out this branch and see if it works for you? #3402

@seanchen1991 seanchen1991 moved this from 🏗 In progress to 👀 In review in Hermes Jun 20, 2023
@seanchen1991 seanchen1991 moved this from 👀 In review to 🔖 Needs review in Hermes Jun 20, 2023
@romac romac modified the milestones: v1.6, v1.7 Jul 18, 2023
@romac romac modified the milestones: v1.7, v1.8 Sep 14, 2023
@github-project-automation github-project-automation bot moved this from 👀 Needs attention to ✅ Done in Hermes Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: configuration Internal: related to Hermes configuration O: new-feature Objective: cause to add a new feature or support
Projects
Status: ✅ Done
3 participants