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

Add checks to skip relaying cleared packet for all stages of relaying #539

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

soareschen
Copy link
Collaborator

This PR introduces a SkipClearedPacket packet relayer middleware that checks whether a given packet has been cleared on the source chain, before proceeding to relay a given packet.

A packet is considered cleared on the source chain, an ack or timeout has already been relayed, and that the source chain has cleared its original packet commitment. In that case, the relayer do not need to perform anything else and can return early.

This is mainly useful when the event-based relayer is used for packet clearing. In such case, the relayer would be given old chain events, and it needs to determine whether the packet has already previously been cleared, so that it does not repeat any relaying that has already been done before.

@soareschen soareschen requested a review from ljoss17 February 14, 2025 21:29
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.

1 participant