-
Notifications
You must be signed in to change notification settings - Fork 597
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
fix: disallow incentivizing packets which have not been sent or have been already relayed #1347
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1347 +/- ##
==========================================
+ Coverage 80.29% 80.31% +0.01%
==========================================
Files 166 166
Lines 12047 12059 +12
==========================================
+ Hits 9673 9685 +12
Misses 1918 1918
Partials 456 456
|
return nil, sdkerrors.Wrapf(channeltypes.ErrSequenceSendNotFound, "channel does not exist, portID: %s, channelID: %s", msg.PacketId.PortId, msg.PacketId.ChannelId) | ||
} | ||
|
||
// only allow incentivizing of packets which have been sent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check if the channel is in an OPEN
state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great question. The answer isn't immediately obvious. I would initially think it is a question of supporting optimistic sends, but we also need to consider the case where a channel closes.
If a channel closes after a packet is sent, it is possible a user may want to incentivize a timeout relayer to get their packet timed out. I think that is a strong enough reason to allow incentivization on any channel state (so long as the channel exists)
Clean :) Just one question regarding checking if the channel is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Description
closes: #1318
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes