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

hub->rollapp packets are not relayed by the flush mechanism #10

Closed
danwt opened this issue Apr 17, 2024 · 0 comments · Fixed by #18
Closed

hub->rollapp packets are not relayed by the flush mechanism #10

danwt opened this issue Apr 17, 2024 · 0 comments · Fixed by #18
Assignees

Comments

@danwt
Copy link

danwt commented Apr 17, 2024

Overview

The relayer in general works in 2 ways:

  1. event based - listens to events and by that knows how to relay messages
  2. query based - evert flush interval queries both chains to see if any packets needs handling which were were missed by the event based processor

Problem:

Relayer flush doesn't work for packets sent from hub to rollapp if the rollapp has a long block time (e.g 1hr).
Part of the flush sequence is updating the chain's ibc light client. However, when trying to update the rollapp ibc client on the hub, and assuming no block took place in the last hour, the relayer tries to update it with the same height it's most likely have. This in turn fails (as you must have height + 1 to update ibc light client), which prevents from the pending packets to be relayed.

Example update client error (part of it):
Error sending messages <truncate-for-brevity> consensus height is greater than or equal to the current block height (1-5 >= 1-5): invalid height [cosmos/ibc-go/[email protected]/modules/core/03-connection/keeper/handshake.go:169] With gas wanted: '18446744073709551615' and gas used: '142375' : unknown request"}

Replicate:

  1. Scenario 1
start a hub + rollapp with 1 hr rollapp blocktime
do all preconditions needed to be able to do a ibc transfer hub->rollapp 
kill relayer
do a ibc transfer hub -> rollapp
wait for event on hub to go out of date, so relayer will not see it
start relayer
# relayer will not be able to relay packet to RA, and ack to HUB, due to ??

What we want:

Make sure we can always relay even with low activity chains and when relayers come and go and might miss events

Solution ideas:

TODO

### Requirements

  • Don't want busy loop unnecessarily
  • Require as little as possible cost

Related issues:

Tools needed:

@omritoptix omritoptix transferred this issue from dymensionxyz/dymension Apr 17, 2024
@omritoptix omritoptix changed the title feat: make sure packets are always relayed in timely fashion even if rollapp is inactive / low activity fix: hub->rollapp packets are not relayed by the flush mechanism Apr 17, 2024
@omritoptix omritoptix changed the title fix: hub->rollapp packets are not relayed by the flush mechanism hub->rollapp packets are not relayed by the flush mechanism Apr 17, 2024
@omritoptix omritoptix assigned mtsitrin and unassigned mtsitrin Apr 20, 2024
@omritoptix omritoptix linked a pull request May 6, 2024 that will close this issue
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 a pull request may close this issue.

3 participants