-
Notifications
You must be signed in to change notification settings - Fork 329
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 configuration to filter fee packets using recv fee
as criteria
#3133
Merged
romac
merged 26 commits into
master
from
luca_joss/ics29_filter_fee_packets_using_recv_fee_only
Mar 3, 2023
Merged
Add configuration to filter fee packets using recv fee
as criteria
#3133
romac
merged 26 commits into
master
from
luca_joss/ics29_filter_fee_packets_using_recv_fee_only
Mar 3, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ljoss17
added
O: new-feature
Objective: cause to add a new feature or support
I: configuration
Internal: related to Hermes configuration
O: ics29-fee
Objective: Fee middleware support
labels
Mar 2, 2023
romac
requested changes
Mar 3, 2023
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.
Great work @ljoss17! Overall it looks really good, left a bunch of minor requests and comments.
Co-authored-by: Romain Ruetschi <romain@informal.systems> Signed-off-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
… of github.com:informalsystems/hermes into luca_joss/ics29_filter_fee_packets_using_recv_fee_only
romac
approved these changes
Mar 3, 2023
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: ics29-fee
Objective: Fee middleware support
O: new-feature
Objective: cause to add a new feature or support
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #1966
Description
This PR adds a new configuration to Hermes which allows users to relay only incentivized packets or incentivized packets which have at least a specific threshold as
recv_fee
.This configuration can be done per channel.
New configuration
The new configuration per chain:
The channel can be specified using regular expression matching, so to have a filter for all channels:
The denom is optional. If it is specified the packet must have a
recv_fee
with one of the specified denoms. For example this filter will only relay packets which have at least20 utatom
or10 stake
asrecv_fee
:And this will relay any packet which has at least
20 utatom
,10 stake
or at least 50 of any token:recv_fee
onlyThis solution only allows to filter SendPacket events if they do not have
recv_fee
or if the fee isn't high enough.This choice has been made since allowing to filter acknowledgement and timeout would introduce much more overhead. And the if no acknowledgement or timeout is relayed, the fees will not be distributed and unescrowed.
Remarks
This configuration is experimental. Packet clearing is disabled for the channels which have a fee filter configured, and some
SendPacket
events might not be relayed if theIncentivizedPacket
event is not in the same batch of events.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.