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

Check packet events have not been handled before processing #984

Merged
merged 9 commits into from
May 25, 2021

Conversation

ancazamfir
Copy link
Collaborator

@ancazamfir ancazamfir commented May 24, 2021

Closes: #983

Description

  • check that a send packet has not been handled before processing
    • checks that the packet has not been received on the destination chain and
    • the packet commitment is still present on source chain (i.e. the packet was not timed out)
  • check that a packet received and acknowledged on destination chain has not been already handled
    • checks that an acknowledgment packet has not been received by the source chain

(ignore the changes in the client worker...they are coming from PR #974 and will not be committed)

Testing:

  • manually tested running multiple relayers with different accounts. Send a number of packets with high and small timeout offsets
  • slower instance retries only once before already handled (found in logs) event is detected
  • performed the tests for recv, ack and timeout packets

For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@ancazamfir ancazamfir mentioned this pull request May 24, 2021
5 tasks
Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments. I am still testing this..

modules/src/ics04_channel/packet.rs Outdated Show resolved Hide resolved
modules/src/ics04_channel/packet.rs Outdated Show resolved Hide resolved
relayer/src/link.rs Outdated Show resolved Hide resolved
@romac romac merged commit 978d579 into master May 25, 2021
@romac romac deleted the anca/fix_already_recv branch May 25, 2021 21:06
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.

Graceful handling of packet events in the presence of multiple relayers
3 participants